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 to | Use |
|---|---|
| Give an agent the Payments AI tools | MCP server — the rest of this page |
| Build and test without touching live data | Sandbox MCP server — Sandbox MCP URL |
| Let an agent answer questions from these docs | search_payments_ai_docs, shipped with the MCP server |
| Teach an agent our conventions before it writes code | Skill — Agent discovery |
| Feed these docs to an agent that cannot speak MCP | llms.txt and raw Markdown — Agent discovery |
| Call the API yourself, without an agent | Public 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.
{
"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.
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.
{
"mcpServers": {
"payments-ai": {
"url": "https://mor.payments.ai/api/mcp"
}
}
}Fastest path
One click installs the server and opens the OAuth prompt.
Add to CursorOpens Cursor and pre-fills the server, then approve it in Settings → MCP.
Or let your agent do it
Tailored for Cursor. Paste this into the chat.
Add the Payments AI MCP server to Cursor using OAuth. Do not ask me for a token.
Merge this into ~/.cursor/mcp.json (and .cursor/mcp.json if a project is open):
{ "mcpServers": { "payments-ai": { "url": "https://mor.payments.ai/api/mcp" } } }
Then tell me to open Settings → MCP and click Connect.
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to ~/.cursor/mcp.json, then restart Cursor.
{
"mcpServers": {
"payments-ai": {
"url": "https://mor.payments.ai/api/mcp"
}
}
}Client-side details: Cursor MCP documentation
Fastest path
One command. Claude Code opens the browser for OAuth on first use.
claude mcp add --transport http payments-ai https://mor.payments.ai/api/mcpRun /mcp inside Claude Code to confirm payments-ai is connected.
Or let your agent do it
Tailored for Claude Code. Paste this into the chat.
Add the Payments AI MCP server to Claude Code using OAuth. Do not ask me for a token.
Run: claude mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
If it needs authorising, run: claude mcp login payments-ai
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to .mcp.json, then restart Claude Code.
{
"mcpServers": {
"payments-ai": {
"type": "http",
"url": "https://mor.payments.ai/api/mcp"
}
}
}Client-side details: Claude Code MCP documentation
Fastest path
On grok.com, add a custom connector. In Grok CLI, one command starts OAuth.
Open Grok ConnectorsClick New Connector → Custom, paste https://mor.payments.ai/api/mcp, then approve OAuth.
Or let your agent do it
Tailored for Grok. Paste this into the chat.
Add the Payments AI MCP server to Grok using OAuth. Do not ask me for a token.
If you are Grok CLI, run: grok mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
If you are Grok on the web, tell me to open https://grok.com/connectors, click New Connector → Custom, and paste https://mor.payments.ai/api/mcp.
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to ~/.grok/config.toml, then restart Grok.
[mcp_servers.payments-ai]
url = "https://mor.payments.ai/api/mcp"Client-side details: Grok Connectors documentation
Fastest path
Developer mode lets you add a custom MCP app and complete OAuth in the browser.
Open ChatGPTEnable Developer mode, then Settings → Apps → create a custom MCP connector with https://mor.payments.ai/api/mcp.
Or let your agent do it
Tailored for ChatGPT. Paste this into the chat.
Add the Payments AI MCP server to ChatGPT using OAuth. Do not ask me for a token.
Tell me to enable Developer mode, then create a custom MCP app with URL https://mor.payments.ai/api/mcp and approve OAuth.
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to ChatGPT Settings → Apps (Developer mode), then restart ChatGPT.
{
"mcpServers": {
"payments-ai": {
"url": "https://mor.payments.ai/api/mcp"
}
}
}Client-side details: ChatGPT MCP documentation
Fastest path
Two commands: add the server, then authorise it.
codex mcp add payments-ai --url https://mor.payments.ai/api/mcp
codex mcp login payments-ailogin opens the browser. Codex keeps the token in its own credential store.
Or let your agent do it
Tailored for Codex. Paste this into the chat.
Add the Payments AI MCP server to Codex using OAuth. Do not ask me for a token.
Run:
codex mcp add payments-ai --url https://mor.payments.ai/api/mcp
codex mcp login payments-ai
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to ~/.codex/config.toml, then restart Codex.
[mcp_servers.payments-ai]
url = "https://mor.payments.ai/api/mcp"Client-side details: Codex MCP documentation
Fastest path
One command. Gemini CLI handles the OAuth round-trip.
gemini mcp add --transport http payments-ai https://mor.payments.ai/api/mcpRun /mcp list inside Gemini CLI to confirm the server is connected.
Or let your agent do it
Tailored for Gemini CLI. Paste this into the chat.
Add the Payments AI MCP server to Gemini CLI using OAuth. Do not ask me for a token.
Run: gemini mcp add --transport http payments-ai https://mor.payments.ai/api/mcp
Complete the browser OAuth prompt if one appears.
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to ~/.gemini/settings.json, then restart Gemini CLI.
{
"mcpServers": {
"payments-ai": {
"httpUrl": "https://mor.payments.ai/api/mcp"
}
}
}Client-side details: Gemini CLI MCP documentation
Fastest path
One command from any terminal. VS Code registers the server for Copilot agent mode.
code --add-mcp '{"name":"payments-ai","type":"http","url":"https://mor.payments.ai/api/mcp"}'Then open the Copilot chat Agent picker and approve the OAuth prompt.
Or let your agent do it
Tailored for VS Code. Paste this into the chat.
Add the Payments AI MCP server to VS Code using OAuth. Do not ask me for a token.
Run: code --add-mcp '{"name":"payments-ai","type":"http","url":"https://mor.payments.ai/api/mcp"}'
Then open the Copilot chat Agent picker and approve the OAuth prompt.
Then call get_my_merchant and reply: Payments AI MCP is connected.Manual configuration
Add to .vscode/mcp.json, then restart VS Code.
{
"servers": {
"payments-ai": {
"type": "http",
"url": "https://mor.payments.ai/api/mcp"
}
}
}Client-side details: VS Code MCP documentation
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:
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
| Tool | What it does |
|---|---|
get_my_merchant | List merchants this MCP key can act on (first call) |
create_merchant_account | Dual-provision live + sandbox merchant |
get_merchant_activation_status | Activation status: pending, verification_pending, active |
go_live | Promote to live; a repeat call returns the current status |
search_payments_ai_docs | Search PAI Managed documentation |
create_product | Create product + pricing plans (sandbox until go-live) |
create_order | Payable multi-item or caller-priced checkout (checkout:write) |
list_products | List products and pricing plans for a merchant |
get_product_image_upload_url | Mint presigned POST for product image |
confirm_product_image | Attach uploaded product image |
get_checkout_customization | Read checkout theme and branding |
update_checkout_customization | Merge-update checkout branding |
set_checkout_logo | Mint → 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.
- Sign in to the Payments AI dashboard.
- Open Developer Tools → MCP Tokens and pick the Sandbox or Live tab.
- 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. - 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>"
}
}
}
}| Client | Where |
|---|---|
| Cursor | Settings → 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 Code | Run 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.
code | Meaning | Fix |
|---|---|---|
missing_token | No Authorization: Bearer header | Missing MCP token |
invalid_token | Unknown, revoked or malformed token | Invalid MCP token |
token_expired | The token's duration has passed | MCP token expired |
token_validation_unavailable | The token could not be checked right now; retry, do not generate a new one | Error catalog |
Agent discovery
Agents can fetch these without a key:
| File | URL |
|---|---|
| Skill | https://doc.mor.payments.ai/SKILL.md |
| Auth | https://doc.mor.payments.ai/auth.md |
| Concise index | https://doc.mor.payments.ai/llms.txt |
| Full index | https://doc.mor.payments.ai/llms-full.txt |
| Agent Skills index | https://doc.mor.payments.ai/.well-known/agent-skills/index.json |
| MCP Server Card | https://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
- Privacy policy: payments.ai/mor/privacy-policy
- Product & technical support: merchants@payments.ai (see Getting help)
Next steps
- Quickstart: first sandbox API call
- Webhooks: signed events sent to your server
- API Reference: OpenAPI contracts