drio
Open app

Solana Model Context Protocol (MCP) Demo

Source

Solana Model Context Protocol (MCP) Demo

Catalog onlyCatalog onlySTDIO

Overview

The Solana Model Context Protocol (MCP) Demo is a repository that showcases a simple implementation of a Model Context Protocol server designed for Solana development, enabling AI models to interact with tools and resources.

To use the Solana MCP, clone the repository, install the dependencies, and run the server using the provided commands. You can also generate a configuration file for integration with other tools like Claude, Windsurf, and Cursor.

  • Basic RPC methods for Solana (getBalance, getAccountInfo, getTransaction) - Helpful prompts for Solana development - Extensible server for adding more tools and resources
  1. Developing and testing Solana applications.
  2. Integrating AI models with Solana tools.
  3. Creating custom RPC endpoints for specific needs.

Add to your AI client

Use these steps to connect Solana Model Context Protocol (MCP) Demo in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "solana-dev-mcp-solana-foundation": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "solana-dev-mcp-solana-foundation": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "solana-dev-mcp-solana-foundation": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "solana-dev-mcp-solana-foundation": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "solana-dev-mcp-solana-foundation": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "solana-dev-mcp-solana-foundation": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-solana-dev-mcp-solana-foundation"
      ]
    }
  }
}

FAQ

What is the purpose of the MCP?

The MCP standardizes how AI models interact with tools and resources, making it easier for developers to build applications.

Is there a guide for extending the MCP?

Yes! The repository includes ideas and guidelines for extending the MCP server with new tools and features.

What are the prerequisites for running the MCP server?

You need Node.js (v16 or higher) and the pnpm package manager.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2636,"uuid":"b1cccb18-cbe6-435b-89a1-99105881a714","name":"solana-dev-mcp","title":"Solana Model Context Protocol (MCP) Demo","description":"Solana Model Context Protocol (MCP) Demo","avatar_url":"https://avatars.githubusercontent.com/u/58729655?v=4","created_at":"2025-03-13T09:19:22.867Z","updated_at":"2025-03-13T09:39:31.032Z","status":"created","author_name":"solana-foundation","author_avatar_url":"https://avatars.githubusercontent.com/u/58729655?v=4","tags":"mcp,solana,mcp-server","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/solana-foundation/solana-dev-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"4\",\"license\":\"MIT license\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-10 09:25:32\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]