npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codespar/mcp-paypal

v0.1.1

Published

MCP server for PayPal — global payments and payouts via the PayPal REST API. Orders v2 (create/authorize/capture), Payments v2 (capture/refund/void), Payouts, Subscriptions, Disputes, Webhooks.

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)

| 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.

License

MIT