Quick Setup Guide
1. Configure MCP Settings
Add the following configuration to your project based on your IDE:
Add to your project's
.cursor/mcp.json
file or add globally by opening the command palette (Cmd/Ctrl + Shift + P
) and selecting
> Cursor Settings > MCP > Add new global MCP
server
:
{
"mcpServers": {
"solanaMcp": {
"url": "https://mcp.solana.com/sse"
}
}
}
For Windsurf, use the following configuration (note the serverUrl
instead of url
):
{
"mcpServers": {
"solanaMcp": {
"serverUrl": "https://mcp.solana.com/sse"
}
}
}
2. Verify Connection
Once configured, your IDE will automatically connect to
the MCP SSE server. You can verify the connection by opening
Composer in Agent Mode (Cmd + I
) and asking it "How do I implement CPIs in solana smart contracts with pinocchio?". You should see a card like so in the composer
sidebar:
Solana_Expert__Ask_For_Help
✓
3. Configure User Rules
Add the following to your user rules by going to the
command palette (Cmd/Ctrl + Shift + P
) and selecting
> Settings > Rules
:
<MCP_USE_GUIDELINE>
<INSTRUCTION>
If you are working on a Solana-related project. Make frequent use of the following MCP tools to accomplish your goals.
</INSTRUCTION>
<TOOLS>
The following Solana tools are at your disposal:
- "Solana Expert: Ask For Help": Use this tool to ask detailed questions about Solana (how-to, concepts, APIs, SDKs, errors). Provide as much context as possible when using it.
- "Solana Documentation Search": Use this tool to search the Solana documentation corpus for relevant information based on a query.
- "Ask Solana Anchor Framework Expert": Use this tool for any questions specific to the Anchor Framework, including its APIs, SDKs, and error handling.
</TOOLS>
</MCP_USE_GUIDELINE>
4. Start Using MCP Features
- Lookup Solana concepts, APIs, SDKs, errors, etc.
- Query Anchor framework documentation
- Ask for help with Solana development
Example Queries:
- "How are CPI events implemented in Anchor 0.31?"
- "Build an AMM that supports token-2022 and older tokens."
- "How can I implement a staking mechanism with time-locked rewards?"
- "What are the best practices for handling decimal values in Solana programs?"
🚀 Real-time Updates
Get up-to-date information about Solana documentation right inside your IDE
🔒 Secure Integration
Built with security in mind, minimizing sensitive information exposure