https://github.com/chainstacklabs/rpc-nodes-mcp
Minimal, fast, and extensible MCP server for interactions with JSON-RPC blockchain nodes
https://github.com/chainstacklabs/rpc-nodes-mcp
blockchain ethereum modelcontextprotocol pumpdotfun solana web3
Last synced: 9 months ago
JSON representation
Minimal, fast, and extensible MCP server for interactions with JSON-RPC blockchain nodes
- Host: GitHub
- URL: https://github.com/chainstacklabs/rpc-nodes-mcp
- Owner: chainstacklabs
- License: apache-2.0
- Created: 2025-05-03T19:19:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-06-11T21:13:00.000Z (10 months ago)
- Last Synced: 2025-06-11T22:34:47.326Z (10 months ago)
- Topics: blockchain, ethereum, modelcontextprotocol, pumpdotfun, solana, web3
- Language: Python
- Homepage:
- Size: 205 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MCP to access blockchain RPC nodes
Minimal, fast, and extensible [MCP servers](https://modelcontextprotocol.io/introduction) for interactions with JSON-RPC blockchain nodes. Support EVM and Solana blockchains.
🍒 Extra feature: a separate MCP server with tools for pump.fun bonding curve calculations and analysis.
## 🚀 Quick start
### 1. Clone the repository
```bash
git clone https://github.com/chainstacklabs/rpc-nodes-mcp.git
cd rpc-nodes-mcp
```
### 2. Install dependencies with [`uv`](https://docs.astral.sh/uv/getting-started/installation/)
| 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
```bash
npx @modelcontextprotocol/inspector uv run main_evm.py
```
For more details, visit [Model Context Inspector](https://modelcontextprotocol.io/docs/tools/inspector).
## Scripts
A client example that interacts with the MCP server (requires `OPENAI_API_KEY` environment variable):
```bash
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](https://github.com/chainstack/dev-portal/tree/main/openapi)):
```bash
uv run scripts/generate_mcp_tools.py scripts/openapi_specs/ethereum.json scripts/generated evm
```
**Note:** auto-generated tools require further improvements, see [here](https://github.com/chainstacklabs/rpc-nodes-mcp/blob/main/scripts/README.md).
## Configuration
### Cursor
**EVM chains**
[](https://cursor.com/install-mcp?name=chainstack-evm-nodes&config=eyJjb21tYW5kIjoidXZ4IC0tZnJvbSBnaXQraHR0cHM6Ly9naXRodWIuY29tL2NoYWluc3RhY2tsYWJzL3JwYy1ub2Rlcy1tY3AuZ2l0IG1jcC1ldm0ifQ%3D%3D)
**Solana**
[](https://cursor.com/install-mcp?name=chainstack-solana-nodes&config=eyJjb21tYW5kIjoidXZ4IC0tZnJvbSBnaXQraHR0cHM6Ly9naXRodWIuY29tL2NoYWluc3RhY2tsYWJzL3JwYy1ub2Rlcy1tY3AuZ2l0IG1jcC1zb2xhbmEifQ%3D%3D)
**Pump Fun**
[](https://cursor.com/install-mcp?name=chainstack-pumpfun-tools&config=eyJjb21tYW5kIjoidXZ4IC0tZnJvbSBnaXQraHR0cHM6Ly9naXRodWIuY29tL2NoYWluc3RhY2tsYWJzL3JwYy1ub2Rlcy1tY3AuZ2l0IG1jcC1wdW1wZnVuIn0%3D)
### 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
- [Cursor](https://docs.cursor.com/context/model-context-protocol#model-context-protocol)
- [VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
- [Claude Desktop](https://modelcontextprotocol.io/quickstart/user#windows)