MCP server
Last updated: Apr 25th, 9:10am
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.
Examples in this content use Claude as the MCP client, but you can use any MCP client that you prefer, such as Cursor or Cline.
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.
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 thePAYPAL_ACCESS_TOKEN
as an environment variable. You also can pass it as an argument using--access-token
inargs
.
Set thePAYPAL_ENVIRONMENT
toSANDBOX
for testing orPRODUCTION
for your production environment.
- 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.
1{2 "mcpServers": {3 "paypal": {4 "command": "npx",5 "args": [6 "-y",7 "@paypal/mcp",8 "--tools=all"9 ],10 "env": {11 "PAYPAL_ACCESS_TOKEN": "YOUR_PAYPAL_ACCESS_TOKEN",12 "PAYPAL_ENVIRONMENT": "SANDBOX"13 }14 }15 }16}
MCP server tools
PayPal’s MCP server offers various tools for performing several jobs.
Local MCP server tools
The complete catalog of 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.
The user supplies the necessary information, as the MCP client indicates. Then the MCP client accesses the necessary data, creates the invoice using the MCP server, and then it sends the invoice, as shown in the following illustration.
The following example shows a sample of the invoice the customer receives.
Listing invoices
This tool provides an organized listing of invoices that a merchant or service provider issues through PayPal. It enables the merchant or service provider to access and analyze essential data, including:
- Identifying unpaid customer invoices
- Monitoring invoice-related trends over specified timeframes
Using this tool, a user can enhance their financial oversight and streamline their invoicing processes.
Reporting and insights
This tool provides PayPal transaction data within a specified timeframe, providing a comprehensive view of sales activity.