Paypal MCP server

Finance and commerce

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

Your AI app calls the Paypal MCP server, which does the finance and commerce work and sends the result back to the chat.

About Paypal

Paypal is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for PayPal, global payments + payouts: Orders v2, Payments, Subscriptions, Disputes.

Paypal runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-paypal@0.1.2 and talks to it over standard input and output. It needs PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET set before Paypal starts.

Paypal is listed in the official MCP registry as io.github.codespar/mcp-paypal, version 0.1.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-paypal
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-paypal

How to set up Paypal

  1. Install Node.js on the machine that runs your AI app, because Paypal starts with npx and downloads its package on first run.
  2. Create PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET for Paypal in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Paypal to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Paypal tools to confirm the connection.
  5. Run one read-only task with Paypal first, and keep your app asking before each tool call until the results look right.

Paypal compared with similar servers

  • Payway by codespar has fewer GitHub stars than Paypal (278 against 278); both are community servers, and both run locally.
  • Pagseguro by codespar has fewer GitHub stars than Paypal (278 against 278); both are community servers, and both run locally.
  • Persona by codespar has fewer GitHub stars than Paypal (278 against 278); both are community servers, and both run locally.

Before you connect Paypal

  • Give Paypal its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Paypal tool call until you trust what it does with them.
  • Treat text that Paypal fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Paypal on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Paypal

How marketing and sales teams put Paypal to work, by company size. Pick the size closest to yours and start Paypal on one use case.

Small business

  • A small business can ask Paypal which products and customers drive margin, then plan promotions around them.
  • Owners can use Paypal to check refunds, failed payments and churn reasons without opening three dashboards.
  • Paypal runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Paypal to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Paypal to check spend against budget each week and move money to what's working.
  • Start Paypal on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Paypal read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Paypal to answer revenue questions by channel and region with figures finance signs off on.
  • Paypal is a community server, so have security review the code and pin a version before Paypal touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Paypal README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@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)

Tool Purpose
create_order Create a PayPal Order via POST /v2/checkout/orders.
get_order Fetch a PayPal Order by id via GET /v2/checkout/orders/{id}.
capture_order Capture payment for an approved order via POST /v2/checkout/orders/{id}/capture.
authorize_order Authorize payment for an approved order via POST /v2/checkout/orders/{id}/authorize.
capture_authorization Capture a previously authorized payment via POST /v2/payments/authorizations/{id}/capture.
refund_capture Refund a captured payment via POST /v2/payments/captures/{id}/refund.
void_authorization Void (release) an unsettled authorization via POST /v2/payments/authorizations/{id}/void.
get_payment_details Fetch a payment object by id via GET /v2/payments/{type}/{id}.
create_batch_payout Create a batch payout via POST /v1/payments/payouts.
get_payout Fetch a payout batch by id via GET /v1/payments/payouts/{batch_id}.
get_payout_item Fetch a single payout item by id via GET /v1/payments/payouts-item/{item_id}.
create_subscription Create a billing subscription via POST /v1/billing/subscriptions.
get_subscription Fetch a subscription by id via GET /v1/billing/subscriptions/{id}.
cancel_subscription Cancel an active subscription via POST /v1/billing/subscriptions/{id}/cancel.
list_disputes List disputes via GET /v1/customer/disputes.
get_dispute Fetch a dispute by id via GET /v1/customer/disputes/{id}.
accept_dispute_claim Accept liability for a dispute claim via POST /v1/customer/disputes/{id}/accept-claim.
list_webhooks List configured webhooks for the app via GET /v1/notifications/webhooks.
verify_webhook_signature Verify a webhook event signature via POST /v1/notifications/verify-webhook-signature.

Install

npm install @codespar/mcp-paypal

Environment

PAYPAL_CLIENT_ID="..."       # REST app client id
PAYPAL_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

# 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

Questions about Paypal

What is the Paypal MCP server?

MCP server for PayPal, global payments + payouts: Orders v2, Payments, Subscriptions, Disputes. Paypal is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Paypal MCP server?

Add Paypal to your AI app's MCP config with the command npx -y @codespar/mcp-paypal@0.1.2. In Claude Code, run claude mcp add --transport stdio codespar-paypal -- npx -y @codespar/mcp-paypal@0.1.2. To run Paypal this way you need Node.js installed.

Does Paypal need an API key?

Yes. Paypal expects PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET to be set. Create the key for Paypal in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Paypal an official MCP server?

No. Paypal is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Paypal access to company data.

What license is Paypal under?

Paypal is released under the MIT license, according to its GitHub repository. The license covers the code of Paypal; the service it connects to has its own terms.