
How to add PayPal MCP Server to Windsurf
Official PayPal server for invoices, orders, payments, disputes, subscriptions, and catalog. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 15, 2026 · 250★ · stdio · apikey · official
Windsurf config for PayPal MCP Server
npx -y @paypal/mcp --tools=all{
"mcpServers": {
"paypal-mcp-server": {
"command": "npx",
"args": [
"-y",
"@paypal/mcp",
"--tools=all"
],
"env": {
"PAYPAL_ENVIRONMENT": "SANDBOX",
"PAYPAL_ACCESS_TOKEN": "<your-paypal-access-token>"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the PayPal MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5PayPal MCP Server's tools become available to Cascade.
Before you start
- Node.js 18+ (the server runs via npx)
- A PayPal Developer account (for Sandbox) or a PayPal Business account (for Production)
- A Client ID and Client Secret from the PayPal Developer Dashboard (https://developer.paypal.com)
- An OAuth2 access token obtained from those credentials via the client_credentials grant, supplied as PAYPAL_ACCESS_TOKEN
What PayPal MCP Server can do in Windsurf
create_invoiceCreate a draft invoice.
send_invoiceSend an invoice; send_invoice_reminder and cancel_sent_invoice manage it after.
generate_invoice_qr_codeProduce a QR code for an invoice.
list_invoicesList invoices; get_invoice fetches one.
create_orderCreate a PayPal order.
pay_orderCapture/process payment on an order; get_order retrieves it.
create_refundRefund a captured payment; get_refund reads refund status.
list_disputesList disputes; get_dispute and accept_dispute_claim handle them.
Security
Uses a PayPal access token that can create real charges and refunds; start in SANDBOX and only switch PAYPAL_ENVIRONMENT to PRODUCTION once flows are verified. Scope the access token to the minimum needed.
PayPal MCP Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the PayPal MCP Server config there under the "mcpServers" key and restart the client.
Is PayPal MCP Server safe to use with Windsurf?
Uses a PayPal access token that can create real charges and refunds; start in SANDBOX and only switch PAYPAL_ENVIRONMENT to PRODUCTION once flows are verified. Scope the access token to the minimum needed.
How do I authenticate?
Get a Client ID and Secret from the PayPal Developer Dashboard, exchange them for an OAuth2 access token using the client_credentials grant, and pass it as the PAYPAL_ACCESS_TOKEN env var.
Sandbox vs Production — how do I switch?
Set PAYPAL_ENVIRONMENT to SANDBOX for testing or PRODUCTION for live transactions. Test thoroughly in Sandbox before going live.
My access token stopped working — why?
PayPal OAuth access tokens expire. Re-run the client_credentials request to mint a fresh token and update PAYPAL_ACCESS_TOKEN; tokens for Sandbox and Production are not interchangeable.