mcpField
P
Perly Pay

Perly Pay

Local
pay.perly.ioFinance0Updated 2w ago

About Perly Pay

perly-pay-mcp is a local MCP server for using Perly Pay from AI coding assistants. It covers payment setup and records, with live API keys restricted to read-only operations.

Key features

  1. 01Manage products and prices
  2. 02Create payment links and invoices
  3. 03Read payments and receipts
  4. 04Check entitlements and credits
  5. 05Simulate payments in test mode
  6. 06Verify webhook signatures locally

Use cases

  1. 01Set up products and payment links
  2. 02Issue invoices and review payment records
  3. 03Test checkout flows without live payments
  4. 04Check buyer access and credit usage

MCP support

Runs locally over stdio and exposes Perly Pay API operations as MCP tools. With a live key, write operations are refused and only reads are allowed.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"io-perly-pay": {
"command": "npx",
"args": [
"-y",
"perly-pay-mcp"
],
"env": {
"PERLY_PAY_SECRET_KEY": "<PERLY_PAY_SECRET_KEY>",
"PERLY_PAY_API": "<PERLY_PAY_API>",
"PERLY_PAY_WEBHOOK_SECRET": "<PERLY_PAY_WEBHOOK_SECRET>"
}
}
}
}
Run commandnpx -y perly-pay-mcp
Environment variables to set
PERLY_PAY_SECRET_KEYSecretYour key from Dashboard → Developers: sk_test_… while you build.
PERLY_PAY_APIOptional. Default https://pay.perly.io.
PERLY_PAY_WEBHOOK_SECRETSecretOptional whsec_…, the default for verify_webhook_signature.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmperly-pay-mcp0.3.0

Tools

38

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
limitintegerNoHow many objects to return, 1–100. Default 10.
cursorstringNo`next_cursor` from the previous page.
statusenumNoopen | seen | underpaid | paid | overpaid | review | expired | canceled | refunded | partially_refunded
customerstringNoA customer id, `cus_…`.
subscriptionstringNoA subscription id, `sub_…`.

Details

From the project README

perly-pay-mcp

Sell your work for crypto from your AI coding assistant. perly-pay-mcp is a local MCP server for Perly Pay: your assistant can create products, prices, payment links and invoices, pay them in test mode, read payments and receipts, and check a buyer's access. Bitcoin, USDC and USDT land straight in your own wallet; Perly Pay never holds them. It costs 2.5¢ a payment, never more than 0.5% of it, and a month of up to 21 payments is free.

It runs on your machine over stdio and talks only to Perly Pay's public API with your key. There is no server of ours in between.

Set up

Get a test key in Perly Pay: Dashboard → Developers → API keys (sk_test_…).

Claude Code

claude mcp add perly-pay --env PERLY_PAY_SECRET_KEY=sk_test_… -- npx -y perly-pay-mcp

Cursor: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

{
  "mcpServers": {
    "perly-pay": {
      "command": "npx",
      "args": ["-y", "perly-pay-mcp"],
      "env": { "PERLY_PAY_SECRET_KEY": "sk_test_…" }
    }
  }
}

Codex: ~/.codex/config.toml

[mcp_servers.perly-pay]
command = "npx"
args = ["-y", "perly-pay-mcp"]
env = { PERLY_PAY_SECRET_KEY = "sk_test_…" }

Keep the key out of git: a config file in a project is often committed. Node 20 or newer.

Variable
PERLY_PAY_SECRET_KEYsk_test_… while you build. sk_live_… reads only (see below).
PERLY_PAY_APIDefault https://pay.perly.io. A perly.io host or this machine; plain http only for localhost.
PERLY_PAY_ALLOW_ANY_API1 sends your key to any other https host in PERLY_PAY_API, for a copy you run yourself.
PERLY_PAY_WEBHOOK_SECRETOptional whsec_…, the default for verify_webhook_signature.

Try it

Sell a one-hour consultation for $49 with a payment link, then pay it in test mode and show me the payment.

The assistant calls create_product, create_price, create_payment_link, simulate_payment and list_payments.

Tools

AreaTools
Products and pricescreate_product, list_products, update_product, create_price, list_prices, update_price
Payment linkscreate_payment_link, list_payment_links, update_payment_link
Invoices and checkoutcreate_invoice, list_invoices, retrieve_invoice, cancel_invoice, create_checkout_session, retrieve_checkout_session
Customerscreate_customer, list_customers, retrieve_customer
Subscriptions (renewed by invoice)create_subscription, list_subscriptions, retrieve_subscription
Access and creditscheck_entitlement, list_entitlements, consume_entitlement_credits, list_credit_usage
Money in, read onlylist_payments, retrieve_payment, list_receipts, retrieve_receipt, list_events
Refundscreate_refund, list_refunds
Webhookscreate_webhook_endpoint, list_webhook_endpoints, delete_webhook_endpoint
Test modesimulate_payment: pays an invoice, or buys from a payment link and pays that
On your machineverify_webhook_signature checks a Perly-Signature; pay_links gives the dashboard pages only you can use: plan, wallet, go live, two-factor, keys

The tools are generated from Perly Pay's OpenAPI document, so their arguments are the API's own.

What it will not do

  • With a live key, it only reads. Every tool that writes is refused: creating invoices, checkout sessions, products, prices, customers, payment links and subscriptions, cancelling, editing, refunds, credit spending, simulated payments and webhook endpoints. It says why, and you do it in the dashboard or in your app's own code. Lists and lookups work as in test. Why: text a buyer typed can reach the assistant, and nothing the server receives proves that you, not the model, approved a live change (confirm: true is written by the model; a client's approval prompt and an MCP elicitation answer both come back through the client). So the server never writes with a live key.
  • Wallets, API keys, billing, live mode and two-factor have no tool at all. You set them in the dashboard; pay_links gives the pages.
  • What cannot be undone (cancelling an invoice, opening a refund, deleting a webhook endpoint) waits for confirm: true, which the assistant should only send after asking you.
  • Your secret key is never repeated in an answer or a log.
  • Buyers' license keys never reach the assistant: an event that carries one comes back without its key; they stay in the dashboard.
  • Text others wrote is marked as data. Customer names, emails, descriptions and metadata can come from buyers, or from anyone who opens a payment link; every API answer ends with a note telling the assistant not to follow them. Still read what a tool is about to change before you approve it.

Docs: https://pay.perly.io/docs/mcp. API reference: https://pay.perly.io/docs/api. MIT licence.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.