-
Add the Solana MCP server. If
npxisn’t found, Node may be managed by a version manager that only loads in interactive shells; try loading it (nvm:source ~/.nvm/nvm.sh, fnm:eval "$(fnm env)"). If there’s still nonpx, don’t install Node: the direct setup below doesn’t need it.- With
npx: runnpx add-mcp https://mcp.solana.com/mcp -n solana-mcp -g -y. It finds the agents installed on this machine and adds the server to each, without prompting. - Without
npx, or ifadd-mcpfails, add it to the agent you’re running in:- Claude Code:
claude mcp add --transport http solana-mcp https://mcp.solana.com/mcp - Codex:
codex mcp add solana-mcp --url https://mcp.solana.com/mcp - Cursor: add
{"mcpServers": {"solana-mcp": {"url": "https://mcp.solana.com/mcp"}}}to.cursor/mcp.json. - VS Code: add
{"servers": {"solana-mcp": {"type": "http", "url": "https://mcp.solana.com/mcp"}}}to.vscode/mcp.json. - Windsurf: add
{"mcpServers": {"solana-mcp": {"serverUrl": "https://mcp.solana.com/mcp"}}}to~/.codeium/windsurf/mcp_config.json.
- Claude Code:
- With
-
Install the Solana skill. First check whether
solana-devis already installed: if you havenpx, runnpx skills listandnpx skills list -g; either way, look for asolana-devfolder in your agent’s skills directories (for example.claude/skills/or~/.claude/skills/).- Not installed, with
npx: runnpx skills add https://github.com/solana-foundation/solana-dev-skill -y. - Not installed, without
npx: use the skill’s install script, which only needsgitandbash. From the project folder, rungit clone --depth 1 https://github.com/solana-foundation/solana-dev-skill /tmp/solana-dev-skill && bash /tmp/solana-dev-skill/install.sh --project. It copies the skill into.agents/skills/and.claude/skills/. - Installed: compare
metadata.versionin itsSKILL.mdwith the latest in the upstream SKILL.md. If it’s current, leave it. - Older, and listed by
npx skills list: update it in place withnpx skills update solana-dev -y. - Older, and not managed by the skills CLI (for example a symlink into a dotfiles repo): don’t overwrite it or write through the link. Tell the user both versions and where the link points, and ask how they want to update it.
- Not installed, with
-
Check it works. If the Solana MCP tools are available to you, search the docs for “transaction fees” and summarise the answer in one sentence. If they aren’t loaded yet, check that the server responds over HTTP instead:
If that returns results, the setup worked; tell the user to restart the agent so it loads the Solana MCP tools.
-
Tell the user what you did in two lines, including whether they need to restart. Then offer to start the Quickstart (
/developers/docs/quickstart): check a devnet balance, send test dollars (USDC), create an asset, send it to someone, and freeze their account. Ask before running anything that spends SOL or USDC. The Quickstart only uses devnet.
Set up a coding agent for Solana
Do these steps in order. Run commands in the user’s project folder. Ask before changing anything outside it.
In most agents, Claude Code included, an MCP server added during a session only loads in the next session. So this setup normally ends with the user restarting the agent. That’s expected, not a failure.