Skip to main content
MCP server CX Codex

mcp-openpay — Claude Code MCP server

Connects an AI coding agent to Openpay for charges, customers, subscriptions, MXN payouts, and webhooks. Built for the Mexican gateway.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env OPENPAY_MERCHANT_ID=<OPENPAY_MERCHANT_ID> --env OPENPAY_PRIVATE_KEY=<OPENPAY_PRIVATE_KEY> --env OPENPAY_ENV=<OPENPAY_ENV> --transport stdio openpay -- npx -y @codespar/mcp-openpay
Open on GitHub

What mcp-openpay does

mcp-openpay exposes 23 Openpay operations to an agent. It can create, inspect, capture, and refund charges, manage customers and tokenized cards, create plans and subscriptions, send MXN payouts, and handle bank accounts and webhooks. Several operations accept customer_id to use customer-level routing.

The package runs with npx over stdio, with an HTTP mode available for server-to-server testing through MCP_HTTP=true MCP_PORT=3000. Authentication uses HTTP Basic; the server creates the Base64 value from the private key. Set OPENPAY_MERCHANT_ID and OPENPAY_PRIVATE_KEY, then choose sandbox or production with OPENPAY_ENV; sandbox is the default.

Use Openpay.js for client-side card tokenization and send the resulting token to the server. Raw PAN or CVV data on the server requires PCI-DSS compliance.

What it helps with

  • create and refund an Openpay charge
  • store customers and tokenized cards
  • start recurring billing from a plan
  • send MXN funds to a bank account
  • register and remove webhook endpoints

Example prompts for the agent

  • Create an Openpay charge for the order in orders.json and return its ID.
  • Set up a subscription plan, then subscribe the customer with this customer_id.
  • List the Openpay payouts and add a webhook for new payment events.

How to install mcp-openpay

Platform CLI

claude mcp add --env OPENPAY_MERCHANT_ID=<OPENPAY_MERCHANT_ID> --env OPENPAY_PRIVATE_KEY=<OPENPAY_PRIVATE_KEY> --env OPENPAY_ENV=<OPENPAY_ENV> --transport stdio openpay -- npx -y @codespar/mcp-openpay

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-openpay

How do I install mcp-openpay in Claude Code?

Run claude mcp add mcp-openpay -e OPENPAY_MERCHANT_ID=<OPENPAY_MERCHANT_ID> -e OPENPAY_PRIVATE_KEY=<OPENPAY_PRIVATE_KEY> -- npx -y @codespar/mcp-openpay.

What does mcp-openpay do?

It gives an agent 23 Openpay tools for charges, customers, cards, subscriptions, payouts, bank accounts, and webhooks.

What does mcp-openpay require for card payments?

Configure OPENPAY_MERCHANT_ID and OPENPAY_PRIVATE_KEY. Openpay.js tokenization is preferred; sending raw PAN or CVV data server-side requires PCI-DSS compliance.

Similar MCP servers

All MCP servers for Backend and APIs →

From the same set124

mcp-paypal MCP server connecting AI assistants to the PayPal REST API. Handles order checkout, recurring subscriptions, batch payouts, and customer dispute resolution. CX Codex +1 ★ 274repo stars mcp-pagseguro Connects an agent to PagSeguro/PagBank for orders, charges, refunds, Pix, boleto, and card payments. It fits payment tasks inside a coding workspace. CX Codex +1 ★ 274repo stars mcp-pagbrasil Wires three PagBrasil tools into your agent: create an order, check its status, issue a refund. Useful when your store sells into Brazil and takes Pix or boleto. CX Codex +1 ★ 274repo stars mcp-pagar-me Connects AI agents to the Pagar.me payment platform to issue Pix charges, handle split payouts, and manage billing. CX Codex +1 ★ 274repo stars mcp-open-finance Connects a coding agent to Open Finance Brasil: accounts, transactions, consents, cards, loans and investments. Useful when your code talks to Brazilian banking APIs. CX Codex +1 ★ 274repo stars mcp-onfido Connects Onfido identity verification and KYC workflows to your AI assistant. Useful for managing applicants, file uploads, and checks from IDE chats. CX Codex +1 ★ 274repo stars mcp-omie Connects an AI agent to Omie for customer, product, order, invoice, and finance operations. Useful when ERP actions should run from an agent chat. CX Codex +1 ★ 274repo stars mcp-nuvem-fiscal An MCP server that connects your agent to Nuvem Fiscal for issuing NF-e, NFS-e, NFC-e, CT-e and MDF-e, plus CNPJ and CEP lookups. CX Codex +1 ★ 274repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor