# Base Gas MCP

> Base Gas MCP is a paid MCP server for developer tools. Live Base gas prices, USD transaction costs and cross-chain comparison, paid per call. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Paid
- **Platforms:** CLI, API
- **Website:** https://base-gas-x402.vercel.app
- **Repository:** https://github.com/memosr/base-gas-mcp
- **MCP Registry name:** io.github.memosr/base-gas-mcp
- **Categories:** developer tools, finance and payments
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/base-gas-mcp
