The PayPal Model Context Protocol server allows you to integrate with PayPal APIs through function calling, supporting various tools to interact with different PayPal services. This server makes it easy to work with PayPal functionalities using MCP-compatible AI assistants.
Run the PayPal MCP server directly using npx:
npx -y @paypal/mcp --tools=all PAYPAL_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" PAYPAL_ENVIRONMENT="SANDBOX"
Replace YOUR_ACCESS_TOKEN
with your actual PayPal access token.
Install Node.js (version 18+) from the Node.js official website
Configure PayPal Connector in Claude Desktop:
~/Claude/claude_desktop_config.json
with:{
"mcpServers": {
"paypal": {
"command": "npx",
"args": [
"-y",
"@paypal/mcp",
"--tools=all"
],
"env": {
"PAYPAL_ACCESS_TOKEN": "YOUR_PAYPAL_ACCESS_TOKEN",
"PAYPAL_ENVIRONMENT": "SANDBOX"
}
}
}
}
curl -v https://api-m.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "CLIENT_ID:CLIENT_SECRET" \
-d "grant_type=client_credentials"
Replace CLIENT_ID
and CLIENT_SECRET
with your actual credentials. For production, use https://api-m.paypal.com
instead.
The response will contain your access token:
{
"scope": "...",
"access_token": "Your Access Token",
"token_type": "Bearer",
"app_id": "APP-80W284485P519543T",
"expires_in": 32400,
"nonce": "..."
}
create_invoice
: Create a new invoicelist_invoices
: List invoices with optional paginationget_invoice
: Retrieve details of a specific invoicesend_invoice
: Send an invoice to recipientssend_invoice_reminder
: Send a reminder for an invoicecancel_sent_invoice
: Cancel a sent invoicegenerate_invoice_qr_code
: Generate a QR code for an invoicecreate_order
: Create an orderget_order
: Retrieve order detailspay_order
: Process payment for an authorized ordercreate_refund
: Process a refundget_refund
: Get refund detailslist_disputes
: Retrieve a summary of open disputesget_dispute
: Get details for a specific disputeaccept_dispute_claim
: Accept a dispute claimcreate_shipment_tracking
: Create a tracking recordget_shipment_tracking
: Retrieve tracking informationcreate_product
: Create a new productlist_products
: List productsshow_product_details
: Get product detailsupdate_product
: Update an existing productcreate_subscription_plan
: Create a subscription planupdate_plan
: Update a planlist_subscription_plans
: List subscription plansshow_subscription_plan_details
: Get plan detailscreate_subscription
: Create a subscriptionshow_subscription_details
: Get subscription detailsupdate_subscription
: Update a subscriptioncancel_subscription
: Cancel an active subscriptionlist_transactions
: List transactions with filtering optionsYou can configure the PayPal MCP server using these environment variables:
PAYPAL_ACCESS_TOKEN
: Your PayPal Access TokenPAYPAL_ENVIRONMENT
: Set to either SANDBOX
(for testing) or PRODUCTION
(default is SANDBOX
)There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.