Skip to content

chainstacklabs/rpc-nodes-mcp

Repository files navigation

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

About

Minimal, fast, and extensible MCP server for interactions with JSON-RPC blockchain nodes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages