local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Integrates with PayPal APIs to manage invoices, offering tools to create new invoices and list existing ones through function calling.
PayPal Model Context Protocol
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 PayPal MCP server using npx, use the following command:
Replace YOUR_ACCESS_TOKEN
with your PayPal access token. Refer this on how to generate a PayPal access token. Alternatively, you could set the PAYPAL_ACCESS_TOKEN in your environment variables.
Usage with MCP host (Claude Desktop/Cline/Cursor/Github Co-Pilot)
This guide explains how to integrate the PayPal connector with Claude Desktop.
Prerequisites
- Claude Desktop application installed
- installing Node.js locally
Installation Steps
1. Install Node.js
Node.js is required for the PayPal connector to function:
- Visit the Node.js official website, download and install it.
- Requirements: Node 18+
2. Configure PayPal Connector with MCP host (Claude desktop / Cursor / Cline)
We will show the integration with Claude desktop. You can use your favorite MCP host.
- Open Claude Desktop
- Navigate to Settings
- Find the Developer or Advanced settings section
- Locate the external tools or connectors configuration area
- Add the following PayPal connector configuration to this ~/Claude/claude_desktop_config.json:
Make sure to replace YOUR_PAYPAL_ACCESS_TOKEN
with your actual PayPal Access Token. Alternatively, you could set the PAYPAL_ACCESS_TOKEN as an environment variable. You can also pass it as an argument using --access-token in "args"
Set PAYPAL_ENVIRONMENT
value as either SANDBOX
for stage testing and PRODUCTION
for production environment.
- Save your configuration changes
3. Test the Integration
- Quit and restart Claude Desktop to apply changes
- Test the connection by asking Claude to perform a PayPal-related task
- Example: "List my PayPal invoices"
Available tools
Tool | Description |
---|---|
invoices.create | Create a new invoice |
invoices.list | List invoices |
Environment Variables
The following environment variables can be used:
PAYPAL_ACCESS_TOKEN
: Your PayPal Access TokenPAYPAL_ENVIRONMENT
: Set toSANDBOX
for sandbox mode,PRODUCTION
for production (defaults toSANDBOX
mode)
This guide explains how to generate an access token for PayPal API integration, including how to find your client ID and client secret.
Prerequisites
- PayPal Developer account (for Sandbox)
- PayPal Business account (for production)
Finding Your Client ID and Client Secret
- Create a PayPal Developer Account:
- Go to PayPal Developer Dashboard
- Sign up or log in with your PayPal credentials
- Access Your Credentials:
- In the Developer Dashboard, click on Apps & Credentials in the menu
- Switch between Sandbox and Live modes depending on your needs
- Create or View an App:
- To create a new app, click Create App
- Give your app a name and select a Business account to associate with it
- For existing apps, click on the app name to view details
- Retrieve Credentials:
- Once your app is created or selected, you'll see a screen with your:
- Client ID: A public identifier for your app
- Client Secret: A private key (shown after clicking "Show")
- Save these credentials securely as they are required for generating access tokens
- Once your app is created or selected, you'll see a screen with your:
Generating an Access Token
Using cURL
Replace CLIENT_ID
and CLIENT_SECRET
with your actual credentials. For production, use https://api-m.paypal.com
instead of the sandbox URL.
Using Postman
- Create a new request to
https://api-m.sandbox.paypal.com/v1/oauth2/token
- Set method to POST
- Under Authorization, select Basic Auth and enter your Client ID and Client Secret
- Under Body, select x-www-form-urlencoded and add a key
grant_type
with valueclient_credentials
- Send the request
Response
A successful response will look like:
Copy the access_token
value for use in your Claude Desktop integration.
Token Details
- Sandbox Tokens: Valid for 3-8 hours
- Production Tokens: Valid for 8 hours
- It's recommended to implement token refresh logic before expiration
Using the Token with Claude Desktop
Once you have your access token, update the PAYPAL_ACCESS_TOKEN
value in your Claude Desktop connector configuration:
Best Practices
- Store client ID and client secret securely
- Implement token refresh logic to handle token expiration
- Use environment-specific tokens (sandbox for testing, production for real transactions)
- Avoid hardcoding tokens in application code
Disclaimer
@paypal/mcp
provides access to AI-generated content that may be inaccurate or incomplete. Users are responsible for independently verifying any information before relying on it. PayPal makes no guarantees regarding output accuracy and is not liable for any decisions, actions, or consequences resulting from its use.
This server cannot be installed
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.