blocknative-mcp
The Blocknative MCP Server provides real-time gas price predictions and transaction cost estimates across multiple blockchains, powered by Blocknative. With this server, you can:
Fetch gas price predictions: Get detailed gas price predictions including base fee, confidence levels, max priority fee, and max fee for a specified blockchain (default: Ethereum Mainnet)
Estimate transaction costs: Calculate transaction costs based on gas limit, confidence level, and chain ID, returning costs in Gwei and ETH
List supported blockchains: View a Markdown table of all supported chains, including chain ID, system, and network
Query gas prices interactively: Use the prompt template to dynamically fetch gas prices at specific confidence levels and chain IDs
The server supports low-frequency access without an API key, but high-frequency use requires setting BLOCKNATIVE_API_KEY.
Fetches real-time gas price predictions for Ethereum Mainnet, estimates transaction costs, and provides information on base fees and priority fees.
Allows installation and usage of the MCP server from a GitHub repository, with license and version information displayed.
Provides real-time gas price predictions for Polygon network, allowing users to estimate transaction costs and optimize gas fees with different confidence levels.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@blocknative-mcp predict gas price for Ethereum mainnet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Blocknative MCP Server
An MCP server that provides real-time gas price predictions across multiple blockchains, powered by Blocknative.
Features
Tools:
predict_gas_price: Fetches gas price predictions for a specified chain (default: Ethereum Mainnet,chain_id=1), including base fee and a table with confidence levels, price, max priority fee, and max fee.estimate_gas_cost: Estimates transaction costs based on gas limit, confidence level, and chain ID, returning costs in Gwei and ETH.get_supported_chains: Lists supported blockchains in a table with chain ID, system, and network.
Prompt:
gas_price_query: A prompt template for querying gas prices at a specific confidence level and chain ID.
Asynchronous: Uses
httpxfor non-blocking HTTP requests to Blocknative's Gas Price and Chains APIs.Optional API Key: Supports low-frequency access without a Blocknative API key; high-frequency use requires setting
BLOCKNATIVE_API_KEY.
Related MCP server: chainlink-feeds-mcp
Prerequisites
Python: Version 3.10
uv: For dependency management and running the project (installation guide)
Blocknative API Key (optional): Required for high-frequency API access. Sign up at Blocknative to obtain a free API key.
Installation
Clone the Repository:
git clone https://github.com/kukapay/blocknative-mcp.git cd blocknative-mcpSet Up the Project with
uv:uv syncSet the Blocknative API Key (Optional):
For high-frequency access, set the environment variable:
export BLOCKNATIVE_API_KEY="your-api-key-here"For low-frequency access, skip this step.
Usage
The server provides three tools and one prompt, accessible via the FastMCP framework. You can run the server in development mode, execute it directly, or integrate it with Claude Desktop.
Running the Server
Development Mode with MCP Inspector:
uv run mcp dev blocknative-mcpThis opens the MCP Inspector, a web interface for testing tools and prompts interactively.
Direct Execution:
uv run blocknative-mcpClaude Desktop Integration:
uv run mcp install blocknative-mcp --name "Blocknative MCP Server"This installs the server for use with Claude Desktop.
Tools
predict_gas_price(chain_id: int = 1) -> str: Fetches gas price predictions for a chain (default: Ethereum Mainnet). Returns base fee and a Markdown table with confidence levels, price, max priority fee, and max fee.Example:
Gas Price Predictions for Chain ID 1 (ethereum/main): - Base Fee Per Gas: 0.382910791 Gwei | Confidence | Price (Gwei) | Max Priority Fee (Gwei) | Max Fee (Gwei) | |------------|--------------|-------------------------|----------------| | 99% | 0.52 | 0.14 | 0.9 | | 95% | 0.48 | 0.094 | 0.86 | | 90% | 0.47 | 0.089 | 0.85 | | 80% | 0.46 | 0.079 | 0.84 | | 70% | 0.45 | 0.069 | 0.83 |
estimate_gas_cost(gas_limit: int, confidence: int = 99, chain_id: int = 1) -> str: Estimates transaction costs based on gas limit, confidence level, and chain ID. Returns costs in Gwei and ETH.Example:
Estimated Gas Cost (Confidence 90%, Chain ID 1): - Gas Limit: 21000 - Max Fee Per Gas: 0.85 Gwei - Total Cost: 17850 Gwei (0.00001785 ETH)
get_supported_chains(ctx: Optional[Context] = None) -> str: Lists supported chains in a Markdown table with chain ID, system, and network.Example:
Supported Chains: | Chain ID | System | Network | |------------|----------|-----------| | 1 | ethereum | main | | 137 | polygon | mainnet | | 8453 | base | mainnet | | 11155111 | ethereum | sepolia |
Prompts
gas_price_query(confidence: int, chain_id: int = 1) -> List[base.Message]: A prompt template for querying gas prices at a specific confidence level and chain ID.Example:
- User: What is the current gas price for chain ID 1 transactions with 90% confidence? - Assistant: Let me fetch the gas price predictions for chain ID 1.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
3 toolsestimate_gas_costB
Estimate gas cost for a transaction based on gas limit, confidence level, and chain.
Parameters:
- gas_limit (int): The gas limit for the transaction (e.g., 21000 for a simple transfer).
- confidence (int): The confidence level for gas price prediction (0-100).
- chain_id (int): The ID of the blockchain network (e.g., 1 for Ethereum Mainnet). Default: 1.
- ctx (Optional[Context]): The MCP context object. Default: None.
Inputs: gas_limit (required), confidence, chain_id, ctx.
get_supported_chainsA
List the blockchain networks supported by the Blocknative Gas Platform, formatted as a Markdown table.
Parameters:
- ctx (Optional[Context]): The MCP context object. Default: None.
Returns:
- A Markdown table listing supported chains with their chain ID, system, and network.
Inputs: ctx.
predict_gas_priceC
Predict gas prices for a specified chain, including base fee and detailed prediction data in a Markdown table.
Parameters:
- chain_id (int): The ID of the blockchain network (e.g., 1 for Ethereum Mainnet). Default: 1.
- ctx (Optional[Context]): The MCP context object. Default: None.
Inputs: chain_id, ctx.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: estimate_gas_cost calculates transaction costs, get_supported_chains lists available networks, and predict_gas_price forecasts prices. The descriptions clearly differentiate these gas platform functionalities, making tool selection unambiguous for an agent.
All three tools follow a consistent verb_noun naming pattern (estimate_gas_cost, get_supported_chains, predict_gas_price) with clear action-object relationships. The naming is uniform throughout, using snake_case consistently without any deviations or mixed conventions.
With only 3 tools, the server feels somewhat thin for a gas platform domain that could benefit from additional operations like historical gas price analysis, transaction simulation, or multi-chain batch operations. While the core functions are covered, the limited tool count may restrict agent capabilities in more complex scenarios.
The toolset covers the essential gas platform operations well: cost estimation, chain discovery, and price prediction. However, there are minor gaps such as the inability to simulate transactions with actual data, compare gas prices across multiple chains simultaneously, or access historical gas price trends, which could limit some advanced workflows.
Maintenance
Related MCP Connectors
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
MCP server for accessing Glypse's prediction market analytics and research.
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Related MCP Servers
AlicenseCqualityDmaintenanceAn MCP server providing unified access to blockchain operations, bridging, swapping, and crypto trading strategies for AI agents.37178GPL 3.0- AlicenseBqualityDmaintenanceAn MCP server that provides real-time access to Chainlink's decentralized on-chain price feeds, optimized for seamless integration into AI agents and autonomous systems.57MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that delivers real-time cross-chain bridge rates and optimal transfer routes to onchain AI agents.5MIT

bnbchain-mcpofficial
AlicenseBqualityCmaintenanceA MCP server for BNB Chain that supports BSC, opBNB, Greenfield, and other popular EVM-compatible networks.26155 npm61MIT