Cobroya

io.github.dan1d由 GitHub 帳號 dan1d 發布v1.0.1更新於 Oct 24, 2026

Mercado Pago payments for AI agents: payment links, search, refunds, merchant info.

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理建立 Mercado Pago 付款連結、查詢與搜尋付款、發起退款,並讀取商家資料。

可以做什麼
建立 Mercado Pago 結帳付款連結,可附上返回與通知網址,並回傳可分享給買家的結帳連結。依付款 ID 取得單筆付款的完整詳情,包括狀態、金額與付款人資訊。依狀態篩選搜尋付款,支援排序與分頁。對某筆付款發起全額或部分退款。讀取已驗證商家的資料:使用者 ID、暱稱與網站。
適用情境
適合讓助理在對話中處理 Mercado Pago 收款:為商品或課程產生付款連結、查看當天付款是否已核准,或為買家退款。適用於已使用 Mercado Pago、希望在 AI 工具內完成收款操作的商家。
執行需求
透過 npx 以 stdio 程序在本機執行,需要 Node.js。需要在 MERCADO_PAGO_ACCESS_TOKEN 環境變數中提供 Mercado Pago 存取權杖。需要能連線至 Mercado Pago API 的網路。選用變數涵蓋 Telegram、WhatsApp、webhook 密鑰、預設貨幣與重新導向網址。
安裝前請注意
Mercado Pago 存取權杖是連結真實資金的付款憑證,持有者可建立收款與退款。退款與建立付款連結會改變真實財務狀態,讓助理操作前應確認金額與付款 ID。此權杖以明文形式存放在用戶端設定檔中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Cobroya,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

CobroYa

Cobra con Mercado Pago en 10 segundos.

[npm version] [tests] [coverage] [license]

CobroYa is an open-source Mercado Pago payment tool for AI agents, Telegram, WhatsApp, and automation platforms. Create payment links, search payments, issue refunds -- all from your AI assistant or chat bot.

Website | npm | GitHub


Quick Start with AI

CobroYa is an MCP (Model Context Protocol) server. Add it to your AI tool in one step -- no cloning, no building. Just provide your Mercado Pago access token.

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "cobroya": {      "command": "npx",      "args": ["-y", "cobroya"],      "env": {        "MERCADO_PAGO_ACCESS_TOKEN": "APP_USR-..."      }    }  }}

Claude Code

bash
claude mcp add cobroya -- npx -y cobroya \  --env MERCADO_PAGO_ACCESS_TOKEN=APP_USR-...

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "cobroya": {      "command": "npx",      "args": ["-y", "cobroya"],      "env": {        "MERCADO_PAGO_ACCESS_TOKEN": "APP_USR-..."      }    }  }}

Windsurf

Add to your Windsurf MCP configuration:

json
{  "mcpServers": {    "cobroya": {      "command": "npx",      "args": ["-y", "cobroya"],      "env": {        "MERCADO_PAGO_ACCESS_TOKEN": "APP_USR-..."      }    }  }}

Once configured, ask your AI assistant things like: "Create a payment link for $5000 for a Python course" or "Show me today's approved payments".


Available Tools

CobroYa exposes 5 MCP tools that any connected AI agent can call:

ToolDescription
create_payment_preferenceCreate a Mercado Pago checkout payment link. Returns an init_point URL to share with buyers. Supports back_urls and notification_url.
get_paymentRetrieve full details of a payment by ID, including status, amount, and payer info.
search_paymentsSearch payments with filters: status (approved, pending, rejected, etc.), sort order, and pagination.
create_refundIssue a full or partial refund for a payment. Omit amount for a full refund.
get_merchant_infoGet the authenticated merchant's profile: user ID, nickname, and site.

Telegram Bot

CobroYa includes a ready-to-use Telegram bot: @CobroYa_bot

Self-hosting the bot

  1. Create a bot via @BotFather and get your token.
  2. Set environment variables:
bash
export MERCADO_PAGO_ACCESS_TOKEN="APP_USR-..."export TELEGRAM_BOT_TOKEN="your-telegram-bot-token"
  1. Run:
bash
npx cobroya-telegram

Or from source:

bash
npm run bot

WhatsApp

CobroYa supports WhatsApp Business Cloud API for receiving commands and sending payment notifications.

  1. Create a Meta app at Meta for Developers and enable WhatsApp Business API.
  2. Set environment variables:
bash
export WHATSAPP_ACCESS_TOKEN="your-meta-graph-api-token"export WHATSAPP_PHONE_NUMBER_ID="your-phone-number-id"export WHATSAPP_VERIFY_TOKEN="your-webhook-verify-token"
  1. Run the webhook server:
bash
npm run whatsapp# Starts on http://localhost:3000/webhook
  1. Expose with ngrok (ngrok http 3000) and configure the webhook URL in your Meta Dashboard.

For full details on supported commands and payment notifications, see the WhatsApp documentation.


Automation Platforms

Pre-built packages for popular automation platforms are available in the packages/ directory:

  • n8n -- packages/n8n-nodes-mercadopago
  • Zapier -- packages/zapier-mercadopago
  • Make -- packages/make-mercadopago
  • Pipedream -- packages/pipedream-mercadopago

Each package wraps the CobroYa core with platform-specific configuration. See the README in each package for setup instructions.


AI Framework Adapters

LangChain (Python)

bash
pip install langchain-mercadopago
python
from langchain_mercadopago import create_mercadopago_tools
tools = create_mercadopago_tools("APP_USR-...")
# Use with any LangChain agentfrom langchain.agents import initialize_agent, AgentTypefrom langchain_openai import ChatOpenAI
agent = initialize_agent(    tools=tools,    llm=ChatOpenAI(model="gpt-4"),    agent=AgentType.OPENAI_FUNCTIONS,)agent.run("Create a payment link for $5000 for a Python course")

PyPI

OpenAI Function Calling (TypeScript)

bash
npm install openai-mercadopago
typescript
import { createMercadoPagoExecutor } from "openai-mercadopago";
const executor = createMercadoPagoExecutor(process.env.MERCADO_PAGO_ACCESS_TOKEN!);
// Pass executor.definitions to OpenAI's tools parameterconst response = await openai.chat.completions.create({  model: "gpt-4",  messages,  tools: executor.definitions,});
// Execute the tool callconst result = await executor.handleToolCall(  toolCall.function.name,  JSON.parse(toolCall.function.arguments),);

npm


Programmatic Usage

Install as a dependency:

bash
npm install cobroya
typescript
import { createMercadoPagoTools } from "cobroya";
const mp = createMercadoPagoTools(process.env.MERCADO_PAGO_ACCESS_TOKEN!);
// Create a payment linkconst pref = await mp.tools.create_payment_preference({  title: "Premium Plan",  quantity: 1,  currency: "ARS",  unit_price: 5000,});console.log(pref.init_point); // Checkout URL to share with the buyer
// Search approved paymentsconst payments = await mp.tools.search_payments({ status: "approved", limit: 10 });
// Get payment detailsconst payment = await mp.tools.get_payment({ payment_id: "123456789" });
// Full refundawait mp.tools.create_refund({ payment_id: "123456789" });
// Partial refundawait mp.tools.create_refund({ payment_id: "123456789", amount: 500 });
// Merchant profileconst merchant = await mp.tools.get_merchant_info();

Error Handling

typescript
import { MercadoPagoError } from "cobroya";
try {  await mp.tools.get_payment({ payment_id: "invalid" });} catch (err) {  if (err instanceof MercadoPagoError) {    console.log(err.status);        // 404    console.log(err.isNotFound);     // true    console.log(err.isUnauthorized); // false    console.log(err.isRateLimited);  // false  }}

Environment Variables

VariableRequiredDescription
MERCADO_PAGO_ACCESS_TOKENYesMercado Pago API access token (get one here)
TELEGRAM_BOT_TOKENFor TelegramTelegram bot token from @BotFather
WHATSAPP_ACCESS_TOKENFor WhatsAppMeta Graph API token
WHATSAPP_PHONE_NUMBER_IDFor WhatsAppWhatsApp Business phone number ID
WHATSAPP_VERIFY_TOKENFor WhatsAppWebhook verification token
WA_NOTIFY_PHONENoPhone number for WhatsApp payment notifications
MERCADO_PAGO_WEBHOOK_SECRETNoHMAC secret for Mercado Pago webhook signature validation
MP_CURRENCYNoDefault currency (defaults to ARS)
MP_SUCCESS_URLNoDefault success redirect URL for payment preferences

Development

bash
# Install dependenciesnpm install
# Buildnpm run build
# Run all testsnpm test
# Run tests with coveragenpm run test:coverage
# Watch modenpm run test:watch
# Type-check without emittingnpx tsc --noEmit
# Integration test against real Mercado Pago APIMERCADO_PAGO_ACCESS_TOKEN=APP_USR-... npm run integration
# Start the unified server (Telegram + WhatsApp + webhooks)npm start
# Dev mode with auto-reloadnpm run dev:server
# Dockerdocker compose up -d

License

MIT -- by dan1d

來源:README.md,提交 4e4c6f3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分