Solana MCP server in VS Code and Windsurf: config files that work

VS Code and Windsurf both run MCP servers for their agents, but they use different file names and different top-level keys. Here are working configs for a read-only Solana server in each, with the RPC key kept out of anything you commit.

VS Code (GitHub Copilot agent mode)

Fastest: one command

code --add-mcp '{"name":"solana","type":"stdio","command":"npx","args":["-y","github:blixvip/solana-readonly-mcp"]}'

This adds the server to your user profile, so it is available in every workspace. It uses the public RPC.

Per workspace: .vscode/mcp.json

VS Code's file uses a servers key (not mcpServers) and a type on each server. The inputs block makes VS Code ask for the RPC URL the first time the server starts and store it securely, so the key is never written into the file and the file is safe to commit:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "solana-rpc-url",
      "description": "Solana RPC URL (leave empty for the public mainnet endpoint)",
      "password": true
    }
  ],
  "servers": {
    "solana": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "github:blixvip/solana-readonly-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "${input:solana-rpc-url}"
      }
    }
  }
}

Leave the prompt empty to use the public mainnet endpoint. Start the server from the Start link VS Code shows above it in the file, or with MCP: List Servers in the Command Palette. Then open Copilot Chat in agent mode; the nine solana tools appear in the tools picker.

Newer Copilot setups also read a workspace-root .mcp.json with the mcpServers layout shown below for Windsurf.

Windsurf

Windsurf reads ~/.codeium/windsurf/mcp_config.json (on Windows, %USERPROFILE%\.codeium\windsurf\mcp_config.json). You can open it from the Cascade panel's MCP settings. It uses the same mcpServers layout as Claude Desktop and Cursor:

{
  "mcpServers": {
    "solana": {
      "command": "npx",
      "args": [
        "-y",
        "github:blixvip/solana-readonly-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com"
      }
    }
  }
}

On Windows, if the server fails to start with ENOENT, use "command": "cmd" and "args": ["/c", "npx", "-y", "github:blixvip/solana-readonly-mcp"]. Press refresh in the MCP panel after saving.

Windsurf's editor is now sold as Devin Desktop. There, the user-level file is ~/.config/devin/mcp_config.json and the project file is .devin/mcp_config.json; the mcpServers block above works unchanged.

Use your own RPC endpoint

The default is the Solana Foundation's free public endpoint, https://api.mainnet-beta.solana.com. It is rate limited and refuses getTokenLargestAccounts, so get_largest_token_holders fails there. The free plans of Helius, QuickNode, Alchemy and Triton serve everything; put the URL with its key in SOLANA_RPC_URL. Devnet works too: https://api.devnet.solana.com. The server never prints the URL, only its host.

Which key goes where

ClientFileTop-level key
VS Code.vscode/mcp.json or user mcp.jsonservers (+ type: "stdio")
Windsurf~/.codeium/windsurf/mcp_config.jsonmcpServers
Devin Desktop~/.config/devin/mcp_config.jsonmcpServers
Cursor~/.cursor/mcp.jsonmcpServers
Claude Desktopclaude_desktop_config.jsonmcpServers

Pasting a Cursor config into VS Code is the most common reason the server "does nothing": VS Code ignores mcpServers in .vscode/mcp.json.

Using another editor?

Zed, JetBrains and others run stdio MCP servers too. A config page for them is an open issue; if you use one, a pull request with a tested config is very welcome.

Want it done for you?

This is the small, open version. Blix is the AI-powered Solana memecoin terminal it comes from: every pump.fun launch live, AI coin ratings, narratives, wallet and X tracking, and one-click trading with 0% fees. There is a public API and an MCP server too.

Start trading at blixvip.comJoin the Discord

Help build it

solana-readonly-mcp is open source and takes pull requests. There are good first issues with step-by-step instructions, and setup is git clone and npm test. If it helped, a star on GitHub helps other developers find it.

More guides

How to give Claude access to Solana data with MCPsolana-readonly-mcpSolana MCP server for Cursor: setupsolana-readonly-mcpWhat is a good Solana priority fee right now (and how to measure it)solana-priority-feeHow to calculate a Solana token's top 10 holders percentagesol-holdersHow to stop Solana RPC 429 errors (Too Many Requests)solana-rpc-pool