🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@codespar/mcp-openpay

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codespar/mcp-openpay

MCP server for Openpay — BBVA-owned Mexican payment gateway (cards, SPEI, OXXO, subscriptions, payouts)

npmnpm
Version
0.1.0
Version published
Weekly downloads
39
Maintainers
1
Weekly downloads
 
Created
Source

@codespar/mcp-openpay

MCP server for Openpay — the BBVA-owned Mexican payment gateway.

Openpay is the main BBVA-backed alternative to Conekta for Mexican online merchants. Adding it to the catalog alongside @codespar/mcp-conekta closes the "big two" MX gateway story and opens the BBVA rails (SPEI, OXXO, domestic cards) to agents. Differentiators in this catalog: native subscriptions (plans + per-customer recurring billing) and marketplace payouts.

Tools

ToolPurpose
create_chargeCharge via card, bank_account (SPEI), or store (OXXO). Customer-scoped or merchant-scoped.
get_chargeRetrieve a charge
capture_chargeCapture a previously authorized charge (delayed capture)
refund_chargeRefund a captured charge (full or partial)
create_customerCreate a customer record, optionally with a wallet account
get_customerRetrieve a customer
list_customersList customers with filters
create_cardTokenize a card at merchant or customer scope
delete_cardDelete a tokenized card
create_planCreate a subscription plan template
create_subscriptionSubscribe a customer to a plan using a stored card
create_payoutPay out MXN to a bank account (marketplace seller payouts)

Install

npm install @codespar/mcp-openpay

Environment

OPENPAY_MERCHANT_ID="..."  # merchant id (part of the API URL path)
OPENPAY_PRIVATE_KEY="..."  # private API key — secret
OPENPAY_ENV="sandbox"      # 'sandbox' (default) | 'production'

Authentication

HTTP Basic. The private key is the username, and the password is empty:

Authorization: Basic base64(OPENPAY_PRIVATE_KEY + ":")
Content-Type: application/json

The server handles the Base64 encoding automatically — you only configure the three env vars.

Base URLs

EnvHost
sandbox (default)https://sandbox-api.openpay.mx/v1/{merchant_id}
productionhttps://api.openpay.mx/v1/{merchant_id}

Run

# stdio (default — for Claude Desktop, Cursor, etc)
npx @codespar/mcp-openpay

# HTTP (for server-to-server testing)
MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-openpay

Scoping notes

Several Openpay resources can be addressed at either merchant scope or customer scope. The tools expose this via an optional customer_id parameter:

  • create_charge, get_charge, capture_charge, refund_charge — routed to /customers/{customer_id}/... when customer_id is set, else /....
  • create_card, delete_card — same pattern.
  • create_payout — customer-scoped payout requires the customer to have requires_account=true.
  • create_subscription — customer scope is required by the API (plans are merchant-scoped; subscriptions are always per-customer).

PCI scope

Prefer client-side tokenization with Openpay.js and pass the resulting token_id / source_id to the server. Only send raw PANs/CVVs server-side if you are PCI-DSS compliant.

Docs

https://documents.openpay.mx/en/api

License

MIT

Keywords

mcp

FAQs

Package last updated on 24 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts