Skip to content
Chapters

Build

Coding with AI: the Solana MCP and skills

The official Solana MCP and skill, and the rules that stop the model writing 2023 code.

This is the point that saves the most time, and does the most damage if it is not set up: without current context, the model writes @solana/web3.js v1 and two-year-old Anchor.

1. The Solana MCPmcp.solana.com. Connects to Claude Code, Cursor, Windsurf or any MCP client. It gives the model: up-to-date documentation, semantic search over the docs and Stack Exchange, and an autofixer that reviews Anchor and Pinocchio programs.

2. The official skillsolana-foundation/solana-dev-skill:

npx skills add solana-foundation/solana-dev-skill

Installs into your agent (Claude Code, Copilot, Cursor) the rules of modern Solana development: Kit v7+ as the client, Anchor 1.x, Surfpool/LiteSVM for tests, Codama for codegen, the version matrix, the security checklist and the list of common errors with their fixes. It activates on its own when you talk about wallets, transactions, programs or the toolchain.

3. Skills per protocolsolana.com/skills. Beyond the official one there are community skills for Jupiter, Raydium, Orca, Kamino, Meteora, Metaplex, Helius, Pyth, Switchboard, Squads, Light Protocol, MagicBlock, Surfpool and more. They are third-party: review them before using them.

4. Rules for the prompt

  • Pin versions: "Anchor at the version avm installed; @solana/kit v8, not web3.js v1; Next.js 16 or whatever the template ships."
  • Paste it the IDL (target/idl/<program>.json) before asking for the client.
  • Ask it for tests, and to run anchor test.
  • Do not ask it to decide what goes onchain. That one is yours; the model says yes to everything.
  • Never give it a seed phrase or a keypair. Have it simulate before sending. Have it point at devnet unless you say otherwise.