Solana Dev MCP
An MCP server for Solana development providing basic RPC methods and helpful prompts.
Solana Model Context Protocol (MCP) Demo
This repository demonstrates a simple implementation of a Model Context Protocol (MCP) server for Solana development.
What is MCP?
The Model Context Protocol (MCP) is a standardized interface for AI models to interact with tools and resources. This demo showcases a simple MCP server implementation that provides:
- Basic RPC methods for Solana (getBalance, getAccountInfo, getTransaction)
- Some helpful prompts for Solana development
Prerequisites
- Node.js (v16 or higher recommended)
- pnpm package manager (v9.10.0 or compatible)
Installation
Clone this repository and install dependencies:
git clone https://github.com/solana-foundation/solana-dev-mcp.git
cd solana-dev-mcp
pnpm install
To run this server in the MCP inspector, use:
npx @modelcontextprotocol/inspector ts-node index.ts
Getting Started
-
Explore the code: The main implementation is in
index.ts, which sets up an MCP server with simple fetching tools and some prompts. -
Modify the server: You can extend the server by adding more tools, resources, and prompts.
-
Get ideas for extensions: Check out the Ideas Extending MCP for Solana Development section to get inspiration for new tools and resources to add.
Example Usage
This section explains how to use the Solana MCP server in Claude. Follow the same steps to use the Solana MCP server in Windsurf and Cursor.
Generate the configuration file
To use this Solana MCP server, you need to generate a configuration file that Claude can use to connect to the server. Run one of the following commands to generate the configuration file:
pnpm generate-configif you havets-nodeinstalled globallypnpm build && pnpm generate-config:jsif you don't havets-nodeinstalled globally
This will print a JSON config with the following content:
If you have ts-node:
{
"mcpServers": {
"solana-dev": {
"command": "ts-node",
"args": ["<full-path-to-repo>/index.ts"]
}
}
}
If you don't have ts-node installed globally:
{
"mcpServers": {
"solana-dev": {
"command": "node",
"args": ["<full-path-to-repo>/dist/index.js"]
}
}
}
Project Structure
index.ts- Main server implementationpackage.json- Project dependencies and metadatatsconfig.json- TypeScript configuration
Ideas Extending MCP for Solana Development
This MCP server implementation provides a foundation that you can extend or fork for your own Solana development needs. Here are some ideas to get you started:
Ideas for Extension
-
Priority Fee Estimator: Add a tool that estimates optimal priority fees for Solana transactions based on recent network activity. This could help users optimize transaction costs while ensuring timely processing.
-
Solana Verify Debugger: Create a tool that helps debug issues with
solana-verifyby providing more detailed information about the verification process. -
Solana Security.txt Inspector: Build a tool that extracts and displays the security.txt file information for a given Solana program, making it easier to contact the program's maintainers with security concerns.
-
Squads Helper for Program Deployment: Create a tool that automates the process of deploying and upgrading Solana programs, making it easier to manage program state across multiple environments.
-
Anchor-Error Explainer: Develop a tool that takes an error code and looks up the corresponding human-readable error message from the Anchor error code database.
-
Enhanced Prompts: Expand the server's prompt capabilities to provide more context-aware suggestions for Solana development tasks. For example, add prompts for common transaction patterns, account creation, or token operations.
-
Transaction Builder: Create tools that help construct complex transactions with multiple instructions, making it easier to interact with various Solana programs.
-
Custom RPC Endpoints: Allow configuration of custom RPC endpoints, including support for private RPC providers or local validators.
-
Program Deployment Helpers: Create tools that simplify the process of deploying and upgrading Solana programs.
-
Account & Transaction Explorer: Add a tool that takes an account or transaction ID and displays the contents in a human-readable format, similar to an explorer view. This could be useful for inspecting transaction data or account state without needing to manually decode the data.
-
Solana, Anchor, and Protocol Documentation: Add resources that load the Solana, Anchor, and Protocol documentation directly into the MCP editor, providing easy access to relevant information without needing to leave the editor. This could be implemented by fetching the documentation from the respective repositories and serving it as resources from the MCP server.
How to Contribute
If you've built an extension that might be useful to others, consider submitting a pull request to this repository. Make sure to follow these guidelines:
- Keep your code well-documented
- Include tests for new functionality
- Follow the existing code style
- Update the README with information about your addition
Security
This is a simple example and should not be used in production. MCP is a new standard, and lacks proper security measures.
Please be extremely careful when installing & trying out MCP servers from unknown developers.
Please use a sandboxed environment when trying out MCP servers, with no crucial information in it to prevent potential damage.
Verwandte Server
Alpha Vantage MCP Server
SponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Godot MCP
MCP server for interacting with the Godot game engine, providing tools for editing, running, debugging, and managing scenes in Godot projects.
seite
AI-native static site generator with built-in MCP server. Build sites, create content, apply themes, search docs, and deploy via Claude Code or any MCP client.
Vercel v0
Generate beautiful UI components using Vercel's v0 generative UI system.
Sapiom
One API key gives agents access to 80+ tools: web search, deep search, browser automation, screenshots, 400+ LLM models, image generation, text-to-speech, sound effects, and phone verification. Pay-per-use with spend governance built in.
Agent Engineering Bootcamp MCP
A server providing setup guidance for students learning agent development, with support for both Python and TypeScript.
T-IA Connect
A Model Context Protocol (MCP) bridge to programmatically control Siemens TIA Portal (PLC, blocks, tags, and HMI).
Claude Project Coordinator
Manage and coordinate multiple Xcode/Swift projects with features like project tracking, smart search, and analytics.
Arch Tools
53 production-ready AI tools via MCP with x402 USDC payments on Base L2 — web scraping, crypto data, AI generation, OCR, and more.
PyAutoGUI Server
An MCP server for PyAutoGUI that enables automated GUI testing and control, including mouse and keyboard actions, screenshots, and screen information.
analyze-coverage-mcp
MCP server that bridges LCOV coverage reports to AI agents.