pp-mcp-server
v1.0.1
Published
The PayPal Model Context Protocol server allows you to integrate with PayPal APIs through function calling. This protocol supports various tools to interact with different PayPal services.
Downloads
13
Readme
MCP Server Project
The PayPal Model Context Protocol server allows you to integrate with PayPal APIs through function calling. This protocol supports various tools to interact with different PayPal services.
To run the MCP server using npx, use the following command:
npx -y paypal-mcpInstallation Steps
Prerequisites
- Install Node.js version 20 or greater. Check version with
node --version.
Install in Claude Desktop
If you are not familiar with how to setup MCP Servers with Claude Desktop, see this tutorial first.
Now add something like this to your Claude Desktop config:
// claude_desktop_config.json
{
"mcpServers": {
"paypal-mcp": {
"command": "npx",
"args": [
"-y",
"paypal-mcp"
],
"env": {
"PAYPAL_SERVER_SDK_LIB_ENVIRONMENT": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_TIMEOUT": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_ID": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_SECRET": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]"
}
}
}
}Install in VS Code
You can also use VS Code to run the MCP Server. The configuration is similar to Claude Desktop. See the official docs for details.
// settings.json
{
"mcp": {
"servers": {
"paypal-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"paypal-mcp"
],
"env": {
"PAYPAL_SERVER_SDK_LIB_ENVIRONMENT": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_TIMEOUT": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_ID": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]",
"PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_SECRET": "[YOUR-ENVIRONMENT-VARIABLE-VALUE-HERE]"
}
}
}
}
}Environment Variables
The following environment variables can be used:
PAYPAL_SERVER_SDK_LIB_ENVIRONMENT PAYPAL_SERVER_SDK_LIB_TIMEOUT: Timeout for API calls. PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_ID PAYPAL_SERVER_SDK_LIB_O_AUTH_CLIENT_SECRET
Available Tools
- CreateOrder: Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. Note: For error handling and troubleshooting, see Orders v2 errors.
- GetOrder: Shows details for an order, by ID. Note: For error handling and troubleshooting, see Orders v2 errors.
- PatchOrder: Updates an order with a
CREATEDorAPPROVEDstatus. You cannot update an order with theCOMPLETEDstatus. To make an update, you must provide areference_id. If you omit this value with an order that contains only one purchase unit, PayPal sets the value todefaultwhich enables you to use the path: \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. Note: For error handling and troubleshooting, see Orders v2 errors. Patchable attributes or objects: Attribute Op Notes intent replace payer replace, add Using replace op for payer will replace the whole payer object with the value sent in request. purchase_units replace, add purchase_units[].custom_id replace, add, remove purchase_units[].description replace, add, remove purchase_units[].payee.email replace purchase_units[].shipping.name replace, add purchase_units[].shipping.email_address replace, add purchase_units[].shipping.phone_number replace, add purchase_units[].shipping.options replace, add purchase_units[].shipping.address replace, add purchase_units[].shipping.type replace, add purchase_units[].soft_descriptor replace, remove purchase_units[].amount replace purchase_units[].items replace, add, remove purchase_units[].invoice_id replace, add, remove purchase_units[].payment_instruction replace purchase_units[].payment_instruction.disbursement_mode replace By default, disbursement_mode is INSTANT. purchase_units[].payment_instruction.payee_receivable_fx_rate_id replace, add, remove purchase_units[].payment_instruction.platform_fees replace, add, remove purchase_units[].supplementary_data.airline replace, add, remove purchase_units[].supplementary_data.card replace, add, remove application_context.client_configuration replace, add - ConfirmOrder: Payer confirms their intent to pay for the the Order with the given payment source.
- AuthorizeOrder: Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response. Note: For error handling and troubleshooting, see Orders v2 errors.
- CaptureOrder: Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response. Note: For error handling and troubleshooting, see Orders v2 errors.
- CreateOrderTracking: Adds tracking information for an Order.
- UpdateOrderTracking: Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects: Attribute Op Notes items replace Using replace op for items will replace the entire items object with the value sent in request. notify_payer replace, add status replace Only patching status to CANCELLED is currently supported.
- GetAuthorizedPayment: Shows details for an authorized payment, by ID.
- CaptureAuthorizedPayment: Captures an authorized payment, by ID.
- ReauthorizePayment: Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires. If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment. A reauthorized payment itself has a new honor period of three days. You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD. Supports only the
amountrequest parameter. Note: This request is currently not supported for Partner use cases. - VoidPayment: Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.
- GetCapturedPayment: Shows details for a captured payment, by ID.
- RefundCapturedPayment: Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
- GetRefund: Shows details for a refund, by ID.
- CreatePaymentToken: Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
- ListCustomerPaymentTokens: Returns all payment tokens for a customer.
- GetPaymentToken: Returns a readable representation of vaulted payment source associated with the payment token id.
- DeletePaymentToken: Delete the payment token associated with the payment token id.
- CreateSetupToken: Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
- GetSetupToken: Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
- request token: Create a new OAuth 2 token.
