Information
PayPal PayPal's official MCP server.
Model Context Protocol (MCP) facilitates the management and transmission of relevant information to models, ensuring their effective operation within specified contexts. Leveraging this technology, PayPal developed an MCP server that enables merchants to interact with their preferred MCP clients using natural language. This functionality allows users to efficiently perform various business tasks with their choice of MCP client.
## Set up MCP server
PayPal provides two ways for merchants to set up the MCP server:
### Running the MCP server locally.
This option enables developers to download, install, and run the MCP server locally.
### Using the MCP server remotely.
This option is for users who prefer not to install the MCP server locally. With remote MCP server support, users can continue their tasks across devices with a single login after authentication.
### Local MCP server
One way to use the MCP server is to run it locally. To do that, you must first install Node.js v18 or later. If you haven't already done so, visit the Node.js website to download and install it.
To install the MCP server in a local configuration:
Update the configuration file in your favorite MCP client:
Open the MCP client.
In the configuration settings for the client, locate the external tools or connectors configuration section, and add the PayPal connector configuration that follows this procedure. In Claude, for example, you add this to ~/Claude/claude_desktop_config.json.
In the new entry, replace YOUR_PAYPAL_ACCESS_TOKEN with your actual PayPal access token. Alternatively, you can set the PAYPAL_ACCESS_TOKEN as an environment variable. You also can pass it as an argument using --access-token in args.Set the PAYPAL_ENVIRONMENT to SANDBOX for testing or PRODUCTION for your production environment.
\`\`\`
\{
"mcpServers": \{
"paypal": \{
"command": "npx",
"args": [
"-y",
"@paypal/mcp",
"--tools=all"
],
"env": \{
"PAYPAL_ACCESS_TOKEN": "YOUR_PAYPAL_ACCESS_TOKEN",
"PAYPAL_ENVIRONMENT": "SANDBOX"
\}
\}
\}
\}
\`\`\`
Test your integration:
Quit and restart the MCP client to apply your changes.
Ask the MCP client to perform one of the supported tasks. For example, ask the MCP client to list your PayPal invoices for the last month.
### Remote MCP server
Another way of working with the MCP server is connecting remotely. Use your preferred MCP client for this procedure.
1. Open the configuration file for your MCP client in a text editor, and replace the configuration with the following configuration:
\`\`\`
\{
"mcpServers": \{
"paypal-mcp-server": \{
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.paypal.com/sse"
]
\}
\}
\}
\`\`\`
2. Save the file, and restart your MCP client. The MCP client will send you to the PayPal login page.
3. Provide your consent for the client to work with the MCP server:
Log into PayPal when the login page appears.
Authorize the client to work with the MCP server.
4. Quit and reopen your MCP client.
5. To test your integration, ask the MCP client to perform one of the supported tasks. For example, ask it to create an invoice for landscaping services for Green Lawns for $200 with a date of last Friday.
If you have trouble connecting after completing this procedure, clear the files that the integration adds to ~/.mcp-auth:
\`\`\`
rm -rf ~/.mcp-auth
\`\`\`
Also be aware that emerging technology, like MCP and MCP clients, can come with performance issues or other challenges initially. For example, Windows users with Cursor might encounter a known issue when connecting to the MCP server remotely.
### MCP server tools
PayPal’s MCP server offers various tools for performing several jobs.
### Local MCP server tools
The [complete catalog of tools](https://developer.paypal.com/tools/agent-toolkit/#available-tools) is available in local installations.
### Remote MCP server tools
Remote MCP server currently offers the following 3 tools with more coming soon.
### Creating invoices
Using your favorite MCP client with the MCP server to create invoices offers several advantages over creating invoices in a more traditional way. For example, a merchant can use natural language with an MCP client to process multiple invoice requests by using a drive-system connector or a file-system connector. With this connection, users can ask the MCP client to perform a PayPal-related task, the MCP clients access their records for the data, and then the client uses that data to send PayPal invoices to multiple customers in bulk.
For example, a user asks the MCP client to create an invoice with PayPal.
Reply