Skip to main content
Glama

Solana Vault MCP

by olaxbt

Solana Vault MCP

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

概述

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

特征

  • 安全的 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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

安全的模型上下文协议服务器,使 AI 助手无需直接访问私钥即可与 Solana 区块链交互,支持余额检查、SOL 转账和交易历史记录检索等操作。

  1. 概述
    1. 特征
      1. 安装
        1. 先决条件
        2. 设置
      2. 用法
        1. 启动服务器
        2. API 端点
        3. MCP 操作
        4. 示例查询
      3. 发展
        1. 项目结构
        2. 运行测试
      4. 执照
        1. 贡献

          Related MCP Servers

          • -
            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 -
            219
            79
            Apache 2.0
            • Linux
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.
            Last updated -
            219
            15
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables AI models to interact with the Solana blockchain, providing RPC methods, wallet management, DeFi trading capabilities, and Helius API integration for enhanced Solana development.
            Last updated -
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface for operations like managing assets, executing token operations, and retrieving network information.
            Last updated -
            6
            TypeScript

          View all related MCP servers

          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