> For the complete documentation index, see [llms.txt](https://paypal.gitbook.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paypal.gitbook.com/agent-toolkit-and-mcp-server/mcp-server/set-up-a-remote-mcp-server.md).

# Set up a remote MCP server

Another way of working with the MCP server is connecting remotely. Use your preferred MCP client for this procedure.

To install the MCP server in a remote configuration:&#x20;

{% stepper %}
{% step %}
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"
      ]
    }
  }
}
```

{% endstep %}

{% step %}
Save the file, and restart your MCP client. The MCP client will send you to the PayPal login page.
{% endstep %}

{% step %}
Provide your consent for the client to work with the MCP server

1. Log into PayPal when the login page appears.
2. Authorize the client to work with the MCP server.
   {% endstep %}

{% step %}
Quit and reopen your MCP client.
{% endstep %}

{% step %}
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.

{% hint style="info" %}
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.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://paypal.gitbook.com/agent-toolkit-and-mcp-server/mcp-server/set-up-a-remote-mcp-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
