Get the FREE Ultimate OpenClaw Setup Guide →

solana-dev

Solana Model Context Protocol (MCP) Demo

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio solana-foundation-solana-dev-mcp ts-node <full-path-to-repo>/index.ts

How to use

This Solana MCP server exposes a lightweight set of Solana-focused tools and prompts through the MCP interface. It provides basic RPC-style methods such as getBalance, getAccountInfo, and getTransaction to help you interact with Solana accounts and transactions from within an MCP-enabled editor or workflow. In addition to the RPC helpers, the server ships with Solana development prompts that guide you through common tasks, like querying account state, inspecting transactions, and drafting Solana-related development steps. You can extend the server by adding more tools, resources, and prompts to tailor the MCP experience to your Solana development needs.

To use it, run the MCP inspector against this server configuration (as shown in the README examples). The server is designed to be discoverable by MCP clients (Claude, Windsurf, Cursor, etc.) and provide a straightforward set of utilities that you can call from the editor integration or automation pipelines. You can also modify index.ts to add more RPC methods or prompts, enabling deeper Solana integration directly from your MCP workflow.

How to install

Prerequisites

  • Node.js v16 or higher
  • pnpm package manager (v9.10.0 or compatible)

Installation steps

  1. Clone the repository: git clone https://github.com/solana-foundation/solana-dev-mcp.git cd solana-dev-mcp

  2. Install dependencies with pnpm: pnpm install

  3. Run the MCP server in inspector mode (as described in the README):

    • Using ts-node (if you have ts-node available): npx @modelcontextprotocol/inspector ts-node index.ts

    • Alternatively, build to JavaScript and run with node (after a build step if provided): pnpm build node dist/index.js

  4. Generate the MCP configuration for clients (Claude Windsurf Cursor integration):

    • If you have ts-node installed globally: pnpm generate-config
    • If you do not have ts-node globally installed: pnpm build && pnpm generate-config:js

Additional notes

Tips and caveats:

  • The server is a simple demo implementation focused on Solana development workflows. It’s suitable for learning and prototyping but not intended for production use.
  • If you extend index.ts with new tools, ensure you recompile or restart the inspector as needed so MCP clients can discover the updated capabilities.
  • The configuration shown in the README uses ts-node during development. For production-like workflows, you may switch to a compiled node execution path (dist/index.js) after building.
  • You can add environment-specific providers (RPC endpoints, wallets, or mock data) by configuring relevant environment variables or extending the server with additional tools.
  • When working with sensitive RPC endpoints or keys, sandbox the environment and avoid embedding secrets in the MCP server configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers