Mcp Paypal

io.github.codespar由 GitHub 账号 codespar 发布v0.1.2更新于 Oct 24, 2026

MCP server for PayPal — global payments + payouts: Orders v2, Payments, Subscriptions, Disputes

发布方自己的服务:Paypal

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

本地 MCP 服务器,让助手通过 PayPal REST API 创建、捕获、退款和批量付款,并管理订阅与争议。

可以做什么
  • 创建、查询、授权并捕获 PayPal 订单,以及捕获或作废授权
  • 对已捕获付款发起退款,并查询付款详情
  • 创建和查询批量付款批次及单笔付款项
  • 创建、查询和取消计费订阅
  • 列出并查询争议,接受争议索赔
  • 列出应用 Webhook 并校验 Webhook 事件签名
适用场景
适合已拥有 PayPal 商家账户的商户或市场平台,希望由助手处理结账、付款、订阅和争议;建议先在 sandbox 环境试用。
运行要求
以 npm 包形式在本地通过 stdio 运行(npx @codespar/mcp-paypal),仅支持桌面客户端。需要 PayPal REST 应用的 client id 与 secret,分别放在 PAYPAL_CLIENT_ID 和 PAYPAL_CLIENT_SECRET,并用 PAYPAL_ENV 指定 sandbox(默认)或 live。需要访问 PayPal API 的网络连接。
安装前请注意
client secret 拥有该 PayPal 应用的完整支付权限,切勿写入日志或共享配置。多个工具会真实动账或改变状态:捕获、退款、作废授权、批量付款、取消订阅、接受争议索赔。将 PAYPAL_ENV 设为 live 会直接指向生产环境。服务器会原样转发任意 REST 请求体字段,请求不受已声明 schema 限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Paypal,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-paypal

MCP server for PayPal — global payments and payouts via the PayPal REST API.

Target customer: LatAm SaaS / marketplaces selling globally that already hold a PayPal merchant account and want agent-driven checkout, payouts, subscriptions, and dispute handling.

Tools (19)

ToolPurpose
create_orderCreate a PayPal Order via POST /v2/checkout/orders.
get_orderFetch a PayPal Order by id via GET /v2/checkout/orders/{id}.
capture_orderCapture payment for an approved order via POST /v2/checkout/orders/{id}/capture.
authorize_orderAuthorize payment for an approved order via POST /v2/checkout/orders/{id}/authorize.
capture_authorizationCapture a previously authorized payment via POST /v2/payments/authorizations/{id}/capture.
refund_captureRefund a captured payment via POST /v2/payments/captures/{id}/refund.
void_authorizationVoid (release) an unsettled authorization via POST /v2/payments/authorizations/{id}/void.
get_payment_detailsFetch a payment object by id via GET /v2/payments/{type}/{id}.
create_batch_payoutCreate a batch payout via POST /v1/payments/payouts.
get_payoutFetch a payout batch by id via GET /v1/payments/payouts/{batch_id}.
get_payout_itemFetch a single payout item by id via GET /v1/payments/payouts-item/{item_id}.
create_subscriptionCreate a billing subscription via POST /v1/billing/subscriptions.
get_subscriptionFetch a subscription by id via GET /v1/billing/subscriptions/{id}.
cancel_subscriptionCancel an active subscription via POST /v1/billing/subscriptions/{id}/cancel.
list_disputesList disputes via GET /v1/customer/disputes.
get_disputeFetch a dispute by id via GET /v1/customer/disputes/{id}.
accept_dispute_claimAccept liability for a dispute claim via POST /v1/customer/disputes/{id}/accept-claim.
list_webhooksList configured webhooks for the app via GET /v1/notifications/webhooks.
verify_webhook_signatureVerify a webhook event signature via POST /v1/notifications/verify-webhook-signature.

Install

bash
npm install @codespar/mcp-paypal

Environment

bash
PAYPAL_CLIENT_ID="..."       # REST app client idPAYPAL_CLIENT_SECRET="..."   # REST app client secret (OAuth2)PAYPAL_ENV="sandbox"         # 'sandbox' (default) or 'live'

Endpoints:

  • sandbox -> https://api-m.sandbox.paypal.com
  • live -> https://api-m.paypal.com

Authentication

PayPal REST APIs use OAuth2 client_credentials. The server posts CLIENT_ID:CLIENT_SECRET (Basic auth) to /v1/oauth2/token with grant_type=client_credentials and caches the bearer token until 60s before expiry, refreshing on demand.

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-paypal
# HTTP (for server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-paypal

Notes

  • Amounts are objects in PayPal REST: { "currency_code": "USD", "value": "10.50" }. Values are decimal strings.
  • The server forwards arbitrary REST body fields verbatim under body for tools that accept them, so any field documented in the PayPal REST reference can be passed even if it's not in the MCP inputSchema.
  • For payment captures / refunds the PayPal-Request-Id header (idempotency) is forwarded when supplied.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

来源:packages/payments/paypal/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Paypal 集成