Skip to main content
MCP server CX Codex

mcp-paypal — Claude Code MCP server: what it does, how to install

MCP server connecting AI assistants to the PayPal REST API. Handles order checkout, recurring subscriptions, batch payouts, and customer dispute resolution.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PAYPAL_CLIENT_ID=<PAYPAL_CLIENT_ID> --env PAYPAL_CLIENT_SECRET=<PAYPAL_CLIENT_SECRET> --env PAYPAL_ENV=<PAYPAL_ENV> --transport stdio paypal -- npx -y @codespar/mcp-paypal
Open on GitHub

What mcp-paypal does

This server exposes 19 tools for interacting with PayPal services. It allows agents to generate orders, authorize and capture charges, issue refunds, or release authorizations. Beyond direct checkout, it handles batch payouts, manages recurring billing subscriptions, and inspects incoming webhook event signatures. When dealing with conflicts, agents can retrieve dispute details or accept buyer claims.

The package runs over stdio or as an HTTP service on port 3000. It authenticates via OAuth2 client_credentials, posting credentials to the token endpoint and caching access tokens until 60 seconds before expiration. For captures and refunds, the server passes the PayPal-Request-Id header to ensure idempotency across retries.

Without valid credentials in PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET, requests fail immediately. Pay attention to transaction amounts: PayPal expects an object with a currency code and a decimal string value.

What it helps with

  • create and capture PayPal orders using checkout endpoints
  • distribute batch payouts to external recipients
  • set up, inspect, and cancel recurring billing subscriptions
  • track customer disputes and accept liability on open claims
  • validate signatures on received webhook notifications

Example prompts for the agent

  • Create a PayPal order for 24.00 USD for item SKU-104
  • Fetch the status of the payout batch with ID batch-8812
  • List recent customer disputes and inspect the claim details for dispute-550

How to install mcp-paypal

Platform CLI

claude mcp add --env PAYPAL_CLIENT_ID=<PAYPAL_CLIENT_ID> --env PAYPAL_CLIENT_SECRET=<PAYPAL_CLIENT_SECRET> --env PAYPAL_ENV=<PAYPAL_ENV> --transport stdio paypal -- npx -y @codespar/mcp-paypal

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-paypal

How do I install mcp-paypal in Claude Code?

Run claude mcp add mcp-paypal -e PAYPAL_CLIENT_ID=<PAYPAL_CLIENT_ID> -e PAYPAL_CLIENT_SECRET=<PAYPAL_CLIENT_SECRET> -- npx -y @codespar/mcp-paypal. Replace placeholders with your PayPal REST credentials.

What does mcp-paypal do?

It equips your AI model with 19 tools to run payment checkouts, initiate payouts, handle subscription billing, and process buyer dispute claims.

How does environment switching work?

Set PAYPAL_ENV="live" to route traffic to the production endpoint. By default, the server runs in sandbox mode against api-m.sandbox.paypal.com.

Similar MCP servers

Everything for Finance and business →

From the same set124

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor