> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wappigate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspace MCP

> Connect an AI assistant to one channel of your workspace.

## What is this?

**MCP** (Model Context Protocol) is a standard that lets AI assistants call an application's own tools directly, instead of you copying data back and forth. This platform runs an MCP server so you can connect an assistant such as Claude, Cursor, or VS Code to your workspace: they can read your inbox and conversation history, contacts, campaigns, automations and their runs, AI agents, orders, events, activity and the product docs, and make changes after you approve them — from updating a contact or sending a template to creating campaigns, applying one change to many contacts at once, and building AI agents and automations from a description.

There is nothing to install on the server — point your client at this URL and sign in through your browser. For scripts and apps that can't open a browser, you can use an API key instead.

> [!NOTE]
>
> The Developer Portal has a dedicated **MCP** tab (separate from API Reference). Inside it you see two columns: **Workspace MCP** (this page) and **Platform MCP** (for platform owners and superadmins only). You connect a client by signing in with your own account in the browser — or, for scripts and CI, with an API key that has the **API Access** permission (`settings:api`); see [Authentication](https://docs.wappigate.com/mcp/authentication.md).
>
> MCP is a plan feature. The MCP tab only appears if MCP is enabled on your installation; if your plan doesn't include it, the tab shows an **Upgrade** badge and connections are refused until you upgrade.

### Server URL

```text theme={null}
https://YOUR_DOMAIN/api/workspace/v1/mcp
```

| | |
| - | - |
| **Transport** | Streamable HTTP (stateless — `GET` and `DELETE` answer `405`) |
| **Server name** | `workspace` (the platform is white-labelled, so no brand name is sent to MCP clients) |
| **Auth** | Browser sign-in (OAuth) — or an API key, as an `Authorization: Bearer` header |
| **Scope** | One channel per connection — the one you pick when you sign in, or, with an API key, the `X-Channel-Id` header (or `?channelId=` for clients that can't set custom headers) |

## What can I do here?

* Connect any MCP client that supports remote HTTP servers with custom headers
* Give the assistant read access to your inbox, conversations, contacts, labels, custom fields, pipelines, automations and their runs, campaigns, templates, email campaigns and senders, Meta Ads results, AI agents, orders, catalog, events, connected networks, and the product docs
* Let it make approved changes: add a note, update a contact, set a custom field, add or remove a label, move a pipeline stage, send a template, close a conversation, hand off to a human, or trigger an automation
* Have it create labels, custom fields, and pipelines (and add pipeline stages), and apply one change to many contacts or conversations at once with a background job you can check
* Have it write a WhatsApp template draft, create a campaign from an approved template, or send a free-form utility or authentication message with Direct Send
* Have it build a WhatsApp Flow (an in-chat form) from a description, saved as a draft you review and publish in **Flows**, or revise a draft Flow in place
* Have it write an email template draft, create an email campaign as a draft, and — after you approve — start, schedule or pause it
* Have it check your Meta Ads connection and results, and create a paused ad draft (it never switches an ad on or spends money)
* Have it build an AI agent from a description — instructions, knowledge, skills, capabilities, and human handoff — check that it is ready, and publish it
* Have it build an automation from a description, saved as an inactive draft, then replace the draft's flow, edit the wording of one step of a live flow, activate it, or pause it
* See the exact same tool list this page documents live in-app, under **Developer → Reference → MCP** — see the [tool catalog](https://docs.wappigate.com/mcp/workspace/tools/overview.md)

## How to use it

**1. Add the server and sign in**

Add the server URL to your app. It opens your browser: sign in, pick the channel it may work in, and allow. No API key and no header are needed.

> [tab] Claude Code
>
> Run this in your terminal, then run `/mcp` inside Claude Code and choose **Authenticate**.
>
> ```bash theme={null}
> claude mcp add --transport http workspace https://YOUR_DOMAIN/api/workspace/v1/mcp
> ```

> [tab] Claude Desktop / claude.ai
>
> In Claude Desktop or on claude.ai: **Settings → Connectors → Add custom connector**, and paste the server URL.
>
> ```text theme={null}
> https://YOUR_DOMAIN/api/workspace/v1/mcp
> ```

> [tab] Cursor
>
> Add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project), then choose **Connect** for the server in Cursor settings.
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "workspace": {
>       "url": "https://YOUR_DOMAIN/api/workspace/v1/mcp"
>     }
>   }
> }
> ```

> [tab] VS Code
>
> Add this to `.vscode/mcp.json`, then start the server from the editor. VS Code opens the browser to sign in.
>
> ```json theme={null}
> {
>   "servers": {
>     "workspace": {
>       "type": "http",
>       "url": "https://YOUR_DOMAIN/api/workspace/v1/mcp"
>     }
>   }
> }
> ```

> [tab] Codex
>
> Add this to `~/.codex/config.toml`, then run `codex mcp login workspace`.
>
> ```toml theme={null}
> [mcp_servers.workspace]
> url = "https://YOUR_DOMAIN/api/workspace/v1/mcp"
> ```

> [tab] OpenCode
>
> Add this to `opencode.json`, then run `opencode mcp auth workspace`.
>
> ```json theme={null}
> {
>   "$schema": "https://opencode.ai/config.json",
>   "mcp": {
>     "workspace": {
>       "type": "remote",
>       "url": "https://YOUR_DOMAIN/api/workspace/v1/mcp",
>       "enabled": true
>     }
>   }
> }
> ```

> [tab] Other
>
> Any client that supports remote MCP with OAuth only needs the URL and the Streamable HTTP transport.
>
> ```text theme={null}
> URL:        https://YOUR_DOMAIN/api/workspace/v1/mcp
> Transport:  Streamable HTTP
> Sign-in:    OAuth (the client opens the browser)
> ```

**2. Allow access in your browser**

The sign-in page is titled **Connect** followed by the app's name. If you're signed out it asks you to sign in first, then shows:

* **Channel** — the one channel the app may work in. It cannot see or switch to another unless you allow that below. To use a different channel, connect again and pick it.
* **Read only** — it can look at data but can't change anything or send messages. No write tool is even offered to a read-only connection.
* **Let it switch channels** — it can move to your other channels when you ask it to. Turn this off to keep it in the channel above.

The app acts as you, in that channel, with the permissions you have, so connect only apps you trust. Click **Allow access** (or **Cancel**); you're then sent back to your app and can close the tab. If your plan doesn't include MCP, the page says so and you can't allow access.

**3. Ask your assistant**

Once connected, just ask in plain language. For example:

* "Find the contact named John and show his labels."
* "Which events next week still have seats?"
* "Tag everyone who asked about pricing today with the Lead label."
* "Build an AI agent for order support from this description, then check that it is ready to publish."
* "Build a welcome automation for new conversations that asks for the customer's name and tags them as a lead, then turn it on."

### Use an API key instead

For scripts, CI and apps that can't open a browser, the key and the channel go in headers. Generate a key in **API Keys** in the [Developer Portal](https://docs.wappigate.com/workspace/developer-portal.md) (it needs the **API Access** permission), find your channel ids with **List channels**, and replace `<API_KEY>` and `<CHANNEL_ID>` in the snippet for your client. In the Developer Portal's MCP tab, **Show API key setup** reveals the same snippets with your channel filled in.

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http workspace https://YOUR_DOMAIN/api/workspace/v1/mcp \
>   --header "Authorization: Bearer <API_KEY>" \
>   --header "X-Channel-Id: <CHANNEL_ID>"
> ```

