@deonpay/mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@deonpay/mcp-server How much did I sell yesterday on DeonPay?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@deonpay/mcp-server
Talk to your DeonPay merchant account from Claude Desktop, Cursor, Continue and any other MCP-compatible AI host.
What is this?
The Model Context Protocol (MCP) is an open standard that lets large language models call structured tools on your behalf. This package is the official MCP server for DeonPay — Mexico's modern payments platform — wrapping the DeonPay Public API v1 as a set of typed tools your AI assistant can use to read transactions, create payment links, inspect subscriptions, look up customers and pull business metrics, all without leaving the chat.
It runs locally on your machine, talks to DeonPay over HTTPS using a token you generate from the dashboard, and exposes 20 well-described tools the LLM can pick from.
Related MCP server: aba-payway-mcp
Quick start
1. Generate an MCP token in the DeonPay dashboard
Open https://deonpay.mx/dashboard/settings/mcp-connections, pick the permissions the assistant should have (start with read-only) and copy the token. The token is shown only once — keep it safe.
2. Add the server to your MCP host
For Claude Desktop, edit your config file:
OS | Path |
macOS |
|
Windows |
|
Linux |
|
Add the deonpay entry to the mcpServers block:
{
"mcpServers": {
"deonpay": {
"command": "npx",
"args": ["-y", "@deonpay/mcp-server"],
"env": {
"DEONPAY_API_TOKEN": "dp_paste_your_token_here"
}
}
}
}3. Restart Claude Desktop
Quit and re-open Claude Desktop. You should see "deonpay" listed under the tools icon in any new conversation.
That's it. Try asking: "How much did I sell yesterday on DeonPay?"
Configuration
All configuration is via environment variables.
Variable | Required | Default | Description |
| yes | — | Your DeonPay API token ( |
| no |
| Override for self-hosted or staging deployments. |
| no |
| Request timeout in milliseconds. |
| no |
| Set to |
Full Claude Desktop example
{
"mcpServers": {
"deonpay": {
"command": "npx",
"args": ["-y", "@deonpay/mcp-server"],
"env": {
"DEONPAY_API_TOKEN": "dp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"DEONPAY_BASE_URL": "https://deonpay.mx",
"DEONPAY_DEBUG": "0"
}
}
}
}Available tools
All 20 tools are prefixed with deonpay_ so your assistant can find them quickly when you mention DeonPay in a prompt.
Read
Tool | Wraps | Purpose |
|
| Headline KPIs: revenue, conversion, MRR, churn, revenue mix. |
|
| Filter and paginate transactions. |
|
| Full transaction with NetPay timeline. |
|
| List payment links. |
|
| Single link by UUID or short_code. |
|
| All payments for a link. |
|
| Catalog listing. |
|
| Product by UUID or SKU. |
|
| Subscription PLANS (templates). |
|
| Plan with stats and recent charges. |
|
| Per-customer subscription rows. |
|
| Subscriber detail with last 20 charges. |
|
| Customer list with revenue stats. |
|
| Customer profile by email. |
Write (safe)
Tool | Wraps | Purpose |
|
| Create a payment link. |
|
| Update an existing link (merge customization). |
|
| Stripe-style ephemeral checkout. |
|
| Add a product to the catalog. |
|
| Update product price, stock, status. |
|
| Create a recurring plan template. |
Not exposed in v0.1 (by design)
These DeonPay endpoints are intentionally NOT wrapped yet because the failure mode is destructive or irreversible:
Refunds (
POST /v1/transactions/{id})Subscription cancellations (
POST /v1/customer-subscriptions/{id}/cancel)Link / product deletes (
DELETE /v1/links/{id},DELETE /v1/products/{id})Checkout session cancellation (
PATCH /v1/checkout/sessions/{id})Subscription plan updates (
PATCH /v1/subscriptions/{id})
These will land in a future release behind an explicit DEONPAY_ENABLE_DESTRUCTIVE=1 flag.
Example prompts
Try these in Claude Desktop after installing the server:
"Show me my payment links from this week."
"How much did I sell yesterday in MXN?"
"What is my MRR right now?"
"Find the customer who has spent the most in the last 90 days."
"List all subscribers on past_due status and tell me what their plans look like."
"Create a payment link for $500 MXN called 'Consulta nutricional'."
"Add a product called 'Gym Class' at $250 MXN to my catalog."
"Create a monthly subscription plan named 'Premium' for $299 MXN with 7 trial days."
"Why did transaction 550e8400-e29b-41d4-a716-446655440000 fail? Show me the NetPay timeline."
"Pause the link with short_code abc123xy until further notice."
The assistant will pick the right tool, fill in the parameters and report back.
Amounts and currency
DeonPay handles all amounts in centavos (1 MXN = 100). When you write "create a link for $500", the assistant translates it to amount: 50000. When the API returns total_revenue: 1845000, that's $18,450.00 MXN. The tool descriptions remind the LLM of this on every call.
Troubleshooting
"DEONPAY_API_TOKEN is required"
The server could not find the token in its environment. Check that the env block in claude_desktop_config.json is at the same level as command/args, and that you fully restarted Claude Desktop after editing the file.
"[unauthorized 401] DeonPay rejected the API token"
The token is invalid, revoked, or its environment doesn't match the data you're querying. Re-issue from Settings -> MCP Connections and replace the value in your config.
"[forbidden 403] DeonPay denied access"
The token is valid but it doesn't carry the permission required for that tool. Edit the token in the dashboard and grant the missing permission (the error message names it).
"No tool named deonpay_..."
The host hasn't loaded the server. Confirm the mcpServers block is valid JSON, restart the host, and look at the host's logs (Claude Desktop -> Help -> Show Logs) for startup errors.
"Could not reach DeonPay at https://..."
Network or DNS issue. Verify DEONPAY_BASE_URL is reachable from your machine (curl -I $DEONPAY_BASE_URL).
Verbose logging
Set DEONPAY_DEBUG=1 in the env block. Every HTTP request and response is then printed to the host's log file (stderr).
Security
The token is stored in plain text inside
claude_desktop_config.json. Treat that file like an SSH key — back it up encrypted, never commit it to git.Tokens have granular permissions. For an LLM that should only read data, create a token with
*.readpermissions only — that mechanically prevents the assistant from creating links or charging cards.Tokens are environment-scoped (sandbox vs production). For experimentation, generate a sandbox token first and switch later.
The server only sends requests to the host you configure in
DEONPAY_BASE_URL. There is no telemetry and no third-party network call.
Development
git clone https://github.com/hectortemich/deonpay-mcp-server.git
cd deonpay-mcp-server
npm install
npm run build # tsup -> dist/{index.js,index.cjs,index.d.ts}
npm run typecheck # tsc --noEmit
npm run lint # eslint + @typescript-eslint
DEONPAY_API_TOKEN=dp_... node dist/index.js # run locally over stdioThe codebase is organized so each tool category lives in src/tools/<category>.ts with a register* function. Adding a new tool is a one-file change plus a registration call in src/tools/index.ts.
Contributing
PRs welcome. Please:
Open an issue first for new tools so we can align on naming and scope.
Match the existing tool description style — rich, English, with explicit notes on units (centavos), path encoding, and side effects.
Run
npm run lint && npm run typecheck && npm run buildbefore submitting.
License
MIT - see LICENSE.
Available Tools
20 toolsdeonpay_create_checkout_sessionCreate a checkout sessionA
Create an ephemeral checkout session (Stripe-style). Use this when integrating an e-commerce flow: the user wants a one-time payment URL tied to a specific cart and a success_url to land on after payment. The response contains url (where to redirect the customer) and session_id (used to look up the session later). Amounts are in CENTAVOS. Mode defaults to 'redirect' — use 'embedded' or 'modal' only if the calling app already supports those flows. The session expires by default in 30 minutes (override with expires_in, range 5..1440).
Inputs: line_items (required), success_url (required), cancel_url, mode, +14 more.
deonpay_create_linkCreate a payment linkA
Create a new payment link. Use this when the user says 'create a link for $X for product Y' or 'genera un link de pago para...'. Amounts are in centavos: $500 MXN = 50000. You can pass either a fixed amount OR line_items (the API sums quantity * unit_amount automatically). Type defaults to 'single' (one-shot). Optional fields cover MSI (months without interest), max_uses, expires_at, custom_fields and visual customization. The response includes the public payment URL the user can share.
Inputs: name (required), amount, type, description, +13 more.
deonpay_create_productCreate a productA
Create a new product in the catalog. Use this when the user says 'add a product called X for $Y' or wants to register inventory items they'll later attach to payment links / checkout sessions. unit_amount is in CENTAVOS and must be at least 1000 ($10.00 MXN minimum on creation). SKU must be unique within the merchant. To track stock, set stock_tracking=true AND provide stock_quantity (>= 0).
Inputs: name (required), unit_amount (required), description, currency, +6 more.
deonpay_create_subscriptionCreate a subscription planA
Create a new subscription PLAN (template). Use this when the user wants to set up a recurring charge: 'create a $299 monthly plan called Premium'. Required: name, amount (centavos, min 100 = $1 MXN), interval_type. Important: in production the merchant must have an On-Demand NetPay key configured for the active environment, otherwise this returns ondemand_key_missing. trial_days > 0 enables a free trial period (charges a $10 MXN card-validation tx on the first day to verify the card). Optional flags allow_customer_cancel/pause/advance_payments control the customer self-service portal.
Inputs: name (required), amount (required), interval_type (required), description, +12 more.
deonpay_get_customerGet customer details by emailA
Fetch a customer's full profile by email. Returns basic info, saved_cards (safe metadata only — never the vault token), active_subscriptions (status active/trialing/past_due/paused), and the last 20 transactions (excluding $10 MXN card-validation charges). Use this when the user asks 'show me everything about cliente@x.com' or 'what cards does this customer have on file'. The email is URL-encoded automatically — pass the plain email.
Inputs: email (required), environment.
deonpay_get_customer_subscriptionGet customer subscription detailsA
Fetch a single customer subscription by UUID. Includes the plan denormalized, the last 20 recurring charges (each with status success/failed/skipped/completed, charge_type auto/manual/renewal_link, attempt_number, error_message and timestamps), and cancellation flags. Use this when investigating a specific subscriber's history or a failed charge ('why did Juan's subscription go past_due?').
Inputs: id (required).
deonpay_get_linkGet payment link detailsA
Fetch a single payment link by its UUID or short_code. Returns the full link payload including line_items (enriched with product data when product_id is present), customization, custom_fields, expiration, usage limits and aggregated stats. Use this when the user references a link by name/short_code from a previous list, or when they paste a https://deonpay.mx/pay/<short_code> URL.
Inputs: id (required).
deonpay_get_merchant_metricsGet merchant metricsA
Fetch a curated set of business metrics for the merchant. Use this as the FIRST tool for high-level questions: 'how much have I sold this month', 'what is my MRR', 'how is my conversion rate trending', 'how many active subscribers do I have'. Returns: revenue (gross/net/refunded in centavos), transactions (total/successful/failed/conversion_rate as %/average_ticket in centavos), subscriptions snapshot (active_subscribers, trialing_subscribers, past_due, mrr in centavos, churn_rate as %), and revenue_mix (recurring vs one_time, in centavos). IMPORTANT: subscriptions.active/trialing/past_due AND mrr are SNAPSHOTS — they ignore period. mrr is always a 30-day run-rate. revenue, transactions, churn_rate and revenue_mix DO honor period.
Inputs: period, environment.
deonpay_get_productGet product detailsA
Fetch a single product by UUID OR by SKU (if you pass a non-UUID string the API resolves it as a SKU). Returns name, description, unit_amount in centavos, currency, image_url, sku, is_active, stock_tracking, stock_quantity and metadata.
Inputs: id (required).
deonpay_get_subscriptionGet subscription plan detailsA
Fetch a single subscription plan by UUID, including aggregated stats (active_subscribers, total_subscribers) and the most recent 10 recurring charges across all subscribers. Use this when the user wants a quick health view of a specific plan ('how is the Premium plan doing this month'). For per-subscriber detail use deonpay_list_customer_subscriptions filtered by subscription_id.
Inputs: id (required).
deonpay_get_transactionGet transaction detailsA
Fetch the full detail of a single transaction by UUID. Returns everything in the list view PLUS the NetPay timeline (each step in the charge / 3DS flow with duration_ms and error info), netpay charge_id / transaction_token, full metadata, refund details (when applicable), and IP/user-agent of the payer. Use this when debugging a failure, building a refund decision, or when the user asks 'what happened with transaction X'.
Inputs: id (required).
deonpay_list_customersList customersA
List the merchant's customers (people who have completed at least one non-validation transaction). Use this for questions like 'who are my top customers', 'how many recurring buyers do I have', 'find customers with email containing X'. Sort by 'recent' (last transaction, default), 'revenue' (most spent), or 'transactions' (most active). Each row includes email, name, phone, first_seen_at, last_seen_at, total_transactions, total_spent in centavos, active_subscriptions and saved_cards_count.
Inputs: page, limit, search, sort, +1 more.
deonpay_list_customer_subscriptionsList customer subscriptionsA
List individual customer subscriptions (the per-customer rows, NOT the plans). Use this to answer 'who is currently subscribed to plan X', 'how many trialing subscribers do I have', or 'find subscribers on past_due'. Filter by subscription_id (the plan), customer_email (exact, case-insensitive), and status (active/paused/cancelled/past_due/completed/trialing). Each item includes the plan denormalized as a subscription sub-object, charges_count, total_charged in centavos, current_period_start/end, next_charge_at, and cancel_at_period_end.
Inputs: page, limit, subscription_id, customer_email, +2 more.
deonpay_list_linksList payment linksA
List payment links for the authenticated merchant. Use this when the user asks 'show me my payment links', 'what links did I create last week', or wants to find a link by name. Supports filtering by status (active/paused/expired/deleted), type (single/recurring/unlimited), free-text search across name/short_code/reference, and a date range. Returns a paginated list — each item includes id, short_code, name, amount in centavos, status, type, url, and aggregated stats (total_payments, successful_payments, total_revenue). Note: amounts are always in centavos (1 MXN = 100).
Inputs: page, limit, status, type, +3 more.
deonpay_list_link_transactionsList transactions for a payment linkA
List all transactions associated with a specific payment link. Use this when the user asks 'who paid for this link', 'how much did link X collect', or wants to inspect failed attempts on a single link. Returns paginated transactions with customer info, card brand/last_four, amount in centavos and status. The link can be referenced by UUID or short_code.
Inputs: id (required), page, limit.
deonpay_list_productsList productsA
List products in the merchant catalog. Use this when the user asks 'what products do I have', 'find product X', or wants to inspect inventory. Supports search across name/sku/description, filtering by is_active, and basic sorting (sort_by + sort_order). Each item includes id, name, unit_amount in centavos, currency, sku, is_active, stock_tracking and stock_quantity.
Inputs: page, limit, search, is_active, +2 more.
deonpay_list_subscriptionsList subscription plansA
List subscription PLANS (the recurring templates, not individual subscribers). Use this when the user asks 'what subscription plans do I have', 'show me my recurring products', or 'find the Premium plan'. Each item includes id, name, amount in centavos, currency, interval_type (daily/weekly/biweekly/monthly/yearly), interval_count, trial_days, status (active/paused/archived) plus aggregated stats: active_subscribers and total_revenue. Use deonpay_list_customer_subscriptions to drill into actual subscribers of a plan.
Inputs: page, limit, status, search, +1 more.
deonpay_list_transactionsList transactionsA
List transactions for the merchant with rich filtering. Use this for queries like 'how many sales today', 'show failed transactions this week', 'find payments from cliente@x.com', or 'transactions over $1000 MXN with Visa cards'. Filters include status, source_type (link/checkout), customer_email (partial match), merchant_reference (exact), card_brand (visa/mastercard/amex), date_from/to (ISO), and amount_min/max (centavos). Returns paginated results with customer, card, amount, payment_link summary and timestamps. Amounts in centavos.
Inputs: page, limit, status, source_type, +9 more.
deonpay_update_linkUpdate a payment linkA
Update an existing payment link by UUID or short_code. Only send the fields you want to change — others are preserved. Common uses: pause a link (status='paused'), change its amount, extend the expiration, or rename it. The customization object is MERGED with the existing one (it does not replace it), so you can update a single visual key without losing the rest. Type cannot typically be changed once payments exist.
Inputs: id (required), name, description, amount, +10 more.
deonpay_update_productUpdate a productA
Update an existing product (resolved by UUID or SKU). Only fields you send are changed. Use this for price adjustments, renaming, toggling is_active, updating stock_quantity, or swapping the image_url. Note: under the hood the API uses HTTP PATCH (not PUT).
Inputs: id (required), name, description, unit_amount, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct resource and action (e.g., create, get, list, update) for specific entities like products, links, subscriptions, customers, and transactions. Even similar-sounding tools (e.g., get_subscription vs get_customer_subscription) are clearly differentiated by scope (plan vs individual subscriber).
All tools follow a consistent `deonpay_<verb>_<resource>` pattern in snake_case (e.g., deonpay_create_product, deonpay_list_transactions). There are no deviations, making the convention predictable and easy to navigate.
20 tools cover the key operations for a payment processing domain (CRUD for products, links, subscriptions, customers, transactions, plus metrics and checkout). The count is well-scoped—neither excessive nor insufficient—for the apparent purpose.
The tool surface covers core workflows (create/read/update/list for products and links, list/read for customers and transactions, subscription management). Minor gaps exist: lack of update_subscription (plans) and cancel customer subscription. Otherwise, the set is thorough.
Maintenance
Related MCP Connectors
Accounts receivable automation for Xero and QuickBooks Online, inside your AI assistant. Ask Claude, ChatGPT or any MCP client for a receivables summary, find customers and invoices, read the email and SMS replies your customers sent, and see what Paidnice sent or skipped. Ask why a reminder, late fee or statement did or did not go out, and update a customer's contact people straight into your ledger. Secure OAuth sign-in. One connection covers every organisation you tick, with Read or Read and Write access.
Agentic commerce + trust MCP: discover, verify, and transact across droplinked's merchant network.
Stripe payments for AI agents. Create links, verify, manage customers.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to manage crypto payments, stores, products, and orders through the Model Context Protocol.2074 npmMIT
- AlicenseAqualityDmaintenanceEnables MCP-compatible AI tools to create checkouts, generate KHQR codes, check/list transactions, issue refunds, create payment links, and pull exchange rates via ABA Bank's PayWay API.1212 npmMIT
- AlicenseAqualityCmaintenanceEnables MCP hosts like Claude, VS Code, Cursor, and others to discover payment methods, create payment links, verify payments, inspect invoices, and manage refunds through focused tools, with a guided safe payment workflow and a restricted generic API escape hatch.736 npmMIT
- AlicenseCqualityCmaintenanceEnables AI agents to manage merchant accounts, process payments, handle wallets and payouts, and sell digital goods through the wata.pro payment system.90MIT