
Base Gas Mcp
io.github.memosrPublished by GitHub account memosrv0.3.2Updated Oct 26, 2026
Live Base gas, tx cost in USD, 4-chain comparison and gas history. Paid per call in USDC via x402.
Overview
Local MCP server giving an assistant live Base gas data, USD transaction costs, four-chain gas comparison and gas history, paid per call in USDC via x402.
- What you can do
- Get current Base gas: base fee, low/medium/high priority fees, transaction cost in USD, ETH and gwei, plus ready-to-sign maxFeePerGas values
- Compare the same transaction's cost across Base, OP Mainnet, Arbitrum One and Ethereum, cheapest first
- Review Base gas history over a chosen number of hours with min/max/average/median and a cheap/normal/expensive reading
- Find the cheapest hour in the past week and the hours to avoid, with savings in percent and USD
- Check service status and collected history for free, without a wallet
- When to use it
- Useful when you want an assistant to answer dollar-cost questions about Base transactions, decide which chain is cheapest right now, or pick a low-gas time to schedule a batch of transactions.
- Requirements
- Node.js 18 or newer, run locally over stdio via npx or a clone. A Base mainnet wallet holding a little USDC (no ETH needed), supplied as BUYER_PRIVATE_KEY in the client config; the server does not read a .env file. Optional MAX_USD_PER_CALL, BASE_GAS_ORIGIN and BUILDER_CODE. Network access to the paid endpoint.
Installation
In SourceWeft
- Open Base Gas Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
base-gas-mcp
An MCP server for live Base gas data, paid per call in USDC over the x402 payment protocol. No API key and no account: the agent pays a fraction of a cent from a wallet you control.
It answers the questions an RPC call cannot: what a transaction costs in dollars, which chain is cheapest right now, whether gas is high or low, and which hours to avoid.
Tools
Prices are set by the endpoint and published in its OpenAPI document. Every paid result includes the settlement transaction hash.
gasLimit guide: 21000 ETH transfer (default), ~65000 ERC-20 transfer, ~85000
NFT mint, ~180000 Uniswap swap, ~1500000 contract deploy.
Safety
- The server only ever pays one origin, set by you (
BASE_GAS_ORIGIN, defaulting to the live base-gas-x402 API). No tool takes a URL, so text the model reads cannot redirect your wallet to another paid endpoint. - Per-payment cap. Any payment above
MAX_USD_PER_CALL(default0.05) is refused before anything is signed. - Payments are EIP-3009 authorizations: the wallet needs USDC only, no ETH.
- Use a separate wallet holding a few dollars. The key is read from the environment to sign payments and is never logged or returned.
The paid data source is a companion project: base-gas-x402.
Installation
Requirements
- Node.js 18 or newer (built-in
fetchis required) - A Base mainnet wallet holding a little USDC (no ETH needed)
Pass BUYER_PRIVATE_KEY through your MCP client's config (see below). The server does not read a .env file.
Or run the published package directly with npx base-gas-mcp (see the config blocks below).
Getting a buyer key
BUYER_PRIVATE_KEY is the private key of a Base mainnet wallet. Create a fresh wallet (for example in MetaMask, Coinbase Wallet, or with cast wallet new), export its private key, and fund it on Base with a few dollars of USDC.
Warning: this is a real private key that controls real funds. Use a separate, disposable wallet holding only small amounts. Never reuse a key from a wallet with significant funds, never commit it to git, and never paste it into chat. The server reads it only to sign payments and never logs or returns it.
Environment variables
Configuration
Claude Desktop
Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json), then restart Claude Desktop:
To run from a local clone instead, point command at Node and use the absolute path to the server:
Claude Code
Or from a local clone:
The server reads its settings only from the environment the client passes. It does not load a .env file (since 0.3.1), so a .env in whatever folder the client opens cannot change where the wallet pays.
Example usage
Once configured, ask your agent:
- "What does a Uniswap swap on Base cost right now, in dollars?" (
get_base_gaswithgasLimit180000) - "Is Base or Arbitrum cheaper for a token transfer at the moment?" (
compare_gas_costs) - "Is Base gas high right now, or should I wait?" (
get_gas_history) - "When should I schedule a batch of transactions on Base?" (
get_cheapest_window)
Each of these is one paid call. Check get_service_status first for free.
Tech stack
- Node.js (ESM), served over stdio transport
@modelcontextprotocol/sdkfor the MCP server@x402/fetch,@x402/evm, and@x402/extensionsfor the payment-wrapped fetch, the EIP-3009 exact payment scheme, and builder-code attributionviemfor account handling and signingzodfor input validation
License
MIT, copyright (c) 2026 memosr.
Source: README.md at commit ef01ef1
Tools
0Version history
2- v0.3.2LatestOct 18, 2026
- v0.3.1Oct 18, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts