Cover image
Try Now
2025-04-10

由Solana Agent Kit提供动力的模型上下文协议服务器(https://github.com/sendaifun/solana-agent-kit)

3 years

Works with Finder

1

Github Watches

17

Github Forks

47

Github Stars

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: Quick Install (Recommended)

# Download the installation script
curl -fsSL https://raw.githubusercontent.com/sendaifun/solana-mcp/main/scripts/install.sh -o solana-mcp-install.sh

# Make it executable and run
chmod +x solana-mcp-install.sh && ./solana-mcp-install.sh --backup

This will start an interactive installation process that will guide you through:

  • Setting up Node.js if needed
  • Configuring your Solana RPC URL and private key
  • Setting up the Claude Desktop integration

Option 2: Install from npm ( recommend for clients like Cursor/Cline)

# Install globally
npm install -g solana-mcp

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

Option 3: Build from Source

  1. Clone this repository:
git clone https://github.com/sendaifun/solana-mcp
cd solana-mcp
  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.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

    Reviews

    4 (1)
    Avatar
    user_uF21kHpu
    2025-04-17

    As a loyal user of the solana-mcp application, I am thoroughly impressed by its seamless performance and robust features. Developed by sendaifun, this tool is an essential addition for anyone working within the Solana ecosystem. The comprehensive documentation provided on their GitHub page ensures easy setup and integration. The community support and frequent updates make it even more reliable. Highly recommended for maximizing productivity and efficiency.