base-gas-mcp
v0.4.0Live Base gas, tx cost in USD, 4-chain comparison and gas history.
Values you need
| Variable | What it is | |
|---|---|---|
BUYER_PRIVATE_KEY | required secret | Private key of a Base mainnet wallet holding a little USDC. Pays $0.002 to $0.02 per call. Use a separate wallet with small funds. |
MAX_USD_PER_CALL | optional | Refuse any single payment above this many USD. Default 0.05. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add base-gas-mcp -e 'BUYER_PRIVATE_KEY=<BUYER_PRIVATE_KEY>' -- npx -y base-gas-mcp@0.4.0Add to
claude_desktop_config.json{
"mcpServers": {
"base-gas-mcp": {
"args": [
"-y",
"base-gas-mcp@0.4.0"
],
"command": "npx",
"env": {
"BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"base-gas-mcp": {
"args": [
"-y",
"base-gas-mcp@0.4.0"
],
"command": "npx",
"env": {
"BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "BUYER_PRIVATE_KEY",
"id": "buyer-private-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"base-gas-mcp": {
"args": [
"-y",
"base-gas-mcp@0.4.0"
],
"command": "npx",
"env": {
"BUYER_PRIVATE_KEY": "${input:buyer-private-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.base-gas-mcp]
command = "npx"
args = ["-y", "base-gas-mcp@0.4.0"]
env = { "BUYER_PRIVATE_KEY" = "<BUYER_PRIVATE_KEY>" }For AI agents
- Ask the user for: BUYER_PRIVATE_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_base_gas, get_gas_advice, compare_gas_costs, get_gas_history, get_cheapest_window, get_service_status.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json