Remote MCP server

Current Solana docs and Rust checks for coding agents

Connect your MCP client to live Solana documentation retrieval, semantic search, and the Rust autofixer for Anchor and Pinocchio program checks.

Setup

Use the direct HTTP endpoint when your client supports it. No API key is required.

1

Add the server

Run this in a terminal where the Codex CLI is installed:

codex mcp add solana-mcp --url https://mcp.solana.com/mcp
2

Verify the connection

List configured MCP servers and confirm solana-mcp appears:

codex mcp list
3

Add project instructions

Put the agent instructions below in AGENTS.md when you want Codex to route Solana work through this MCP server consistently.

Tools

The live server currently exposes these exact MCP tool names.

list_sections

Lists indexed Solana documentation sources with section tags and use cases.

get_documentation

Fetches canonical docs by source id, section id, or an array of ids.

Solana_Documentation_Search

Runs semantic search over the Solana docs corpus for narrow questions.

Solana_Expert__Ask_For_Help

Answers Solana how-to and debugging questions with retrieved docs context.

Agent Instructions

Add the matching file for your agent. Cursor project rules use .cursor/rules/*.mdc; .cursorrules is legacy.

Add this to AGENTS.md. The key rule is the Rust autofixer loop: call it before returning Solana program Rust, apply fixes, and call it again until another pass is not required.
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 `rust_autofixer` before
returning code. It accepts `code`, optional `filename`, and optional `framework`
(`auto`, `anchor`, or `pinocchio`). Apply the suggested fixes, then call
`rust_autofixer` again. Repeat until `require_another_tool_call_after_fixing`
is false.

Example Requests

Canonical docs

Use list_sections, then fetch the current Anchor docs for account constraints.

Semantic search

Search the docs for Token-2022 transfer hook account requirements.

Solana debugging

Ask for help with a failed transaction log and include the program error output.

Rust review

Run rust_autofixer on this Pinocchio instruction before returning the patch.