Agentipy MCP Server for Claude Desktop

by niceberginc
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Used for environment management to store configuration values like API keys and wallet information

  • Repository hosting for the MCP server code that users can clone for installation

  • Supported platform for running the Claude Desktop with the MCP server integration

用于 Claude 桌面的 Agentipy MCP 服务器

模型上下文协议 (MCP) 服务器,为 Claude AI 提供链上工具,使其能够通过标准化接口与 Solana 区块链交互。此实现使用 Agentipy,使 AI 代理能够无缝执行区块链操作。

概述

该 MCP 服务器通过提供以下工具扩展了 Claude 的功能:

  • 与 Solana 区块链交互
  • 执行交易
  • 查询账户信息
  • 管理 Solana 钱包
  • 获取价格预测
  • 交易和质押代币
  • 部署新代币
  • 从 CoinGecko 获取代币信息
  • 使用 deBridge 执行跨链桥交易
  • 从 Pyth Network 获取实时价格数据
  • 从 CoinGecko 访问全面的代币信息
  • 监控热门代币和资金池
  • 追踪涨幅最大的股票和市场动向
  • 获取详细的代币价格数据和分析

该服务器实现了模型上下文协议规范,以标准化人工智能代理的区块链交互。

先决条件

  • Python 3.8 或更高版本
  • 已安装 Claude Desktop
  • 带有私钥的 Solana 钱包
  • Solana RPC URL(主网、测试网或开发网)
  • OpenAI API 密钥(可选)
  • Allora API 密钥(可选)
  • CoinGecko Pro API 密钥(可选)

安装

选项 1:快速安装(推荐)

# Clone the repository git clone https://github.com/niceberginc/agentipy-mcp cd agentipy-mcp # Create and activate virtual environment python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate` # Install dependencies pip install -r requirements.txt

选项 2:手动设置

  1. 创建虚拟环境:
python -m venv .venv source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
  1. 安装所需的软件包:
pip install agentipy>=2.0.8 cryptography>=3.4.7 python-dotenv>=0.17.1 web3>=7.8.0 allora_sdk>=0.2.0 mcp>=1.4.0

配置

环境设置

使用您的凭证创建一个.env文件:

# Solana Configuration SOLANA_PRIVATE_KEY=your_private_key_here RPC_URL=your_solana_rpc_url_here # Optional API Keys OPENAI_API_KEY=your_openai_api_key ALLORA_API_KEY=your_allora_api_key COINGECKO_PRO_API_KEY=your_coingecko_api_key

与 Claude Desktop 集成

要将此 MCP 服务器添加到 Claude Desktop,请按照以下步骤操作:

  1. 找到 Claude 桌面配置文件
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude\claude_desktop_config.json
  2. 添加配置创建或编辑配置文件并添加以下 JSON:

    注意:对于command字段,Unix/Mac 系统请使用run_mcp.sh ,Windows 系统请使用run_mcp.bat 。请确保使用系统上脚本文件的正确绝对路径。

    { "mcpServers": { "agentipy": { "command": "/path/to/your/run_mcp.sh", # Replace with .bat for Windows "env": { "RPC_URL": "your_solana_rpc_url_here", "SOLANA_PRIVATE_KEY": "your_private_key_here", "OPENAI_API_KEY": "your_openai_api_key", "ALLORA_API_KEY": "your_allora_api_key", "COINGECKO_PRO_API_KEY": "your_coingecko_api_key" }, "disabled": false, "autoApprove": ["GET_BALANCE", "GET_PRICE_PREDICTION"] } } }
  3. 重新启动 Claude Desktop完成这些更改后,重新启动 Claude Desktop 以使配置生效。

项目结构

agentipy-mcp/ ├── server.py # Main entry point ├── run_mcp.sh # Run script for Unix/Mac ├── run_mcp.bat # Run script for Windows ├── requirements.txt # Dependencies └── .env # Environment variables

可用工具

MCP 服务器提供以下区块链工具:

Solana 原生操作

  • GET_BALANCE - 检查钱包余额
  • TRANSFER - 在钱包之间转移代币
  • DEPLOY_TOKEN - 在 Solana 上部署新代币

Allora 行动

  • GET_PRICE_PREDICTION - 获取价格预测
  • GET_ALL_TOPICS - 获取可用主题

木星行动

  • STAKE_WITH_JUP - 使用 Jupiter 质押代币
  • TRADE_WITH_JUP - 使用 Jupiter 交易代币

DeBridge 行动

  • CREATE_DEBRIDGE_TRANSACTION - 使用 deBridge Liquidity Network API 创建跨链桥交易
  • EXECUTE_DEBRIDGE_TRANSACTION - 使用 deBridge Liquidity Network API 执行跨链桥交易
  • CHECK_TRANSACTION_STATUS - 使用 deBridge Liquidity Network API 检查跨链桥交易的状态

Pyth 动作

  • PYTH_GET_PRICE - 从 Pyth 获取硬币价格

CoinGecko 行动

  • COINGECKO_GET_TOKEN_INFO - 从 CoinGecko 获取代币信息
  • COINGECKO_GET_COIN_PRICE_VS - 从 Coingecko 获取特定货币的硬币价格
  • COINGECKO_GET_TOP_GAINERS - 从 Coingecko 获取最大赢家
  • COINGECTO_GET_TRENDING_POOLS - 从 Coingecko 获取热门矿池
  • COINGECKO_GET_TRENDING_TOKENS - 从 Coingecko 获取热门代币
  • COINGECKO_GET_TOKEN_PRICE_DATA - 从 Coingecko 获取代币价格数据
  • COINGECKO_GET_LATEST_POOLS - 从 Coingecko 获取最新的矿池

安全注意事项

  • 确保你的私钥安全,切勿与他人分享
  • 使用环境变量来获取敏感信息
  • 考虑使用专用钱包进行AI代理操作
  • 定期监控和审计AI代理活动
  • 在主网之前在 devnet/testnet 上进行测试操作

故障排除

如果您遇到问题:

  1. 验证您的 Solana 私钥是否正确
  2. 检查您的 RPC URL 是否可访问
  3. 确保所有依赖项都正确安装
  4. 验证您的.env文件是否包含正确的凭据
  5. 检查 Claude Desktop 日志中的错误消息

依赖项

关键依赖项包括:

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

  1. 分叉存储库
  2. 创建你的功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add some amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

执照

该项目已获得 MIT 许可。

-
security - not tested
F
license - not found
-
quality - not tested

模型上下文协议服务器使 Claude AI 能够与 Solana 区块链交互,从而允许其执行交易、查询账户、管理钱包、获取价格预测、交易代币以及访问各种区块链数据源。

  1. Overview
    1. Prerequisites
      1. Installation
        1. Option 1: Quick Install (Recommended)
        2. Option 2: Manual Setup
      2. Configuration
        1. Environment Setup
        2. Integration with Claude Desktop
      3. Project Structure
        1. Available Tools
          1. Native Solana Actions
          2. Allora Actions
          3. Jupiter Actions
          4. DeBridge Actions
          5. Pyth Actions
          6. CoinGecko Actions
        2. Security Considerations
          1. Troubleshooting
            1. Dependencies
              1. Contributing
                1. License
                  ID: e66q3b51gi