Solana MCP Server is a tool that allows you to interact with the Solana blockchain using your own private key. It provides a Model Context Protocol (MCP) server that enables simple blockchain operations like checking balances and transferring SOL.
To install Solana MCP for Claude Desktop automatically:
npx -y @smithery/cli install @Grandbusta/solana-mcp --client claude
git clone https://github.com/Grandbusta/solana-mcp.git
npm install
npm run build
keypair.json
anywhere on your system and copy your private key into it. You can reference the example-keypair.json file as a template.Note: The RPC endpoint is set to api.devnet.solana.com
by default. To use a different endpoint, modify the run.sh
file.
To integrate with Cursor:
/path/to/your/solana-mcp/run.sh /path/to/your/keypair.json
Example command:
/Users/username/projects/solana-mcp/run.sh /Users/username/Documents/keypair.json
Returns the latest slot number on the Solana blockchain:
368202671
Returns your wallet address:
5GTuMBag1M8tfe736kcV1vcAE734Zf1SRta8pmWf82TJ
Returns your wallet balance in multiple formats (Lamports, SOL, and USD):
{
"lamportsBalance": "4179966000",
"solanaBalnce": 4.179966,
"usdBalance": "553.0513"
}
Transfers SOL to a recipient address and returns transaction details:
{
"blockTime": "1742316463",
"meta": {
"computeUnitsConsumed": "150",
"err": null,
"fee": "5000",
"innerInstructions": [],
"loadedAddresses": {
"readonly": [],
"writable": []
},
"logMessages": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
],
"postBalances": [
"4179966000",
"819999000",
"1"
],
"postTokenBalances": [],
"preBalances": [
"4399970000",
"600000000",
"1"
],
"preTokenBalances": [],
"rewards": [],
"status": {
"Ok": null
}
},
"slot": "368211978",
"transaction": {
"message": {
"accountKeys": [
"6qhddtBoEHqTc3VM35a3rb3aLUe6vDQfmLigo2G4r5s1",
"5GTuMBag1M8tfe736kcV1vcAE734Zf1SRta8pmWf82TJ",
"11111111111111111111111111111111"
],
"addressTableLookups": [],
"header": {
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 1,
"numRequiredSignatures": 1
},
"instructions": [
{
"accounts": [
0,
1
],
"data": "3Bxs452Q9hdvHuwd",
"programIdIndex": 2,
"stackHeight": null
}
],
"recentBlockhash": "BLqtPS9BHPp9CRFTrVAsrxFMWC98VTUAQ3vi12bSquLo"
},
"signatures": [
"3bLyqbPn26ofkaxSAVqadQnHqXu9hyoryixmKCn69nunKg2cSryDVAWnfCcYPcGtjSmXcMHfrzc3bw25zFTabXvs"
]
},
"version": "0"
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "solana-mcp" '{"command":"/path/to/your/solana-mcp/run.sh","args":["/path/to/your/keypair.json"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"solana-mcp": {
"command": "/path/to/your/solana-mcp/run.sh",
"args": [
"/path/to/your/keypair.json"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"solana-mcp": {
"command": "/path/to/your/solana-mcp/run.sh",
"args": [
"/path/to/your/keypair.json"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect