All articles
solanamcpaiagentsanchorpinocchiodocsdeveloper-tools

Solana Developer MCP: live docs + program autofixer for coding agents

mcp.solana.com is a remote MCP server for AI coding agents: Solana documentation retrieval, semantic search, expert Q&A, and program_autofixer for Anchor and Pinocchio Rust — no API key, streamable HTTP.

Share
devrels.xyz/a/196short link

Solana Developer MCP is a remote Model Context Protocol server for coding agents: current Solana documentation retrieval, semantic search, how-to help grounded in those docs, and a Program autofixer for Anchor and Pinocchio Rust.

Hub: mcp.solana.com. Endpoint: https://mcp.solana.com/mcp (streamable HTTP). No API key required when the client supports remote HTTP MCP. Related AI surface: solana.com/ai.

Why it exists

Agent models drift from live Solana docs. Framework APIs (Anchor constraints, Token-2022, Kit vs web3.js) change faster than training cutoffs. The Developer MCP is the Foundation’s answer: prefer retrieved canonical docs and structured program checks over “what the model remembers.”

That pairs with other agent tooling in the ecosystem (Allium MCP, Range MCP, project-specific servers) but stays focused on Solana developer documentation and on-chain program Rust quality— not wallet balances or market data.

Tools (live names)

The server currently exposes five MCP tools:

  • list_sections — indexed Solana documentation sources with section tags and use cases. Start here for non-trivial questions so you get the right source/section ids.
  • get_documentation — fetch canonical docs by source id, section id, or an array of ids.
  • Solana_Documentation_Search — semantic search over the docs corpus for narrow questions (e.g. Token-2022 transfer hook account requirements).
  • Solana_Expert__Ask_For_Help — how-to and debugging answers with retrieved docs context (include failed tx logs when debugging).
  • program_autofixer — analyzes Solana program Rust for Anchor and Pinocchio security antipatterns; returns structured issues and fix suggestions. Args include code, optional filename, optional framework (auto | anchor | pinocchio).

Setup

Codex CLI

bash
codex mcp add solana-mcp --url https://mcp.solana.com/mcp
codex mcp list   # confirm solana-mcp

Claude Code

bash
claude mcp add --transport http solana-mcp https://mcp.solana.com/mcp
# In Claude Code: /mcp — expect the five tools listed above

Cursor

Global ~/.cursor/mcp.json or project .cursor/mcp.json:

json
{
  "mcpServers": {
    "solanaMcp": {
      "url": "https://mcp.solana.com/mcp"
    }
  }
}

Windsurf uses a similar MCP config shape (serverUrl in its mcp config). VS Code: Command Palette → MCP user configuration — same remote URL pattern when HTTP MCP is supported.

Agent instructions (AGENTS.md)

The site publishes a paste-ready block. Core rules for agents:

text
For Solana-related work, prefer the Solana Developer MCP tools over model memory.

Use list_sections first for non-trivial Solana questions so you can find the
right documentation source ids and section ids.

Use get_documentation when you need canonical docs for a specific source,
framework, library, or ecosystem area. Use Solana_Documentation_Search or
Solana_Expert__Ask_For_Help for narrow how-to questions, errors, or API usage.

Whenever you write or modify Solana program Rust, call program_autofixer before
returning code. It accepts code, optional filename, and optional framework
(auto, anchor, or pinocchio). Apply the suggested fixes, then call
program_autofixer again. Repeat until require_another_tool_call_after_fixing
is false.

Put that in AGENTS.md (Codex/OpenAI-style agents). Cursor project rules use .cursor/rules/*.mdc (.cursorrules is legacy). The important behavioral loop is: write Rust → autofixer → apply → autofixer again until the tool says another pass is not required.

Example agent tasks

  • Canonical docslist_sections, then get_documentation for current Anchor account constraints.
  • Semantic search — Token-2022 transfer hook account requirements via Solana_Documentation_Search.
  • Debugging — failed transaction log into Solana_Expert__Ask_For_Help with the program error output.
  • Rust review — run program_autofixer on a Pinocchio or Anchor instruction before the agent returns a patch.

How this fits a Solana repo

text
Your agent (Codex / Claude Code / Cursor / …)
        │  MCP tools
        ▼
https://mcp.solana.com/mcp
        │
        ├─ docs corpus (list / get / search / expert)
        └─ program_autofixer (Anchor + Pinocchio)

Local repo still owns: build, test, deploy keys, app business logic

MCP does not replace cargo test, LiteSVM, or Surfpool. It reduces wrong-by-default docs quotes and catches common program security smells before code review. Keep CI as the source of truth for “merges.”

Related on DevRels

Resources

Bottom line

Solana Developer MCP is the official remote MCP for agentic Solana coding: live docs tools plus an Anchor/Pinocchio autofixer, one URL, no key. Add the server, paste the AGENTS.md rules, and make “docs via MCP + autofixer before return” the default path for Solana work in your agent workflow.

Keep reading

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.

Solana Developer MCP: live docs + program autofixer for coding agents | devrels.xyz