> [tab] Claude Desktop
>
> Settings → Developer → Edit Config, add this to `claude_desktop_config.json` and restart Claude. Needs Node.js installed.
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "workspace": {
>       "command": "npx",
>       "args": [
>         "mcp-remote",
>         "https://YOUR_DOMAIN/api/workspace/v1/mcp",
>         "--header",
>         "Authorization:${AUTH}",
>         "--header",
>         "X-Channel-Id:${CHANNEL}"
>       ],
>       "env": {
>         "AUTH": "Bearer <API_KEY>",
>         "CHANNEL": "<CHANNEL_ID>"
>       }
>     }
>   }
> }
> ```

> [tab] Cursor
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "workspace": {
>       "url": "https://YOUR_DOMAIN/api/workspace/v1/mcp",
>       "headers": {
>         "Authorization": "Bearer <API_KEY>",
>         "X-Channel-Id": "<CHANNEL_ID>"
>       }
>     }
>   }
> }
> ```

> [tab] VS Code
>
> ```json theme={null}
> {
>   "servers": {
>     "workspace": {
>       "type": "http",
>       "url": "https://YOUR_DOMAIN/api/workspace/v1/mcp",
>       "headers": {
>         "Authorization": "Bearer <API_KEY>",
>         "X-Channel-Id": "<CHANNEL_ID>"
>       }
>     }
>   }
> }
> ```

