> For the complete documentation index, see [llms.txt](https://docs.allmcp.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allmcp.co/api-reference/multi-tenancy.md).

# Multi-Tenancy

AllMCP separates your connections by **client, organization, and user**. You choose how many levels you need: a single personal setup, a team where each person connects their own accounts, or a platform serving many customer companies.

Each user keeps their own private set of connections. When Marina connects Bitrix24, only Marina's session can use Bitrix24 — nobody else on the same client key sees her connection or her data.

***

## Choosing a mode

All three modes use the same endpoint and the same API-key header. The only difference is which identifiers you add to the URL.

```
URL:    https://go.allmcp.co/mcp/
Header: X-API-Key: allmcp_xxx
```

{% tabs %}
{% tab title="Solo mode" %}
**One key, one user.** Use this for personal setups — Claude Desktop, Cursor, or a private agent.

```
URL:    https://go.allmcp.co/mcp/
Header: X-API-Key: allmcp_xxx
```

You don't need to add anything to the URL. Every connection you make belongs to you.
{% endtab %}

{% tab title="2-level mode (Direct)" %}
**One client key, multiple users.** Use this when your team or product has several people who each connect their own provider accounts.

```
URL:    https://go.allmcp.co/mcp/?user_id=EXTERNAL_USER_ID
Header: X-API-Key: allmcp_xxx
```

`user_id` is any stable identifier from your own system — a database ID, a Slack user ID, an email hash. Each distinct `user_id` gets its own private set of connections.

**Example:** A company of 20 sales reps, each connecting their own Bitrix24:

{% code title="per\_user\_url.py" %}

```python
# Each rep gets their own URL:
url = f"https://go.allmcp.co/mcp/?user_id={rep.id}"
```

{% endcode %}
{% endtab %}

{% tab title="3-level mode (Platform)" %}
**One platform key, multiple organizations, multiple users per organization.** Use this if you're a platform (a SaaS or AI product) offering AllMCP to many customer companies.

```
URL:    https://go.allmcp.co/mcp/?org_id=ORG_ID&user_id=USER_ID
Header: X-API-Key: allmcp_xxx
```

**Example:** A B2B platform serving multiple companies, each with their own users:

{% code title="per\_org\_user\_url.py" %}

```python
url = f"https://go.allmcp.co/mcp/?org_id={company.id}&user_id={employee.id}"
```

{% endcode %}

{% hint style="info" %}
**Independent connections.** Each `org_id` + `user_id` combination is its own private set of connections. Marina at JSM Co and Marina at Acme Corp are two separate users, even if they share the same `user_id` string.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## Which identifiers to pass

Add identifiers to the URL based on the mode you want:

| `org_id` | `user_id` | Result                                                       |
| -------- | --------- | ------------------------------------------------------------ |
| Not set  | Not set   | Solo — a single default user for the key                     |
| Not set  | Set       | 2-level — a user under your client key                       |
| Set      | Set       | 3-level — a user under an organization under your client key |
| Set      | Not set   | Treated as Solo — organization scoping needs a `user_id` too |

{% hint style="success" %}
**No pre-registration needed.** You don't have to create users or organizations ahead of time. Just start making calls with the `user_id` (and `org_id` if you're on a platform) and AllMCP keeps each one separate for you.
{% endhint %}

***

## Branded OAuth consent (platform mode)

In 3-level mode, each organization can use its own OAuth app for OAuth2 providers, so the consent screen your enterprise customers see carries their branding instead of AllMCP's.

Set this up in the AllMCP dashboard under **Organizations** → select the organization → **OAuth Apps**.

***

## Your connections stay private

Every user's connections are kept private and isolated. No user, organization, or client can see another user's stored credentials.

{% hint style="danger" icon="lock" %}
**Even you can't read another user's credentials.** As the key holder, you can manage who connects, but you cannot read the stored credentials of any individual user.
{% endhint %}

***

## Related

{% content-ref url="/pages/n13FihQRxA3teHqXX3tb" %}
[API Keys](/api-reference/api-keys.md)
{% endcontent-ref %}

{% content-ref url="/pages/FeEzNlmNc9WJlDDyelEN" %}
[System Tools](/api-reference/system-tools.md)
{% endcontent-ref %}


---

# 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:

```
GET https://docs.allmcp.co/api-reference/multi-tenancy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
