Skip to main content
Glama

Solana Vault MCP

使用 Python 实现安全 Solana 区块链钱包操作的模型上下文协议 (MCP)。

概述

Solana Vault MCP 通过标准化的模型上下文协议 (MCP) 接口为 Solana 区块链提供安全的钱包操作。它允许 AI 助手无需直接访问私钥即可与 Solana 区块链安全地交互。

Related MCP server: Solana MCP Server

特征

  • 安全的 Solana 钱包操作

  • SOL 余额检查

  • SOL 转移能力

  • 交易历史记录检索

  • 模型上下文协议兼容 API

  • 支持 Flask Web 服务器和 WebSocket 连接

  • 详细的日志记录和错误处理

安装

先决条件

  • Python 3.9+

  • 点子

设置

  1. 克隆存储库:

    git clone https://github.com/olaxbt/solana-vault-mcp.git
    cd solana-vault-mcp
  2. 创建并激活虚拟环境:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. 安装依赖项:

    pip install -r requirements.txt
  4. 根据.env.example创建.env文件:

    cp .env.example .env
  5. 编辑.env文件以添加您的 Solana 私钥和 RPC URL。

用法

启动服务器

python run.py

服务器将在您的.env文件中指定的端口上启动(默认值:5000)。

API 端点

  • GET / - 包含服务信息的欢迎页面

  • GET /health - 健康检查端点

  • GET /api/mcp/ping - MCP 服务健康检查

  • POST /api/mcp/query - 主要 MCP 查询端点

MCP 操作

Solana Vault MCP 支持以下操作:

  1. wallet.info - 获取钱包信息

  2. wallet.balance - 获取 SOL 余额

  3. wallet.transfer - 将 SOL 转移到另一个钱包

  4. wallet.transactions - 获取最近的交易

  5. wallet.token_balance - 获取特定代币的代币余额

示例查询

{
  "id": "request123",
  "action": "wallet.balance",
  "params": {}
}

回复:

{
  "id": "request123",
  "result": {
    "balance": 1.5,
    "currency": "SOL",
    "address": "YourSolanaPublicKey"
  }
}

发展

项目结构

solana-vault-mcp/
├── app/
│   ├── handlers/        # Action handlers
│   ├── routes/          # API routes
│   ├── services/        # Core services
│   └── utils/           # Utilities
├── logs/                # Log files
├── tests/               # Test cases
├── .env                 # Environment variables
├── .env.example         # Example environment file
├── requirements.txt     # Dependencies
├── run.py               # Main entry point
└── README.md            # Documentation

运行测试

pytest

执照

麻省理工学院

贡献

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

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

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olaxbt/solana-vault-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server