Solana Agent Kit

Solana Agent Kit

A Model Context Protocol server for interacting with the Solana blockchain, powered by the [Solana Agent Kit](https://github.com/sendaifun/solana-agent-kit) - scriptscrypt/solana-mcp

远程shell执行
访问服务器

README

Solana Agent Kit MCP Server

npm version License: ISC

A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface. This implementation is based on the Solana Agent Kit and enables AI agents to perform blockchain operations seamlessly.

Overview

This MCP server extends Claude's capabilities by providing tools to:

  • Interact with Solana blockchain
  • Execute transactions
  • Query account information
  • Manage Solana wallets

The server implements the Model Context Protocol specification to standardize blockchain interactions for AI agents.

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (recommended), npm, or yarn
  • Solana wallet with private key
  • Solana RPC URL (mainnet, testnet, or devnet)

Installation

Option 1: Install from npm (Recommended)

# Install globally
npm install -g solana-mpc

# Or install locally in your project
npm install solana-mpc

Option 2: Build from Source

  1. Clone this repository:
git clone https://github.com/sendaifun/solana-mcp-server
cd solana-mcp-server
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm run build

Configuration

Environment Setup

Create a .env file with your credentials:

# Solana Configuration
SOLANA_PRIVATE_KEY=your_private_key_here
RPC_URL=your_solana_rpc_url_here
OPENAI_API_KEY=your_openai_api_key # OPTIONAL

Integration with Claude Desktop

To add this MCP server to Claude Desktop, follow these steps:

  1. Locate the Claude Desktop Configuration File

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the Configuration Create or edit the configuration file and add the following JSON:

    If you installed via npm (Option 1):

    {
      "mcpServers": {
        "solana-mcp": {
          "command": "npx",
          "args": ["solana-mcp"],
          "env": {
            "RPC_URL": "your_solana_rpc_url_here",
            "SOLANA_PRIVATE_KEY": "your_private_key_here",
            "OPENAI_API_KEY": "your_openai_api_key"  // OPTIONAL
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    

    If you built from source (Option 2):

    {
      "mcpServers": {
        "solana-mcp": {
          "command": "node",
          "args": ["/path/to/solana-mcp/build/index.js"],
          "env": {
            "RPC_URL": "your_solana_rpc_url_here",
            "SOLANA_PRIVATE_KEY": "your_private_key_here",
            "OPENAI_API_KEY": "your_openai_api_key"  // OPTIONAL
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    
  3. Restart Claude Desktop After making these changes, restart Claude Desktop for the configuration to take effect.

Project Structure

solana-agent-kit-mcp/
├── src/
│   ├── index.ts          # Main entry point
├── package.json
└── tsconfig.json

Available Tools

The MCP server provides the following Solana blockchain tools:

  • GET_ASSET - Retrieve information about a Solana asset/token
  • DEPLOY_TOKEN - Deploy a new token on Solana
  • GET_PRICE - Fetch price information for tokens
  • WALLET_ADDRESS - Get the wallet address
  • BALANCE - Check wallet balance
  • TRANSFER - Transfer tokens between wallets
  • MINT_NFT - Create and mint new NFTs
  • TRADE - Execute token trades
  • REQUEST_FUNDS - Request funds (useful for testing/development)
  • RESOLVE_DOMAIN - Resolve Solana domain names
  • GET_TPS - Get current transactions per second on Solana

Security Considerations

  • Keep your private key secure and never share it
  • Use environment variables for sensitive information
  • Consider using a dedicated wallet for AI agent operations
  • Regularly monitor and audit AI agent activities
  • Test operations on devnet/testnet before mainnet

Troubleshooting

If you encounter issues:

  1. Verify your Solana private key is correct
  2. Check your RPC URL is accessible
  3. Ensure you're on the intended network (mainnet, testnet, or devnet)
  4. Check Claude Desktop logs for error messages
  5. Verify the build was successful

Dependencies

Key dependencies include:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

推荐服务器

e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
AIO-MCP Server

AIO-MCP Server

🚀 集成了 AI 搜索、RAG 和多服务(GitLab/Jira/Confluence/YouTube)的一体化 MCP 服务器,旨在增强 AI 驱动的开发工作流程。来自 Folk。

精选
本地
https://github.com/Streen9/react-mcp

https://github.com/Streen9/react-mcp

react-mcp 与 Claude Desktop 集成,能够根据用户提示创建和修改 React 应用程序。

精选
本地
any-chat-completions-mcp

any-chat-completions-mcp

将 Claude 与任何 OpenAI SDK 兼容的聊天完成 API 集成 - OpenAI、Perplexity、Groq、xAI、PyroPrompts 等。

精选
Exa MCP Server

Exa MCP Server

一个模型上下文协议服务器,它使像 Claude 这样的人工智能助手能够以安全和受控的方式,使用 Exa AI 搜索 API 执行实时网络搜索。

精选
MySQL MCP Server

MySQL MCP Server

允许人工智能助手通过受控界面列出表格、读取数据和执行 SQL 查询,从而使数据库探索和分析更安全、更有条理。

精选
browser-use MCP server

browser-use MCP server

一个由人工智能驱动的浏览器自动化服务器,它实现了模型上下文协议,从而能够使用自然语言控制网页浏览器,以执行诸如导航、表单填写和视觉交互等任务。

精选
mcp-codex-keeper

mcp-codex-keeper

作为开发知识的守护者,为 AI 助手提供精心策划的最新文档和最佳实践访问权限。

精选
OpenRouter MCP Server

OpenRouter MCP Server

提供与 OpenRouter.ai 的集成,允许通过统一的界面访问各种 AI 模型。

精选
Supabase MCP Server

Supabase MCP Server

通过提供数据库管理、SQL查询执行和Supabase管理API访问工具,并内置安全控制,使Cursor和Windsurf能够安全地与Supabase数据库交互。

精选