Skip to main content

MCP Server

Connect Cursor, Claude, Grok, ChatGPT, Codex, Gemini CLI, or any MCP client to Payments AI. Your agent can provision merchants, create products, open checkout, and search these docs without leaving the chat.

Pick a surface​

Payments AI exposes more than one surface to an agent. Start here, then follow the one that matches the job.

You want toUse
Give an agent the Payments AI toolsMCP server — the rest of this page
Build and test without touching live dataSandbox MCP server — Sandbox MCP URL
Let an agent answer questions from these docssearch_payments_ai_docs, shipped with the MCP server
Teach an agent our conventions before it writes codeSkill — Agent discovery
Feed these docs to an agent that cannot speak MCPllms.txt and raw Markdown — Agent discovery
Call the API yourself, without an agentPublic API — Public API

OAuth is the fastest path. No User MCP Key to copy. The client opens a browser, you sign in, approve scopes, and tools appear.

jsonOAuth
{
  "mcpServers": {
    "payments-ai": {
      "url": "https://mor.payments.ai/api/mcp"
    }
  }
}

Connect with OAuth​

Pick your client. Every path ends the same way: approve scopes in the browser, then your agent has the tools.

Setup prompt

Not sure which client you are in, or using one that is not listed? Paste this prompt and let the agent work out its own install path.

Prompt
Install the Payments AI MCP server in this environment using OAuth. Do not ask me for a pai_mcp_* token.
Server name: payments-ai
URL: https://mor.payments.ai/api/mcp
Transport: Streamable HTTP
1. Detect which client you are (Cursor, Claude Code, Codex, Gemini CLI, VS Code, Grok, ChatGPT, or other).
2. Install with the matching command when a CLI exists:
- Claude Code: claude mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
- Codex: codex mcp add payments-ai --url https://mor.payments.ai/api/mcp && codex mcp login payments-ai
- Gemini CLI: gemini mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
- VS Code: code --add-mcp '{"name":"payments-ai","type":"http","url":"https://mor.payments.ai/api/mcp"}'
- Grok CLI: grok mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
- Cursor: merge this into ~/.cursor/mcp.json and, if a project is open, .cursor/mcp.json:
{ "mcpServers": { "payments-ai": { "url": "https://mor.payments.ai/api/mcp" } } }
Then tell me to click Connect in Settings → MCP, or run: agent mcp login payments-ai
3. If no CLI matches, write the client config file and tell me the path.
4. After install, call get_my_merchant if tools are available. If not, tell me to reload MCP and approve OAuth, then retry.
5. When healthy, reply with: Payments AI MCP is connected.
Manual configuration

Add to your client’s MCP config, then restart Any agent.

json
{
"mcpServers": {
"payments-ai": {
"url": "https://mor.payments.ai/api/mcp"
}
}
}

Claude Connectors (no terminal)​

In Claude, open Connectors, find Payments AI MoR, and click Connect. Sign in on the dashboard, approve scopes, and return to Claude.

Grok Connectors (no terminal)​

In Grok, open Connectors, click New Connector → Custom, and paste https://mor.payments.ai/api/mcp. Sign in on the dashboard, approve scopes, and return to Grok.

ChatGPT (developer mode)​

In ChatGPT, enable Developer mode, then add a custom MCP app with the same URL and complete OAuth.

Try it​

Copy this into your agent after the server is connected:

Prompt
Show me my Payments AI merchants. If none, create a sandbox merchant named Quickstart Demo, then create a $19.99/month product and give me the checkout URL.

You should see tool names (get_my_merchant, create_merchant_account, create_product) before each call runs.

Create a merchant

Create a sandbox merchant named "Quickstart Demo" with my email <your email> and my phone <your phone with country code>.

Use your own real, deliverable email address — create_merchant_account rejects example, disposable, and other reserved or undeliverable addresses. Use your own phone number too, starting with + and your country code, with no spaces or dashes (for example, +14155552671 is a US number, but not yours): KYC notifications are sent to it by SMS.

Create a product and plan, then open checkout

Create a sandbox product called "Starter Plan" with a $19.99/month recurring plan for merchant <merchantId>, then give me the hosted checkout URL to open in a browser.

Checkout branding

Show my checkout customization for merchant <merchantId> and update the button color to #2563EB.

Use sandbox merchant data for exploration. Mutating tools target sandbox until go-live.

Available tools​

ToolWhat it does
get_my_merchantList merchants this MCP key can act on (first call)
create_merchant_accountDual-provision live + sandbox merchant
get_merchant_activation_statusActivation status: pending, verification_pending, active
go_livePromote to live; a repeat call returns the current status
search_payments_ai_docsSearch PAI Managed documentation
create_productCreate product + pricing plans (sandbox until go-live)
create_orderPayable multi-item or caller-priced checkout (checkout:write)
list_productsList products and pricing plans for a merchant
get_product_image_upload_urlMint presigned POST for product image
confirm_product_imageAttach uploaded product image
get_checkout_customizationRead checkout theme and branding
update_checkout_customizationMerge-update checkout branding
set_checkout_logoMint → PUT → confirm checkout logo

