This MCP Server for Solana allows Claude to interact with the Solana blockchain directly. It provides access to numerous Solana RPC methods, letting you retrieve blockchain data, check balances, and perform various chain operations through Claude's interface.
Before installing the MCP server, ensure you have:
Clone the repository:
git clone [email protected]:tywenk/mcp-sol.git
Navigate to the project directory:
cd mcp-sol
Install dependencies:
uv sync
Install the MCP server:
mcp install src/server.py
On macOS, you need to modify the Claude Desktop configuration file located at:
/Users/{user}/Library/Application Support/Claude
Edit the JSON configuration to include the MCP server with absolute paths:
{
"globalShortcut": "Alt+Space",
"mcpServers": {
"Solana Client": {
"command": "/Users/yourusername/.local/bin/uv",
"args": [
"--directory",
"/Users/yourusername/Developer/mcp-sol",
"run",
"--with",
"mcp",
"mcp",
"run",
"/Users/yourusername/Developer/mcp-sol/src/server.py"
]
}
}
}
Make sure to replace yourusername
with your actual username and adjust any paths as needed.
For an automated installation process, you can use Smithery:
npx -y @smithery/cli install @tywenk/mcp-solana --client claude
The Solana MCP Server provides access to numerous Solana RPC methods, including:
get_balance
- Get the balance of an accountget_account_info
- Get all information associated with an accountget_token_account_balance
- Get token balance for a specific accountget_token_accounts_by_delegate
- Get token accounts by delegateget_token_accounts_by_owner
- Get token accounts by ownerget_token_largest_accounts
- Get largest token accountsget_token_supply
- Get total supply of a tokenget_transaction
- Get transaction detailsget_block
- Get block detailsget_block_height
- Get current block heightget_block_time
- Get block timeget_blocks
- Get a range of blocksget_latest_blockhash
- Get the most recent blockhashget_signatures_for_address
- Get signatures for transactions involving an addressget_signature_statuses
- Check statuses of signaturesconfirm_transaction
- Confirm if a transaction is processedget_cluster_nodes
- Get information about the nodes in the clusterget_epoch_info
- Get current epoch informationget_epoch_schedule
- Get epoch schedule informationget_identity
- Get the identity of the nodeget_inflation_governor
- Get inflation parametersget_inflation_rate
- Get current inflation rateget_largest_accounts
- Get accounts with largest balancesget_recent_performance_samples
- Get recent performance samplesget_slot
- Get current slotget_slot_leader
- Get leader for current slotget_supply
- Get information about circulating supplyget_version
- Get node software versionget_vote_accounts
- Get vote accountsis_connected
- Check if connected to the networkrequest_airdrop
- Request an airdrop of SOLsend_transaction
- Send a transaction to the networkget_fee_for_message
- Calculate the fee for a messageTo use the Solana client in Claude Desktop:
Claude will use the appropriate Solana RPC methods to fetch the requested information and display it to you.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "Solana-Client" '{"command":"/Users/tywen/.local/bin/uv","args":["--directory","/Users/tywen/Developer/mcp-sol","run","--with","mcp","mcp","run","/Users/tywen/Developer/mcp-sol/src/server.py"]}'
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 Client": {
"command": "/Users/tywen/.local/bin/uv",
"args": [
"--directory",
"/Users/tywen/Developer/mcp-sol",
"run",
"--with",
"mcp",
"mcp",
"run",
"/Users/tywen/Developer/mcp-sol/src/server.py"
]
}
}
}
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 Client": {
"command": "/Users/tywen/.local/bin/uv",
"args": [
"--directory",
"/Users/tywen/Developer/mcp-sol",
"run",
"--with",
"mcp",
"mcp",
"run",
"/Users/tywen/Developer/mcp-sol/src/server.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect