Set up a local 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:

1

Update the configuration file in your favorite MCP client

  1. Open the MCP client.

  2. 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.

  3. 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"
           }
         }
       }
    } 
2

Test your integration

  1. Quit and restart the MCP client to apply your changes.

  2. 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.

If your test doesn't produce the results you expect, try the ideas here.

Last updated

Was this helpful?