Integrations
Uses environment variables for storing and accessing API keys and configuration settings securely without hardcoding them in the source code.
Implements the MCP server using FastAPI as the framework, providing endpoints for payment creation and status verification that bridge Claude with the Gotas Commerce API.
Built using Python for implementing the MCP server functionality, handling API requests, and processing payment data from the Gotas Commerce platform.
放弃商务 API 和 MCP 集成
使用 MCP(模型上下文协议)实现加密货币支付集成的强大解决方案,允许像 Claude 这样的 AI 助手通过 Gotas Commerce API 创建和验证 USDT 交易。
🚀 概述
该项目在人工智能助手和加密货币支付服务之间架起了一座桥梁。通过实现 MCP 服务器,助手无需专门的区块链技术知识即可生成支付链接、检查交易状态并获取有关 USDT 支付的详细信息。
✨ 资源
MCP 工具
create-payment
创建一个新的 USDT 支付交易并返回所有必需的详细信息,包括支付 URL 和钱包地址。
参数:
amount
:付款金额(例如:100.50)currency
:货币代码(目前仅为“USDT”)return_url
:付款后重定向客户的 URLdescription
:可选付款描述
返回:
- 包含所有付款详细信息的完整 JSON 对象:
- 唯一付款ID
- 付款网址
- 钱包地址
- 状态(待处理、完成、失败、过期)
- 创建日期和到期日期
- 其他相关元数据
check-payment-status
它通过唯一标识符检查现有付款的当前状态。
参数:
payment_id
:待验证付款的唯一 ID
返回:
- 具有当前付款状态的完整 JSON 对象
- 创建、到期和完成的时间戳信息(如适用)
- 区块链交易哈希(付款确认时)
MCP 资源
payment-status://{payment_id}
它提供格式化和简化版本的付款状态作为 MCP 资源。
返回:
- 包含最相关付款信息的格式化文本
- 标识符、状态、值、时间戳和描述
MCP 提示
create-payment-prompt
引导提示可帮助用户提供创建新付款所需的信息。
🔧 架构
MCP 服务器充当 Drops Commerce API 的抽象层,将 API 功能转换为 Claude 等 AI 助手可以轻松使用的工具、资源和提示。
📋 先决条件
- Python 3.8 或更高版本
- Gotas Commerce API 密钥(获取地址: commerce.gotas.com )
- 访问与 MCP 兼容的助手(例如 Claude)
🔌 安装
- 克隆此存储库:Copy
- 安装依赖项:或者使用自动安装脚本:CopyCopy
- 配置环境变量:
- 使用以下值创建
.env
文件:Copy
- 使用以下值创建
🏃♂️ 执行
MCP 服务器
运行服务器以使工具可通过 MCP 访问:
与 Claude Desktop 集成
直接与 Claude Desktop 一起使用:
或者,手动安装:
直接 API 使用(测试脚本)
对于不使用向导的直接测试:
- 创建付款:
python test_client.py
- 检查状态:
python check_payment.py
📊 付款流程
- 付款初始化:
- 服务员从用户处获取金额和其他付款详细信息。
- 向导使用所需参数调用
create-payment
工具 - Gotas Commerce 中创建了一笔新付款
- 支付链接返回给用户
- 付款流程:
- 用户访问提供的付款链接
- 用户将USDT转入显示的钱包地址
- Gotas Commerce 监控区块链以确认交易
- 状态检查:
- 助手可以通过调用
check-payment-status
status 来检查付款状态 - 状态可以是:待定、已完成、已过期或失败。
- 当付款确认后,区块链交易哈希即可提供。
- 助手可以通过调用
🔍 技术规格
API 详细信息
删除 Commerce API 端点:
- 创建付款
POST /api/v1/payments
- 请求正文:Copy
- 查看付款状态
GET /api/v1/payments/{payment_id}
MCP 通信
- 传输:SSE(服务器发送事件)
- 格式:JSON,用于助手和 MCP 服务器之间的通信
- 身份验证:API 密钥存储为环境变量
📂 项目结构
🔒 安全
- API 密钥存储为环境变量,而不是源代码
- 与 Gotas Commerce API 的通信通过 HTTPS 完成
- MCP 服务器在发送至 API 之前验证所有参数
- 适当的错误处理以避免泄露敏感信息
🧩 可扩展性
该项目旨在轻松扩展:
- 新功能:添加新的 MCP 工具,实现服务器上用
@mcp.tool()
装饰的功能 - 与其他服务的集成:该架构允许您轻松集成 Gotas Commerce 之外的其他服务
- 新币支持:该框架准备在未来支持除 USDT 之外的其他加密货币
📚 使用示例
创建付款(通过 Claude)
检查状态(通过 Claude)
📞 支持与联系
如需支持或其他信息,请联系 Gotas 开发团队或在 GitHub 存储库中打开问题。
📜 许可证
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
人工智能助手和加密支付服务之间的桥梁,可通过 Drops Commerce API 创建和验证 USDT 交易。
Related MCP Servers
- -securityFlicense-qualityEnables secure interactions with cryptocurrency daemon RPC interfaces through AI assistants, supporting transaction management, wallet operations, and daemon monitoring for Bitcoin-derived cryptocurrencies.Last updated -1TypeScript
- -securityAlicense-qualityA secure system enabling AI assistants to interact with blockchain data and prepare transactions while ensuring users maintain exclusive control over their private keys and transaction signing.Last updated -3TypeScriptMIT License
- AsecurityAlicenseAqualityProvides tools for AI assistants to interact with the Ethereum blockchain through standard JSON-RPC methods, enabling queries for account balances, gas prices, and smart contract code.Last updated -63JavaScriptMIT License
- -securityFlicense-qualityConnects to the Coinbase Commerce API, allowing AI assistants like Claude to generate cryptocurrency payment links.Last updated -TypeScript