Solana MCP Wallet Agent API

by MindLayer25
MIT License

Integrations

  • Manages environment variables for configuration including port settings, environment type, Solana RPC URL, and wallet private keys.

  • Serves as the foundation for this API server, providing HTTP routing and middleware capabilities for all wallet operations.

  • Provides version control for the project, supporting the contribution workflow outlined in the README.

Solana MCP 钱包代理 API

用于 Solana 区块链钱包操作的完整 Express API。此 API 提供管理 Solana 钱包、转移 SOL 以及使用 SPL 代币的功能。

特征

  • 🔐钱包管理:创建和管理 Solana 钱包
  • 💰 SOL 转账:在钱包之间转移 SOL
  • 🪙代币管理:创建、铸造和转移 SPL 代币
  • 📚 API 文档:交互式 Swagger 文档
  • 🔄错误处理:强大的错误处理系统
  • 🧪开发就绪:易于设置和使用

先决条件

  • Node.js(v16+)
  • npm 或 yarn
  • [可选] Solana CLI 工具用于额外测试

安装

  1. 克隆存储库:
git clone https://github.com/MindLayer25/Wallet-MCP-Agent.git cd Wallet-MCP-Agent
  1. 安装依赖项:
npm install
  1. 在根目录中创建一个.env文件,其内容如下:
PORT=3000 NODE_ENV=development # Solana connection (devnet by default) SOLANA_RPC_URL=https://api.devnet.solana.com # For your wallet - get this from Solana keygen or a wallet export (JSON format) WALLET_PRIVATE_KEY=

发展

启动开发服务器:

npm run dev

服务器将从http://localhost:3000启动并启用热重加载。

构建和生产

构建项目:

npm run build

启动生产服务器:

npm start

API 文档

服务器运行后,请访问 Swagger 文档:

http://localhost:3000/api-docs

该文档通过请求/响应示例提供了所有可用端点的完整概述。

API 端点

钱包端点

方法端点描述
邮政/api/wallet创建新钱包
得到/api/wallet/:publicKey获取钱包信息
邮政/api/wallet/transfer将 SOL 转移到另一个钱包

令牌端点

方法端点描述
邮政/api/wallet/token创建新的 SPL 令牌
邮政/api/wallet/token/mint将代币铸造到某个地址
邮政/api/wallet/token/transfer将代币转移到另一个钱包

安全注意事项

  • 重要提示:本项目使用环境变量作为密钥。在生产环境中,您应该使用合适的密钥管理服务。
  • 切勿在客户端代码中暴露您的私钥。
  • 对于生产,请考虑实施额外的身份验证和授权机制。

Solana 集成

此 API 与 Solana 区块链交互以:

  1. 创建和管理钱包
  2. 在钱包之间转移 SOL
  3. 创建新的 SPL 代币
  4. 将代币铸造到地址
  5. 在钱包之间转移代币

错误处理

该 API 包括全面的错误处理,具有以下特点:

  • 开发模式下的详细错误消息
  • 生产环境中的清理错误消息
  • 正确的 HTTP 状态代码
  • 操作错误与编程错误的区别

贡献

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

执照

该项目根据 ISC 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

支持

如需支持,请在存储库中创建问题或联系存储库维护人员。

-
security - not tested
A
license - permissive license
-
quality - not tested

为 Solana 区块链提供完整的钱包管理功能,使用户能够创建钱包、转移 SOL 并通过 RESTful API 使用 SPL 代币。

  1. 特征
    1. 先决条件
      1. 安装
        1. 发展
          1. 构建和生产
            1. API 文档
              1. API 端点
                1. 钱包端点
                2. 令牌端点
              2. 安全注意事项
                1. Solana 集成
                  1. 错误处理
                    1. 贡献
                      1. 执照
                        1. 支持

                          Related MCP Servers

                          • -
                            security
                            A
                            license
                            -
                            quality
                            A Model Context Protocol server that provides Claude with comprehensive access to Solana blockchain data via the Helius API, enabling operations like checking wallet balances, retrieving blockchain information, and interacting with tokens and NFTs.
                            Last updated -
                            119
                            8
                            TypeScript
                            MIT License
                            • Apple
                            • Linux
                          • -
                            security
                            A
                            license
                            -
                            quality
                            A server that enables interaction with the Solana blockchain, providing access to over 40 Solana RPC methods including getting balances, transaction details, block information, and sending transactions.
                            Last updated -
                            Python
                            MIT License
                            • Apple
                          • A
                            security
                            F
                            license
                            A
                            quality
                            A server that provides simple RPC endpoints for common Solana blockchain operations, allowing users to check balances, get account information, and transfer SOL between accounts.
                            Last updated -
                            5
                            TypeScript
                          • -
                            security
                            A
                            license
                            -
                            quality
                            A Model Context Protocol server that enables Claude AI to interact with the Solana blockchain through a standardized interface, providing tools for transactions, account queries, and wallet management.
                            Last updated -
                            59
                            72
                            Apache 2.0
                            • Linux
                            • Apple

                          View all related MCP servers

                          ID: 6p1b2c9qb6