# Blocknative — how to use (mcp.ai)

Connect your Blocknative account and use 10 tools for developer tools straight from your AI agent. Connect with your own API key. Blocknative provides real-time mempool monitoring and transaction management tools for public blockchains.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_blocknative?ms=1787293680000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `blocknative_configure_filters`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/blocknative`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/blocknative/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/blocknative/configure/filters` — Tool to configure filters and ABI decoding for Ethereum mempool transactions. Use after establishing a Blocknative WebSocket connection to set up event filters and decoding.
  - body: { config: object, eventCode: string, categoryCode: string }
- `POST https://api.mcp.ai/api/blocknative/get/gas/distribution` — Tool to retrieve the current mempool gas price distribution breakdown. Use when analyzing gas price trends or preparing fee strategies.
- `POST https://api.mcp.ai/api/blocknative/get/gas/oracles` — Tool to retrieve metadata on supported gas oracles per chain. Use when you need to dynamically discover all available on-chain gas estimation oracles across networks.
- `POST https://api.mcp.ai/api/blocknative/get/gas/prices` — Tool to fetch gas price estimates for specific inclusion probabilities. Use when you need gas price ranges for the next block or next ~10 seconds.
  - body: { system?: string, chainid?: integer, network?: string, confidenceLevels?: integer[] }
- `POST https://api.mcp.ai/api/blocknative/get/supported/chains` — Tool to retrieve supported chains metadata. Use when discovering available networks for Blocknative gas services.
- `POST https://api.mcp.ai/api/blocknative/prediction/api/basefee/estimates` — Get real-time gas fee predictions for Ethereum mainnet's next 5 blocks. Returns base fee, blob base fee, and priority fee estimates at multiple confidence levels (99% and 50%). Essential for optimizin
- `POST https://api.mcp.ai/api/blocknative/subscribe/multichain` — Generate WebSocket connection details to subscribe to real-time blockchain events (transactions or account activity) across multiple chains via Blocknative's Multichain API. Returns the WebSocket URL 
  - body: { id: string, abi?: object[], type: string, chainId: string, filters?: string[] }
- `POST https://api.mcp.ai/api/blocknative/subscribe/transaction/hash` — Tool to subscribe to transaction state change events of an Ethereum transaction hash. Use after establishing a Blocknative WebSocket connection to prepare the subscription message.
  - body: { hash: string }
- `POST https://api.mcp.ai/api/blocknative/unsubscribe/multichain` — Tool to unsubscribe from events across multiple chains using the Multichain SDK. Use after stopping monitoring of an address or transaction to clean up resources, e.g., call: blocknative.unsubscribe({
  - body: { id: string, chainId: string }
- `POST https://api.mcp.ai/api/blocknative/unsubscribe/transaction/hash` — Tool to unsubscribe from transaction state change events for an Ethereum transaction hash. Use after establishing a Blocknative WebSocket connection to prepare the unsubscription message.
  - body: { hash: string }

## Example prompts
- "What can I do in Blocknative?"
- "Show me a summary of my Blocknative account"

## More
- Page: https://mcp.ai/blocknative
- Agent spec (llms.txt): https://mcp.ai/blocknative/llms.txt
- Postman collection: https://mcp.ai/blocknative/postman.json
