MCP server quickstart guide
Model Context Protocol (MCP) helps manage and send important information to models. This ensures models work well in the right situations. PayPal uses this technology to offer an MCP server. Merchants can use it to talk to their favorite MCP clients in plain language. This makes it easier to do business tasks.
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. With remote MCP server, users can continue their tasks across devices with a single login after authentication.
Note: Examples use Claude as the MCP client, but you can use any MCP client that you prefer, such as Cursor or Cline.
Local MCP server
You can use the MCP server by running it on your own computer. First, install Node.js version 18 or later. If you do not have Node.js, go to the Node.js website to download and install it.
- To update the configuration settings for your MCP client, locate the external tools or connectors section in the client's configuration, and add the PayPal connector configuration. In Claude, for example, you add the following configuration to
~/Claude/claude_desktop_config.json
.
{
"mcpServers": {
"paypal": {
"command": "npx",
"args": [
"-y",
"@paypal/mcp",
"--tools=all"
],
"env": {
"PAYPAL_ACCESS_TOKEN": "YOUR_PAYPAL_ACCESS_TOKEN",
"PAYPAL_ENVIRONMENT": "SANDBOX"
}
}
}
}
-
In the new entry, replace
YOUR_PAYPAL_ACCESS_TOKEN
with your real PayPal access token, and set thePAYPAL_ENVIRONMENT
toSANDBOX
for testing orPRODUCTION
for your live site. You can also set thePAYPAL_ACCESS_TOKEN
as an environment variable, or pass it as an argument with--access-token
inargs
. -
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.
Tip: If your test doesn't produce the results you expect, try these ideas from the Model Context Protocol site.
Remote MCP server
You can use any MCP client for these steps.
Configure your transport method
The remote MCP server supports two ways to connect:
SSE
To use SSE, open your MCP client’s configuration file in a text editor. Replace its contents with the following one.
{
"mcpServers": {
"paypal-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.paypal.com/sse"
]
}
}
}
Streamable HTTP
With streamable HTTP, customers get responses right away. An app can show results as soon as they are ready. This helps avoid waiting and loading screens.
To use streamable HTTP, open your MCP client’s configuration file in a text editor. Replace its contents with the following one.
{
"mcpServers": {
"paypal-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.paypal.com/mcp"
]
}
}
}
Connect to MCP server
- Save the file, and restart your MCP client. The MCP client opens the PayPal login page.
- Log in to PayPal and give your consent for the client to use the MCP server.
- Quit and reopen your MCP client.
- To test, ask the MCP client to do a supported task. For example, ask it to create an invoice for Green Lawns for $200, dated last Friday.
Tip: If you have trouble connecting, try deleting the files in
~/.mcp-auth
by running:
rm -rf ~/.mcp-auth
New technology like MCP and MCP clients may have some issues at first. For example, Windows users with Cursor might have trouble connecting to the MCP server remotely.
MCP server tools
PayPal’s MCP server offers a variety of helpful tools for performing many jobs. The complete catalog of tools is available in both local and remote MCP server.
The following example shows how you might use these tools.
Example: Create an invoice using MCP server tools
Using your favorite MCP client with the MCP server to create invoices is better than creating invoices in a more traditional way. For example, a shop 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, which allows the clients to access their records for data and then send PayPal invoices to 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 says. Then, the MCP client accesses the necessary data, creates the invoice using the MCP server, and sends it to PayPal.
The following example shows a sample of the invoice that a customer receives.