> [tab] Other
>
> ```text theme={null}
> URL:        https://YOUR_DOMAIN/api/workspace/v1/mcp
> Transport:  Streamable HTTP
> Header:     Authorization: Bearer <API_KEY>
> Header:     X-Channel-Id: <CHANNEL_ID>
> ```

Keep the key out of shared files and repositories.

### Connected apps

Apps you signed in to through the browser are listed under **Connected apps** in the Developer Portal's MCP tab, with their channel, **Read only** and **Can switch channels** badges, and when each was last used. Click **Revoke access** to cut one off at once — it has to sign in again to come back. You see only your own connections.

## Available tools

What the assistant can use. It only sees the tools your permissions allow in the selected channel. See the [tool catalog](https://docs.wappigate.com/mcp/workspace/tools/overview.md) for every tool, grouped by area, with its description, mode, and required permission. A **Read only** connection is offered only the tools that read. If you allowed **Let it switch channels**, the app also gets one extra tool, `switch_channel`, that moves the connection to another channel you can reach; it takes effect from the next request and is recorded in your activity log.

## How it stays safe

* Your client asks you to approve every change before it runs.
* Nothing can be deleted or cancelled over MCP. Those actions stay in the dashboard.
* The assistant has exactly your permissions, checked again on every call.
* Every call stays inside the channel you connected. Other channels are never visible — with browser sign-in the channel is fixed when you allow access, and a `X-Channel-Id` header is ignored.
* You can connect as **Read only**, and **Revoke access** to any connected app at any time from the Developer Portal.
* The same [rate limits](https://docs.wappigate.com/mcp/rate-limits.md) as the Workspace API apply, with stricter limits for sending messages and starting automations. Creating a campaign counts as sending messages.
* Tools that reach customers — sending a template or Direct Send message, creating a campaign, activating an automation, publishing an AI agent — are marked **Reaches customers** in the Developer Portal. New AI agents and automations are always created inactive, so nothing goes live until you explicitly publish or activate it.

## Troubleshooting / Technical Notes

* **The app opened a page saying the request isn't valid.** Start the sign-in again from the app — the link was started with missing or wrong details.
* **"You have no channel to connect yet."** Add a channel first, then connect again.
* **I can't see any write tools.** The connection was allowed as **Read only**. Revoke it under **Connected apps** and connect again without that switch.
* **The app can't reach my other channel.** A connection works in one channel. Connect again and pick the other channel, or allow **Let it switch channels**.
* **The app stopped working and asks me to sign in again.** Access was revoked, you lost access to the channel, or your account was disabled. Sign in again from the app.
* **`400 channel_required`.** Only for API key connections: send the channel as the `X-Channel-Id` header (or `?channelId=`). List yours with **List channels**.
* **`401` or `403`.** The key is missing or invalid, the key's owner lacks the API Access permission, or MCP isn't included in the plan. (With browser sign-in no API Access permission is needed.) See [Authentication](https://docs.wappigate.com/mcp/authentication.md).
* **`404` for a channel I own.** The server answers `404` for any channel it can't resolve for your key, so channel ids can't be probed.
* **A tool doesn't show up, or a write never happens.** Tools depend on permissions, and every write needs your client's approval. See [errors](https://docs.wappigate.com/mcp/errors.md) and the [tool catalog](https://docs.wappigate.com/mcp/workspace/tools/overview.md).
* **I changed to the new URL.** The original `/api/mcp` address keeps working for clients already set up with it; new setups should use `/api/workspace/v1/mcp`.

## Related docs

* [MCP introduction](https://docs.wappigate.com/mcp/overview.md)
* [Authentication](https://docs.wappigate.com/mcp/authentication.md)
* [Rate limits](https://docs.wappigate.com/mcp/rate-limits.md)
* [Errors](https://docs.wappigate.com/mcp/errors.md)
* [Workspace MCP tool catalog](https://docs.wappigate.com/mcp/workspace/tools/overview.md)
* [Developer Portal](https://docs.wappigate.com/workspace/developer-portal.md)
* [Team](https://docs.wappigate.com/workspace/team.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.