base-gas-mcp

v0.4.0
io.github.memosr/base-gas-mcp Checked 1 day ago Published 14 days ago

Live Base gas, tx cost in USD, 4-chain comparison and gas history.

Values you need

VariableWhat it is
BUYER_PRIVATE_KEYrequired 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_CALLoptional 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.0
Add 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

  1. Ask the user for: BUYER_PRIVATE_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. 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).
  3. Restart or reload the client so it starts the server.
  4. 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.
  5. 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