跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 PayPal,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 处理你的 PayPal 商家账户:创建订单并收款、退款、创建、发送和催收发票、搜索交易记录和余额、查看争议,以及查询订阅计划、订阅和付款批次。支持沙盒或正式环境,使用你自己的 REST 应用密钥。
试试这样问
PayPal 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → PayPal、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
PayPal + Cursor
让你的 AI 处理你的 PayPal 商家账户:创建订单并收款、退款、创建、发送和催收发票、搜索交易记录和余额、查看争议,以及查询订阅计划、订阅和付款批次。支持沙盒或正式环境,使用你自己的 REST 应用密钥。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_API_URL
步骤 1 — 获取凭证
- 用你的 PayPal 商家账户登录 developer.paypal.com,打开 Apps & Credentials。顶部的开关可以在 Sandbox 和 Live 之间切换;两者各有自己的应用和密钥。
- 使用 Default Application,或点击 Create App,类型选择 Merchant;在沙盒中还要选择应用代为操作的沙盒商家账户。
- 打开应用,在功能列表中勾选 AI 需要用到的功能:Invoicing、Transaction Search、Subscriptions(也包括目录商品)、Customer Disputes 和 Payouts。
- 把 Client ID 复制到
PAYPAL_CLIENT_ID,把 Secret key 1(点击后显示)复制到PAYPAL_CLIENT_SECRET。两者必须来自同一个应用,并且来自同一个 Sandbox 或 Live 区域。 - 将
PAYPAL_API_URL设为https://api-m.sandbox.paypal.com(沙盒密钥)或https://api-m.paypal.com(正式密钥),末尾不要加斜杠。 - 安装连接器。不需要点击 Authorize with Provider,也没有 PayPal 授权页面:连接器用 client ID 和 secret 以你的 REST 应用身份登录。
- 先运行
paypal_get_balances,确认密钥连到了正确的账户(应用需要启用 Transaction Search)。
保持登录状态:连接器用 client ID 和 secret 获取访问令牌,并在过期前自动续期,因此无需重新登录。
新功能需要时间生效:如果应用已经签发过令牌,PayPal 为新勾选的功能授权最多可能需要 9 小时。在此之前,相关调用会返回 403 NOT_AUTHORIZED,所以请在首次安装前勾选所有需要的功能。
付款和邮件:paypal_capture_order、paypal_refund_capture 和 paypal_cancel_subscription 会在正式账户上转移或停止真实资金,paypal_send_invoice、paypal_remind_invoice 和 paypal_cancel_invoice 会给客户发邮件。AI 会先说明将发生什么(金额、币种、客户、ID),等你确认后再执行。收款和退款都带有请求 ID,因此重试不会重复执行。
权限和只读设置:应用只能使用你勾选的功能,所以不要勾选 AI 不该使用的功能。如需只读设置,请停用 paypal_create_order、paypal_capture_order、paypal_refund_capture、paypal_create_draft_invoice、paypal_send_invoice、paypal_remind_invoice、paypal_cancel_invoice 和 paypal_cancel_subscription。可以先用沙盒密钥安全地试用所有功能。
安装时默认关闭:paypal_delete_draft_invoice,它会永久删除草稿或计划发送的发票。只有在需要 AI 删除草稿时才开启;已发送的发票请改用 paypal_cancel_invoice 取消。
订单和退款:paypal_create_order 不会扣任何款。它会返回一个批准链接,买家必须打开并批准,之后 paypal_capture_order 才能收款。paypal_refund_capture 可以全额退还一笔收款,或在你指定金额时部分退款,上限是扣除之前退款后的剩余金额。
发票和交易记录:paypal_create_draft_invoice 创建的发票在 paypal_send_invoice 发送之前不会发出任何邮件,PayPal 每天最多允许发送 2 次催款提醒。paypal_search_transactions 每次调用最多覆盖 31 天(更长的时间段按月查询),最多可追溯 3 年;新交易和余额最多延迟 3 小时显示。争议最多可追溯 180 天。
常见错误:401 invalid_client 或 invalid_token 表示 client ID 或 secret 错误,或者密钥所属环境与 PAYPAL_API_URL 不一致(沙盒密钥需要沙盒 URL,正式密钥需要正式 URL)。403 NOT_AUTHORIZED 或 PERMISSION_DENIED 表示应用没有勾选该功能,或勾选还不到 9 小时。422 UNPROCESSABLE_ENTITY 会指出违反的业务规则,例如 ORDER_NOT_APPROVED(买家尚未批准)、AMOUNT_MISMATCH 或 CAPTURE_FULLY_REFUNDED。429 RATE_LIMIT_REACHED 表示 PayPal 正在限制该应用的请求:请等待一分钟后重试。
该连接器不支持银行卡付款和支付方式保存(vaulting)、Webhook、发送付款(payouts)、接受或回复争议,也不能编辑订阅计划。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Cursor 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:
{
"mcpServers": {
"anythingmcp": {
"url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启 Cursor。
- 打开 Cursor → Settings → MCP,确认
anythingmcp已列出并处于已连接状态。 - 开始对话,智能体现在可以调用
PayPal的工具。
可用工具
| Tool | What it does |
|---|---|
paypal_create_order | Create a checkout order (nothing is charged yet) |
paypal_get_order | Read one checkout order: status (CREATED, APPROVED, COMPLETED, VOIDED, ...), amounts, payer, and for completed orders the captures under… |
paypal_capture_order | Collect the money of an order the buyer has approved (intent CAPTURE) |
paypal_get_capture | Read one captured payment: amount, status (COMPLETED, PENDING, PARTIALLY_REFUNDED, REFUNDED, DECLINED), seller fees and net amount, and… |
paypal_refund_capture | Refund a captured payment, in full (no amount) or in part |
paypal_get_refund | Read one refund: amount, status (COMPLETED, PENDING, FAILED, CANCELLED), note to the payer and the capture it belongs to |
paypal_get_authorization | Read one authorized payment (an order created with intent AUTHORIZE): amount, status (CREATED, CAPTURED, PARTIALLY_CAPTURED, VOIDED… |
paypal_list_invoices | List invoices, newest first, with id, number, status, recipient, amount and due date |
paypal_search_invoices | Search invoices by recipient, number, status, currency, dates or amount (all filters combined with AND) |
paypal_create_draft_invoice | Create a draft invoice |
paypal_get_invoice | Read one invoice: status, recipient, items, amounts, due amount, payments and refunds recorded on it, and the payer link (links[] rel… |
paypal_send_invoice | Send a draft invoice |
paypal_remind_invoice | Email a payment reminder for a sent, unpaid invoice (PayPal allows 2 reminders a day) |
paypal_cancel_invoice | Cancel a sent invoice so it can no longer be paid; by default the recipient is told by email |
paypal_delete_draft_invoice | Delete a draft or scheduled invoice for good (sent invoices are cancelled with paypal_cancel_invoice instead) |
paypal_search_transactions | Search the account history (Transaction Search): payments received and sent, refunds, fees, transfers and their payer and cart details |
paypal_get_balances | Read the account balances per currency (available, withheld and total), now or as of a past time: balances[] with as_of_time |
paypal_list_disputes | List disputes, claims and chargebacks raised against the account (last 180 days), with dispute_id, reason, status, dispute_state, amount… |
paypal_get_dispute | Read one dispute in full: reason, status, amounts, disputed transactions, messages, offers, evidence and the deadline to respond… |
paypal_list_products | List catalog products (the products subscription plans belong to): id, name, description, type and dates |
paypal_get_product | Read one catalog product: name, description, type (PHYSICAL, DIGITAL, SERVICE), category, image and home URLs |
paypal_list_plans | List subscription plans, optionally for one product: id, name, status (CREATED, ACTIVE, INACTIVE), product_id and dates |
paypal_get_plan | Read one subscription plan: billing cycles with prices and frequency, trial periods, setup fee, taxes and payment failure settings |
paypal_list_subscriptions | List subscriptions, filtered by plan and status: id, status, plan_id, subscriber, start time and next billing time |
paypal_get_subscription | Read one subscription: status, plan, subscriber (name, email, shipping address), billing info (outstanding balance, last payment, next… |
paypal_list_subscription_transactions | List the payments of one subscription between two times: id, status, amounts with fees and net, payer and time |
paypal_cancel_subscription | Cancel a subscription for good: no further payments are collected and it cannot be reactivated |
paypal_get_payout_batch | Read one payout batch: batch status and totals, and its items (receiver, amount, status, fees, errors) |
示例提示
- “我现在的 PayPal 余额是多少?过去 7 天收到了哪些付款?”
- “为 Acme Ltd 创建一张发票草稿:10 小时咨询服务,每小时 90 EUR,30 天后到期。发送前先给我看看。”
- “哪些争议在等我回复?每个争议的回复截止时间是什么时候?”
- “列出 Pro Monthly 计划下所有有效的订阅,并告诉我哪些订阅有付款失败。”
FAQ
Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。
下一步
这份指南对你有帮助吗?