Skip to content
MCP server

Base Gas MCP

Live Base gas prices, USD transaction costs and cross-chain comparison, paid per call

Runs locallyStatus and history
Install
Pricing
Paid
Platforms
CLI, API
Runs
Locally
Version
0.3.2
Listing updated
2 days ago

About Base Gas MCP

Base Gas MCP is a paid MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Four paid tools and one free status check answer questions a plain RPC node cannot: what a transaction costs in dollars, whether gas is cheap or expensive compared with recent history, and which hours to avoid. The service samples Base every five minutes and keeps seven days of history, and dollar figures use the Chainlink ETH/USD feed on Base.

Each call is paid in USDC over the x402 protocol. The README lists approximate prices from about $0.002 for current gas to $0.02 for the cheapest-window analysis, and every paid result includes the settlement transaction hash. The wallet needs USDC but no ETH.

Safety limits are worth noting. The server only ever pays one origin, which you set, no tool accepts a URL, and any payment above MAX_USD_PER_CALL (default $0.05) is refused before signing. It requires a BUYER_PRIVATE_KEY, and the README advises using a separate wallet holding only a few dollars.

Install

Run in a terminal

claude mcp add base-gas-mcp --env BUYER_PRIVATE_KEY='<BUYER_PRIVATE_KEY>' -- npx -y base-gas-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "base-gas-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "base-gas-mcp"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "base-gas-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "base-gas-mcp"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "base-gas-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "base-gas-mcp"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "base-gas-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "base-gas-mcp"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "base-gas-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "base-gas-mcp"
      ],
      "env": {
        "BUYER_PRIVATE_KEY": "<BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Configuration

  • BUYER_PRIVATE_KEYPrivate 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.Required
  • MAX_USD_PER_CALLRefuse any single payment above this many USD. Default 0.05.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

get_base_gas
Base fee, priority tiers and transaction cost in USD, ETH and gwei.
compare_gas_costs
The same transaction priced on Base, OP Mainnet, Arbitrum One and Ethereum.
get_gas_history
Base gas statistics over a window with a cheap, normal, expensive or flat verdict.
get_cheapest_window
Hours to avoid, cheapest hour in UTC and the saving over seven days.
get_service_status
Free check of service health and collected history.

What it does

Gas in USD
Returns fee tiers plus transaction cost in dollars, ETH and gwei, with ready-to-sign fee values.
Four-chain comparison
Compares the same transaction on Base, OP Mainnet, Arbitrum One and Ethereum, cheapest first.
Gas history
Min, max, average and median over a window, with a cheap, normal, expensive or flat verdict.
Cheapest window
Uses seven days of history to name hours to avoid and the saving.
Spending cap
Payments above a configurable limit are refused before anything is signed.

Good for

  • Decide whether to send a transaction now or wait
  • Estimate swap or mint cost in dollars before an agent signs
  • Compare L2 and mainnet fees for the same operation
  • Let a trading agent schedule work in cheap hours

Pricing

Paid

Pay per call in USDC, about $0.002 to $0.02 per call

Prices change. Check base-gas-x402.vercel.app before you buy.

Base Gas MCP FAQ

How much does each call cost?

The README lists roughly $0.002 for current gas, $0.01 for comparison and history, and $0.02 for the cheapest window; status is free.

Do I need ETH?

No. The wallet needs USDC on Base only, because payments are EIP-3009 authorizations.

Can a prompt redirect my wallet to another endpoint?

The README says the server pays only the origin you configure and no tool takes a URL.

What is the default spending limit?

$0.05 per call, adjustable with `MAX_USD_PER_CALL`.

Is Base Gas MCP free?

No. Base Gas MCP is a paid product.

How do I add Base Gas MCP to Claude Code?

Run this command in your terminal: claude mcp add base-gas-mcp --env BUYER_PRIVATE_KEY='<BUYER_PRIVATE_KEY>' -- npx -y base-gas-mcp

What are the best alternatives to Base Gas MCP?

The closest alternatives to Base Gas MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Base Gas MCP

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools