> For the complete documentation index, see [llms.txt](https://docs.parcellab.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parcellab.com/docs/developers/agents/mcp-server.md).

# MCP Server

Connect AI assistants such as Claude to your parcelLab account through the hosted parcelLab MCP server.

parcelLab hosts a [Model Context Protocol](https://modelcontextprotocol.io/) server so AI assistants can read and change your parcelLab setup on your behalf. It is the same configuration surface the parcelLab App uses, exposed as tools: journeys and messages, Order Status Pages, Returns Portals, themes and translations, campaigns, claims, notifications and documentation search.

| Endpoint                                  | Scope                                                                                        |
| ----------------------------------------- | -------------------------------------------------------------------------------------------- |
| `https://agents.parcellab.com/admin/mcp/` | Account configuration. Behind the **parcelLab** connector in the Claude connector directory. |
| `https://agents.parcellab.com/mcp/`       | Shopper-facing lookups only: public order status and the return registration flow.           |

## Requirements

* A parcelLab App user. There are no separate MCP credentials; the assistant acts as the user who signs in.
* The **OpenAI** opt-in enabled on the account.
* An MCP client with OAuth support and the Streamable HTTP transport. Claude (web, desktop, Claude Code), Cursor and VS Code qualify.

## Connect

In Claude, open **Settings** > **Connectors**, choose **parcelLab** and click **Connect**. For a custom connector or any other client, use the endpoint URL above. The client opens the parcelLab login in your browser; sign in, approve the access request and return to the client.

```bash
claude mcp add --transport http parcellab https://agents.parcellab.com/admin/mcp/
```

## Authentication and authorization

The server is an OAuth 2.1 resource server with dynamic client registration and PKCE. Sign-in is delegated to the parcelLab login, including customer SSO. Access tokens carry the user's accounts and groups:

* Every tool call is checked against the accounts the user belongs to. Account IDs outside that set are rejected before any request reaches the API.
* Users in the **Configuration Admin** or **Account Setup Admin** group get the full tool set, including create, update and publish tools. Other users get read tools plus draft edits for themes and translations.
* Tools declare whether they read or write. Publishing tools are marked destructive and the assistant asks for approval after showing a diff.

API tokens are not accepted on the MCP endpoints. Use the [REST API](/docs/developers/getting-started/authentication.md) for server-to-server integrations.

## Data handling

Tool results are returned to the AI client and therefore to its model provider. The server does not store conversation content. For support and security monitoring it logs which tools were called by which user, and failed calls with their arguments after secrets are redacted. Internal parcelLab tools, data exports and support-system integrations are not reachable from the customer endpoints.

## Support

The full guide, including client setup, a tool overview by area, example prompts and troubleshooting, is in the [Guides](https://docs.parcellab.com/guides/copilot/connect-ai-assistants-with-mcp) section, which requires a parcelLab login. For help contact <support@parcellab.com>; report security issues to <security@parcellab.com>.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parcellab.com/docs/developers/agents/mcp-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