The checkoutUrl returned by create_product and list_products is ready to open — use it verbatim. It already targets the right environment (sandbox URLs carry ?isSandbox=true; live URLs have no query param).

Going live​

go_live promotes the merchant to live routing only — it does not copy products, plans, or checkout customization. The live side starts with an empty catalog: call create_product again for every product and plan you want live, and re-apply any branding with update_checkout_customization on the same merchantId (after go_live it writes to live). set_checkout_logo always writes to sandbox, so the live logo cannot be set over MCP yet: upload it in the dashboard checkout builder (https://mor.payments.ai/checkout-builder) with Live selected. A sandbox checkout link stays sandbox-only forever (it always carries ?isSandbox=true) and never turns into a live link — read the new checkoutUrl from create_product or list_products on live instead of reusing the one you already showed.

The Sandbox Deployment needs no identity verification: products, checkout links and test transactions all work while KYC/KYB status stays not_started. On the Live Deployment, the merchant can process up to $5,000 in card transactions before identity verification is required — but payouts (withdrawing funds) always require completed KYC/KYB, independent of that $5,000 threshold, before a payout method can be added and before the first live payout.

Sandbox MCP URL​

For staging agents (build and test only in sandbox), connect to the sandbox MCP endpoint instead of the live URL:

https://sandbox.mor.payments.ai/api/mcp

Generate a pai_mcp_* token in Developer Tools while the dashboard is on Sandbox, or complete OAuth through the sandbox MCP server (its authorization server redirects to the dashboard with deployment=sandbox so consent calls the sandbox API). Live MCP tokens and live OAuth consent do not work on this URL. Merchant, product, and checkout writes stay on the sandbox schema. The go_live tool is not available here — promote merchants on the live MCP URL when you are ready.

Claude Connectors and the snippets above keep the live URL as the canonical directory entry.

Manual: User MCP Key​

Use this only if your client cannot do OAuth.

  1. Sign in to the Payments AI dashboard.
  2. Open Developer Tools → MCP Tokens and pick the Sandbox or Live tab.
  3. Click Generate MCP Token, enter a name and duration, choose the tool scopes the token may use, then click Generate Token. Copy your token (pai_mcp_*). It is shown only once.
  4. Paste the config below into your client (~/.cursor/mcp.json, Claude Desktop config, or equivalent), or run the Claude Code command.

A token belongs to the tab it was generated on. A Sandbox token works only with the sandbox MCP URL (https://sandbox.mor.payments.ai/api/mcp); a Live token works only with the live MCP URL (https://mor.payments.ai/api/mcp). The success dialog in the dashboard shows the matching URL. The examples below use the live URL.

{
"mcpServers": {
"payments-ai": {
"type": "streamableHttp",
"url": "https://mor.payments.ai/api/mcp",
"headers": {
"Authorization": "Bearer pai_mcp_<your-token>"
}
}
}
}
ClientWhere
CursorSettings → MCP → edit config (or ~/.cursor/mcp.json) → paste under mcpServers
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Claude CodeRun the Claude Code command above
Grok CLI~/.grok/config.toml

Restart your client after saving.

When the MCP endpoint answers 401​

The response body carries a machine-readable code and a docUrl to its Fix-It page. The WWW-Authenticate header keeps the OAuth discovery challenge.

codeMeaningFix
missing_tokenNo Authorization: Bearer headerMissing MCP token
invalid_tokenUnknown, revoked or malformed tokenInvalid MCP token
token_expiredThe token's duration has passedMCP token expired
token_validation_unavailableThe token could not be checked right now; retry, do not generate a new oneError catalog

Agent discovery​

Agents can fetch these without a key:

FileURL
Skillhttps://doc.mor.payments.ai/SKILL.md
Authhttps://doc.mor.payments.ai/auth.md
Concise indexhttps://doc.mor.payments.ai/llms.txt
Full indexhttps://doc.mor.payments.ai/llms-full.txt
Agent Skills indexhttps://doc.mor.payments.ai/.well-known/agent-skills/index.json
MCP Server Cardhttps://mor.payments.ai/.well-known/mcp/server-card.json
mkdir -p "$HOME/.payments-ai" && curl --fail --show-error --location \
--output "$HOME/.payments-ai/SKILL.md" \
"https://doc.mor.payments.ai/SKILL.md"

Host plugins still install from paymentsai/Payments-AI-skills (npx skills add paymentsai/Payments-AI-skills).

Privacy and support​

Next steps​