home / mcp / blocknative mcp server
Provides real-time gas price predictions and cost estimates across multiple blockchains via an MCP server.
Configuration
View docs{
"mcpServers": {
"kukapay-blocknative-mcp": {
"command": "uv",
"args": [
"run",
"blocknative-mcp"
],
"env": {
"BLOCKNATIVE_API_KEY": "YOUR_API_KEY"
}
}
}
}You run a Blocknative MCP Server that provides real-time gas price predictions across multiple blockchains. It’s useful for applications that need up-to-date fee guidance and cost estimates to optimize transactions and user experience.
Connect to the Blocknative MCP Server from your MCP client to access three tools and one prompt for gas price data. You can run in development mode to test interactively, execute it directly, or integrate it with Claude Desktop.
Use the tools to fetch gas price predictions, estimate costs, and view supported chains. The server operates asynchronously to keep your application responsive.
Prerequisites: you need Python (version 3.10) and the uv tool for dependency management and running the project.
Install and run the MCP server using the following steps.
# Step 1: Install and sync dependencies using uv
uv sync
# Step 2: Start the MCP server in development mode (interactive inspector)
uv run mcp dev blocknative-mcp
# Alternative: run the server directly without the inspector
uv run blocknative-mcp
# Claude Desktop integration (for use within Claude Desktop)
uv run mcp install blocknative-mcp --name "Blocknative MCP Server"Environment variable for API access: high-frequency usage requires a Blocknative API key. Set BLOCKNATIVE_API_KEY to enable higher rate access. Use a placeholder value when configuring in examples.
The server supports low-frequency access without an API key while high-frequency access requires the key. You can leave the API key unset for development or testing with limited requests.
Fetches gas price predictions for a specified chain, returning a base fee and a table with confidence levels, price, max priority fee, and max fee.
Estimates transaction costs based on gas limit, confidence level, and chain ID, returning costs in Gwei and ETH.
Lists supported blockchains in a table with chain ID, system, and network.
A prompt template for querying gas prices at a specific confidence level and chain ID.