npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codespar/mcp-openpay

v0.2.1

Published

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

Readme

@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 (23)

| Tool | Purpose | |---|---| | create_charge | Create a charge. | | get_charge | Retrieve a charge. | | capture_charge | Capture a previously authorized charge (when the original charge used capture=false). | | refund_charge | Refund a captured charge. | | create_customer | Create a customer record. | | get_customer | Retrieve a customer by Openpay customer id. | | list_customers | List customers with optional filters. | | create_card | Tokenize a card. | | delete_card | Delete a tokenized card. | | create_plan | Create a subscription plan. | | create_subscription | Subscribe a customer to a plan. | | create_payout | Pay out MXN to a bank account. | | update_customer | Update a stored customer (PUT /customers/{id}). | | delete_customer | Delete a customer (DELETE /customers/{id}). | | get_card | Retrieve a tokenized card. | | list_cards | List tokenized cards. | | create_bank_account | Store a customer bank account (POST /customers/{customer_id}/bankaccounts). | | delete_bank_account | Delete a stored customer bank account (DELETE /customers/{customer_id}/bankaccounts/{id}). | | cancel_subscription | Cancel a customer's subscription (DELETE /customers/{customer_id}/subscriptions/{id}). | | list_payouts | List payouts. | | create_webhook | Register a webhook endpoint (POST /webhooks). | | list_webhooks | List configured webhook subscriptions (GET /webhooks). | | delete_webhook | Delete a webhook subscription (DELETE /webhooks/{id}). |

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

| Env | Host | |-----|------| | sandbox (default) | https://sandbox-api.openpay.mx/v1/{merchant_id} | | production | https://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