Gotas Commerce MCP Server

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 :付款后重定向客户的 URL
  • description :可选付款描述

返回:

  • 包含所有付款详细信息的完整 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 助手可以轻松使用的工具、资源和提示。

┌────────────────┐ ┌───────────────┐ ┌──────────────────┐ │ │ │ │ │ │ │ Assistente IA ├────┤ Servidor MCP ├────┤ API Gotas │ │ (Claude) │ │ (FastAPI) │ │ Commerce │ │ │ │ │ │ │ └────────────────┘ └───────────────┘ └──────────────────┘

📋 先决条件

  • Python 3.8 或更高版本
  • Gotas Commerce API 密钥(获取地址: commerce.gotas.com
  • 访问与 MCP 兼容的助手(例如 Claude)

🔌 安装

  1. 克隆此存储库:
    git clone https://github.com/caiovicentino/mcpGOTAS.git cd mcpGOTAS
  2. 安装依赖项:
    pip install -r requirements.txt
    或者使用自动安装脚本:
    ./setup.bat
  3. 配置环境变量:
    • 使用以下值创建.env文件:
      GOTAS_API_KEY=sua_chave_api_aqui GOTAS_BASE_URL=https://commerce.gotas.com

🏃‍♂️ 执行

MCP 服务器

运行服务器以使工具可通过 MCP 访问:

uvicorn src.gotas_mcp_server:app --host 0.0.0.0 --port 8000

与 Claude Desktop 集成

直接与 Claude Desktop 一起使用:

python install_claude.py

或者,手动安装:

mcp install src.gotas_mcp_server.py

直接 API 使用(测试脚本)

对于不使用向导的直接测试:

  • 创建付款python test_client.py
  • 检查状态python check_payment.py

📊 付款流程

  1. 付款初始化
    • 服务员从用户处获取金额和其他付款详细信息。
    • 向导使用所需参数调用create-payment工具
    • Gotas Commerce 中创建了一笔新付款
    • 支付链接返回给用户
  2. 付款流程
    • 用户访问提供的付款链接
    • 用户将USDT转入显示的钱包地址
    • Gotas Commerce 监控区块链以确认交易
  3. 状态检查
    • 助手可以通过调用check-payment-status status 来检查付款状态
    • 状态可以是:待定、已完成、已过期或失败。
    • 当付款确认后,区块链交易哈希即可提供。

🔍 技术规格

API 详细信息

删除 Commerce API 端点

  1. 创建付款
    • POST /api/v1/payments
    • 请求正文:
      { "amount": "100.00", "currency": "USDT", "return_url": "https://exemplo.com/retorno", "description": "Descrição do pagamento" }
  2. 查看付款状态
    • GET /api/v1/payments/{payment_id}

MCP 通信

  • 传输:SSE(服务器发送事件)
  • 格式:JSON,用于助手和 MCP 服务器之间的通信
  • 身份验证:API 密钥存储为环境变量

📂 项目结构

├── src/ │ └── gotas_mcp_server.py # Implementação principal do servidor MCP ├── .env # Variáveis de ambiente (API key, etc.) ├── .smithery.json # Configuração para Smithery CLI ├── check_payment.py # Utilitário para verificar status de pagamentos ├── docsdaapigotas.md # Documentação detalhada da API ├── install_claude.py # Script para instalação no Claude Desktop ├── mcp.md # Documentação do servidor MCP ├── MCPPROTOCOLpython.MD # Documentação do protocolo MCP em Python ├── requirements.txt # Dependências do projeto ├── setup.bat # Script de configuração para Windows ├── smithery.json # Schema para integração com Smithery └── test_client.py # Cliente de teste para criação de pagamentos

🔒 安全

  • API 密钥存储为环境变量,而不是源代码
  • 与 Gotas Commerce API 的通信通过 HTTPS 完成
  • MCP 服务器在发送至 API 之前验证所有参数
  • 适当的错误处理以避免泄露敏感信息

🧩 可扩展性

该项目旨在轻松扩展:

  1. 新功能:添加新的 MCP 工具,实现服务器上用@mcp.tool()装饰的功能
  2. 与其他服务的集成:该架构允许您轻松集成 Gotas Commerce 之外的其他服务
  3. 新币支持:该框架准备在未来支持除 USDT 之外的其他加密货币

📚 使用示例

创建付款(通过 Claude)

Usuário: Preciso gerar um link de pagamento de 50 USDT. Claude: Vou gerar um link de pagamento para você. Para qual URL devo configurar o redirecionamento após o pagamento? Usuário: https://meusite.com.br/obrigado Claude: [Utilizando ferramenta create-payment] Criando pagamento de 50 USDT com redirecionamento para https://meusite.com.br/obrigado... Pronto! Criei um link de pagamento para 50 USDT. Link de pagamento: [URL gerado pela API] Este link expirará em 30 minutos. O cliente deve transferir exatamente 50 USDT para o endereço da carteira mostrado na página de pagamento.

检查状态(通过 Claude)

Usuário: Verifique o status do meu pagamento com ID xyz123. Claude: [Utilizando ferramenta check-payment-status] Verificando o status do pagamento ID xyz123... O status atual do pagamento é: PENDENTE - Valor: 50.00 USDT - Criado em: [timestamp] - Expira em: [timestamp] O pagamento ainda não foi confirmado na blockchain. Você pode acompanhar usando o link de pagamento ou me pedir para verificar novamente mais tarde.

📞 支持与联系

如需支持或其他信息,请联系 Gotas 开发团队或在 GitHub 存储库中打开问题。

📜 许可证

MIT 许可证

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

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 交易。

  1. 🚀 概述
    1. ✨ 资源
      1. MCP 工具
      2. MCP 资源
      3. MCP 提示
    2. 🔧 架构
      1. 📋 先决条件
        1. 🔌 安装
          1. 🏃‍♂️ 执行
            1. MCP 服务器
            2. 与 Claude Desktop 集成
            3. 直接 API 使用(测试脚本)
          2. 📊 付款流程
            1. 🔍 技术规格
              1. API 详细信息
              2. MCP 通信
            2. 📂 项目结构
              1. 🔒 安全
                1. 🧩 可扩展性
                  1. 📚 使用示例
                    1. 创建付款(通过 Claude)
                    2. 检查状态(通过 Claude)
                  2. 📞 支持与联系
                    1. 📜 许可证

                      Related MCP Servers

                      • -
                        security
                        F
                        license
                        -
                        quality
                        Enables secure interactions with cryptocurrency daemon RPC interfaces through AI assistants, supporting transaction management, wallet operations, and daemon monitoring for Bitcoin-derived cryptocurrencies.
                        Last updated -
                        1
                        TypeScript
                        • Apple
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A 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 -
                        3
                        TypeScript
                        MIT License
                      • A
                        security
                        A
                        license
                        A
                        quality
                        Provides 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 -
                        6
                        3
                        JavaScript
                        MIT License

                      View all related MCP servers

                      ID: omhron5spx