MCP ExplorerExplorer

Rpc Nodes Mcp

@chainstacklabson 10 months ago
4 Apache-2.0
FreeCommunity
AI Systems
#blockchain#modelcontextprotocol#web3
Minimal, fast, and extensible MCP server for interactions with JSON-RPC blockchain nodes

Overview

What is Rpc Nodes Mcp

rpc-nodes-mcp is a minimal, fast, and extensible MCP server designed for interactions with JSON-RPC blockchain nodes, supporting EVM and Solana blockchains.

Use cases

Use cases include developing dApps that require blockchain interactions, performing bonding curve calculations, and generating MCP tools for various blockchain ecosystems.

How to use

To use rpc-nodes-mcp, clone the repository, install dependencies using ‘uv’, set the necessary environment variables for the blockchain RPC URLs, and run the MCP server using the provided command.

Key features

Key features include support for EVM and Solana blockchains, tools for bonding curve calculations and analysis, and the ability to auto-generate MCP tools for other blockchains using OpenAPI specifications.

Where to use

rpc-nodes-mcp can be used in blockchain development, decentralized applications (dApps), and any environment requiring interaction with JSON-RPC blockchain nodes.

Content

MCP to access blockchain RPC nodes

Minimal, fast, and extensible MCP servers for interactions with JSON-RPC blockchain nodes. Support EVM and Solana blockchains.

Animation

🍒 Extra feature: a separate MCP server with tools for pump.fun bonding curve calculations and analysis.

🚀 Quick start

1. Clone the repository

git clone https://github.com/chainstacklabs/rpc-nodes-mcp.git
cd rpc-nodes-mcp

2. Install dependencies with uv

Mode Command
Base uv pip install -r pyproject.toml
Dev uv pip install -r pyproject.toml -e '.[dev]'
Test uv pip install -r pyproject.toml -e '.[test]'

3. Set environment variables (optional)

Default Chainstack endpoints are already provided, but if you’d like to use different ones, please add them to .env. The complete list of environment variables:

ARBITRUM_RPC_URL=
BASE_RPC_URL=
BINANCE_SMART_CHAIN_RPC_URL=
ETHEREUM_RPC_URL=
SONIC_RPC_URL=

SOLANA_RPC_URL=

OPENAI_API_KEY=

Note: OPENAI_API_KEY is only required for tests with scripts/run_mcp_client_example.py.

▶️ Run MCP server

npx @modelcontextprotocol/inspector uv run main_evm.py

For more details, visit Model Context Inspector.

Scripts

A client example that interacts with the MCP server (requires OPENAI_API_KEY environment variable):

uv run scripts/run_mcp_client_example.py

Tool for auto-generating MCP interfaces and implementations (only tools currently) based on OpenAPI spec (see Chainstack open-source docs):

uv run scripts/generate_mcp_tools.py scripts/openapi_specs/ethereum.json scripts/generated evm

Note: auto-generated tools require further improvements, see here.

Configuration

Cursor

        EVM chains

        Install EVM MCP Server

        Solana

        Install Solana MCP Server

        Pump Fun

        Install MCP Server

VS Code

The mcp.json file contains MCP server configurations. For VS Code users, place this file in the .vscode folder within your project directory. GitHub Copilot in Agent Mode will automatically discover and launch the configured servers.

Claude Desktop

The claude_desktop_config.json file contains MCP server configurations. For Claude Desktop users, place this file in the Claude Desktop data folder. Claude Desktop will automatically discover and launch the configured servers.

uv location errors: specify the full path to uv in the mcp.json file. To get the full path, run where uv command.

environment variables: double check you created .env file in the MCP servers folder and required endpoints.

References

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers