Manage xCloud API Tokens and MCP Connections Across Multiple Teams
Updated November 13, 2026 · 11 min read
One connection. Every team you choose. Since xCloud v2.8.8, one API token or one MCP connection can be granted access to the teams you select, keep one of them as its default, and switch to another granted team on any single request. You authorize once and never reconnect to change teams.
This is for agencies, developers and operators who run more than one xCloud team: several client workspaces, a staging team and a production team, or one automation that has to see all of them. If you run client sites, AI hosting for agencies shows what you can ask an AI to do across client teams.
This guide also covers day-to-day management of xCloud API tokens and MCP connections: limiting what an AI agent can do, stopping a token from deleting anything, checking when a token was last used, and revoking a token or connected app.
What changed in v2.8.8
| Before | Now | |
|---|---|---|
| Teams per token or MCP connection | Exactly one | The default team plus every additional team you grant |
| Working across teams | A separate token per team, or authorizing the MCP client again for each one | One token or one connection, switched per request |
| Selecting a team on the API | Not possible | Send X-Team-Id: <team-uuid> |
| Selecting a team on MCP | Not possible | Name the team; the agent passes the optional team argument |
| A team you did not grant | Not reachable | Still not reachable: the request is refused with 403, never silently redirected to the default |
| Existing single-team tokens | Work | Still work, unchanged |
The connection never receives blanket access. The teams you grant define its boundary, and each team’s existing roles and permissions still apply on top. See team roles and permissions in xCloud for what a role allows. The release notes are in the v2.8.8 changelog.
Pick your path
The two paths share one authorization model but different mechanics, so this guide keeps them apart. Read the one you use; the boundary rules at the end apply to both.
| MCP connection | Public API token | |
|---|---|---|
| You are | Talking to an AI assistant (Claude, Cursor, Codex, Hermes and others) | Writing scripts, CI jobs or an integration that calls app.xcloud.host/api/v1 |
| You grant teams | On the browser approval screen when you connect | On the API Tokens page when you create the token |
| You pick a team per request | By naming it in the prompt; the agent passes the team argument |
With the X-Team-Id header |
| You discover granted teams | “List the teams this connection can access” (teams_index) |
GET /api/v1/teams |
| Jump to | Path A: MCP | Path B: Public API |
An MCP client that signs in with an API key instead of the browser gets its teams from the token, so follow Path B to create the token and Path A to use the teams.
Prerequisites
- An xCloud account that belongs to two or more teams.
- Permission to authorize an MCP client or create API tokens. The API Tokens page is not shown inside white-label (reseller) portals.
- For the API path: the UUID of a granted team when you want to target it, and a secure credential store for the token. xCloud shows a newly created token only once.
Path A: One MCP connection for several teams
Step 1: Tick the teams when you authorize
Connect your MCP client as described in How to Connect xCloud MCP to Your AI Agent. When you authorize in the browser, the approval screen lists your teams: the current team is always included, and you tick each additional team the connection may act on. Then choose Full access or Read-only and select Authorize.

Expected result: The connection is granted exactly the teams you ticked. A team you did not tick is refused, never silently swapped for the default. To add a team later, reconnect and tick it.
Step 2: Ask which teams it can see
List the teams this xCloud connection can access.
Expected result: The agent calls teams_index and answers with each granted team’s name, your role in it, and which one is the default.
Step 3: Name the team in the prompt
You never handle a UUID on this path. Say the team the way you would to a colleague, and the agent passes that team’s UUID as the optional team argument on the tool call. Omit the team and the request runs on the default.
Show the servers in Client North.
Only on the Acme team: which sites have pending WordPress updates?
List the teams this connection can access, then take the vulnerability count for every site on each of them and put it in one table, team by team.
Expected result: Each tool call runs against exactly one team. Ask for a team the connection was not granted and the agent gets a refusal, not the default team’s data. If a site “is not found”, the usual cause is that its team was not ticked; see troubleshooting.
Path B: One API token for several teams
Step 1: Open the API Tokens page
Sign in to xCloud, then go to Settings → Developers → API Tokens and select Create New Token.
Expected result: The token form opens with token name, permissions, MCP access, and team-selection controls.
Step 2: Choose permissions and grant teams
Enter a descriptive token name. Select only the API permissions the integration needs. Enable mcp:invoke separately if an AI agent will use this bearer token over MCP, and optionally pick MCP toolsets to show the agent only some areas of xCloud. For a script or AI agent that must never delete anything, also tick Refuse destructive actions.
The current team is fixed as the token’s default team. Select each additional team the token may access.

Expected result: The current team remains selected as the default, while additional teams can be enabled individually.
Security note: Full API access does not automatically include
mcp:invoke. MCP access is a separate, revocable permission.
Step 3: Create and store the token
Select Create Token, copy the generated value, and store it in your secret manager. Do not put the token in source control, screenshots, logs, or shared messages.
After creation, the API Tokens table shows the default team with a star and lists the additional teams granted to the token.

Expected result: The token row shows its permissions and teams. In the example, Acme Operations is the default team and Client North is an additional granted team.
Step 4: List the teams the token can access
Call the teams endpoint before targeting a non-default team. The response includes each granted team’s UUID, role, and default status.
curl 'https://app.xcloud.host/api/v1/teams' \
--header 'Authorization: Bearer xc_live_xxxxxxxxxxxx' \
--header 'Accept: application/json'
Example response:
{
"success": true,
"message": "Success",
"data": [
{
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Acme Operations",
"role": "owner",
"is_default": true
},
{
"uuid": "b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Client North",
"role": "admin",
"is_default": false
}
]
}
Expected result: The response lists only the teams granted to this token.
Step 5: Use the default team
Omit X-Team-Id to run the request against the token’s default team, exactly as single-team tokens always have.
curl 'https://app.xcloud.host/api/v1/servers' \
--header 'Authorization: Bearer xc_live_xxxxxxxxxxxx' \
--header 'Accept: application/json'
Expected result: xCloud returns resources from the default team, subject to the token’s scopes and the user’s role.
Step 6: Switch to another granted team
Pass the UUID returned by GET /teams in the X-Team-Id header. The header takes the UUID, never the team name.
curl 'https://app.xcloud.host/api/v1/servers' \
--header 'Authorization: Bearer xc_live_xxxxxxxxxxxx' \
--header 'Accept: application/json' \
--header 'X-Team-Id: b2c3d4-e5f6-7890-abcd-ef1234567890'
Expected result: The same token runs the request against the selected granted team. You do not need to create another token or reconnect the integration. A UUID that was not granted returns 403.
Control what AI agents can do with an API token
An AI agent that uses an API token can only do what you allowed on that token. Four settings on the token form decide it, and they work together rather than replacing each other.
| Setting | What it controls | What it does not do |
|---|---|---|
| API permissions (scopes) | Which Public API operations the token may call, such as read:servers or write:sites |
They do not let the token connect to an MCP client |
mcp:invoke |
Whether an AI agent may use the token over MCP at all | It grants no operations of its own |
| Refuse destructive actions | Whether the token may delete, reboot, restore or run any other action that is hard to undo | It grants nothing; it only takes those actions away, even from Full Access |
| MCP toolsets | Which xCloud tools the agent sees in its tool list | They are not a permission boundary |
On top of all four, each team’s roles and permissions still apply, as described in the boundary rules.
mcp:invoke opens MCP, the other permissions decide what the agent can do
mcp:invoke is the checkbox labelled allow AI agents to use this token. It is required to connect the token to an MCP client and is not included in Full Access, so a Full Access token cannot be used by an agent unless you also tick it.
The agent can only call operations the token’s API permissions allow. For example, a token with read:sites and mcp:invoke lets an agent list and inspect sites but refuses any change to them. Because mcp:invoke grants nothing by itself, xCloud does not let you create a token with only mcp:invoke: the form asks you to select at least one API permission for MCP access to be usable.
Narrow the tool list with MCP toolsets
MCP toolsets appear once you tick mcp:invoke. Each toolset is one area of the xCloud API, shown with its name and how many operations it holds. Select none and the agent sees every tool, which is the default. Select one or more and the agent sees only those areas; search stays available either way.
Toolsets are useful for MCP clients that limit how many tools one server may list, and for keeping an agent focused on one job. They shorten the list the agent sees but are not a security control: every call is still checked against the token’s API permissions and team roles. To stop an agent from making changes, remove the write: permissions instead. To let it make changes but never delete or reboot anything, turn on Refuse destructive actions.
For clients such as Cursor that cap the tool count, tick Compact tool surface (4 tools instead of ~150). The agent then searches for an operation and runs it through a small set of executor tools.
Refuse destructive actions: a token that cannot delete
Refuse destructive actions keeps a token from doing anything that is hard to undo. The token can still read and make safe changes, but xCloud refuses every delete, reboot, restore and other destructive action before it runs. Nothing changes on your servers or sites.
Use it when you give a token to an AI agent or a script and want to be sure it can never delete a server or a site, even by mistake. The option is a restriction, not a permission: it narrows every permission on the token, Full Access included, on the Public API and over MCP. It is available on API tokens only. An MCP client that signs in through the browser has no such option; choose Read-only on its approval screen instead.
Step 1: Tick the option when you create the token
On Settings → Developers → API Tokens, select Create New Token, choose the permissions, and tick Refuse destructive actions. You find it in the Create A New API Token form, right below the permission list and above mcp:invoke. Then select Create Token.
Expected result: The token row shows a Refuses destructive actions badge next to its permissions.

Step 2: Turn it on or off later
You can change this option on an existing token without creating a new one. Select the shield button in the token’s Actions column. Its tooltip says Refuse destructive actions when the option is off and Allow destructive actions when it is on.

Expected result: Turning the option on takes effect at once, and xCloud shows This token now refuses destructive actions. Turning it off asks you first: the Allow Destructive Actions dialog warns that the token will be able to delete, reboot, restore and run other actions that are hard to undo, as far as its permissions allow. Select Yes, allow them to confirm, or Cancel to keep the token safe.

What the agent sees when an action is refused
When an agent asks a refusing token to delete or reboot something, xCloud refuses the call and nothing changes. The agent gets a plain reason it can show you: the token is set to refuse destructive actions, so the action did not run. To do it anyway, do it yourself in the xCloud dashboard, or use a token without the option.
Without this option, xCloud MCP still asks the agent to show you a preview and get your approval before a destructive action runs. With the option on, the action cannot run through this token at all, even if someone approves it.
For developers: the refused response
A destructive Public API call with a refusing token returns 403 before the controller, policies or any job run. For example, DELETE /api/v1/sites/{uuid}:
{
"success": false,
"message": "This API token is set to refuse destructive actions, so sites.destroy did not run. Nothing changed. Use a token without that option, or do this in the xCloud dashboard.",
"errors": {
"code": "forbidden_destructive",
"next_actions": ["use_token_allowing_destructive"],
"operation": "sites.destroy"
}
}
Which operations count as destructive comes from the xCloud Public API reference: an operation is safe only when the reference marks it so, and every other write is refused. Reads are never refused. Over MCP the same calls are refused with the same message, including dashboard actions MCP runs that are not part of the Public API.
Monitor and revoke API tokens and MCP connections
You manage both kinds of access on Settings → Developers → API Tokens. API tokens appear in the token table; apps and AI clients that signed in through the browser (OAuth) appear under Connected apps. A connected app does not need an API token.
Check when an API token was last used
The token table has a Last Used column with the date and time of the token’s most recent authenticated request, for example 2026-10-19 09:42. A token that has never been used shows Never. The table also shows each token’s permissions, teams and creation date.
Use Last Used to find tokens that nothing uses any more, or a token that is still active after the integration it belonged to was retired. Revoke both. Each xCloud user can hold up to 10 API tokens, so removing unused ones also frees space for new ones.
Connected apps shows each app’s name, the teams it can act on, its scopes, how many active authorizations it has, and the date it was authorized. It does not show a last-used time.
Revoke an API token
Select the delete icon on the token’s row, then confirm with Yes, revoke it.
Expected result: xCloud shows Token revoked successfully. Every script, CI job or MCP client that used the token stops working at its next request. Revoking cannot be undone. Apart from Refuse destructive actions, a token cannot be edited after it is created, so to change a token’s permissions or teams, create a new token and revoke the old one.
Revoke a connected app (MCP connection)
Under Connected apps, select the delete icon on the app’s row, then confirm with Yes, revoke it.
Expected result: xCloud shows MCP connection revoked. The app loses access immediately. Revoking removes every active authorization of that app at once, for example the same client signed in on two computers. To use it again, connect the MCP client and approve the browser authorization screen again.
| Revoke an API token | Revoke a connected app | |
|---|---|---|
| What it removes | One bearer token | Every active OAuth authorization of one app or AI client |
| Who stops working | Anything that sends that token: scripts, CI jobs, MCP clients signed in with the token | That app or AI client on every device where it is signed in |
| Other access | Other tokens and connected apps keep working | API tokens and other connected apps keep working |
| To restore access | Create a new token and update the integration | Connect the client and approve it in the browser again |
Manage tokens through the Public API
Integrations can manage tokens too. GET /api/v1/user/tokens lists the API tokens in the current team, including each token’s last_used_at, and DELETE /api/v1/user/tokens/{tokenUuid} revokes one. They need the read:tokens and write:tokens permissions; no other permission includes them, but Full Access does. See the xCloud Public API reference for the full request and response format, and the xCloud API documentation overview for authentication and rate limits.
What API token management does not include yet
xCloud does not offer the following today:
- Activity log. No dashboard page lists the requests or MCP actions each token or connected app made. Last Used is the only usage signal.
- Token expiry. A token stays valid until you revoke it.
- IP restrictions. A token works from any IP address.
Until these exist, use narrow API permissions, grant only the teams an integration needs, check Last Used regularly, and revoke anything you no longer use.
The boundary rules, shared by both paths
| Rule | What it means |
|---|---|
| Explicit grants only | A connection or token can reach its default team plus the teams you explicitly granted. Nothing else, ever. |
| One team per request | Every request runs against exactly one team. A single call never combines resources from several teams; ask the agent for one team at a time, or loop over teams in your script. |
| Roles and scopes still apply | Selecting a team changes the request context. It does not bypass that team’s roles, the token’s scopes, or endpoint permissions. |
| No silent fallback | Selecting an ungranted or removed team returns 403 (API) or a refusal (MCP). xCloud never redirects to the default team. |
| Default team | Fixed when you connect or create the token: the team you were in at the time. Create the token while the intended default is current. |
| Existing tokens | Single-team tokens keep working unchanged, on their default team, with no selector needed. |
| Revoke | Tokens and connected apps are both listed on the API Tokens page and revoked separately. See revoking a token versus a connected app. |
Options and settings
| Setting | What it controls | Recommendation |
|---|---|---|
| Default team | The team used when the request has no selector | Connect or create the token while the intended default team is current |
| Additional teams | The only other teams the connection may select | Grant only the teams the integration needs |
| API scopes | Which Public API operations the token can perform | Prefer the narrowest read/write scopes that complete the task |
mcp:invoke |
Whether an AI agent may use the bearer token over MCP | Enable only for tokens intended for MCP clients |
| Refuse destructive actions | Whether the token may delete, reboot, restore or run other hard-to-undo actions | Turn on for AI agents and scripts that should never delete anything |
| MCP toolsets | Which areas of xCloud the agent sees in its tool list | Optional; select the areas the agent’s job needs |
X-Team-Id |
Team selection for one Public API request | Use a UUID returned by GET /teams |
team argument |
Team selection for one MCP tool call | Let the agent fill it from teams_index; you just name the team |
Verify the setup
Run these checks after creating the connection or token:
- Call
GET /api/v1/teamsor ask the agent to list its teams, and confirm only the intended teams appear. - Make one request without a team selector and confirm it returns the default team’s resources.
- Make one request with a granted team, by UUID or by name, and confirm it returns that team’s resources.
- Try a team that was not granted and confirm xCloud refuses it with
403. - Confirm a role-limited account still cannot perform an operation its role does not allow.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
403 after adding X-Team-Id |
The team was not granted, the grant was removed, or the user no longer belongs to the team | Call GET /teams, use a returned UUID, and review the token’s team grants |
| The agent says a site or server “is not found” | The site belongs to a team this connection was not ticked for | Ask the agent to list its teams; reconnect and tick the missing team |
| Request uses the wrong team | The selector was omitted, or the prompt did not name the team | Add X-Team-Id for API requests, or say the team in the prompt |
| MCP client cannot use a bearer token | mcp:invoke was not enabled on the token |
Create a new token with mcp:invoke enabled, then revoke the old one. Tokens cannot be edited |
| “Select at least one API permission for MCP access to be usable.” | Only mcp:invoke (and toolsets) were selected |
Add the API permissions the agent needs, such as read:servers |
| “This API token is set to refuse destructive actions, so … did not run.” | The token has Refuse destructive actions turned on | Do the action in the dashboard, or select the shield button on the token’s row and confirm Yes, allow them |
| “Maximum 10 API tokens allowed.” | Your account already has 10 API tokens | Check Last Used and revoke a token you no longer need |
| The agent cannot find a tool it used before | The token has MCP toolsets that leave that area out | Create a token with the needed toolset, or with no toolsets selected |
| Team does not appear during token creation or authorization | The account cannot grant that team in the current context | Switch to the correct xCloud context and confirm team membership |
| Operation is denied on a granted team | The token scope or the user’s team role does not allow it | Grant the required token scope or use an appropriately authorized team member |
Common mistakes
- Treating “Full Access” as permission for MCP.
mcp:invokeremains separate. - Treating MCP toolsets as a security limit. They only shorten the agent’s tool list; API permissions decide what it can do.
- Handing an AI agent a Full Access token without Refuse destructive actions. Turn it on unless the agent really needs to delete or reboot things.
- Leaving old tokens in place. A token never expires on its own, so revoke tokens whose Last Used shows they are no longer needed.
- Using a team name in
X-Team-Id. The header requires the team UUID. (Naming the team is the MCP way, not the API way.) - Assuming a denied team silently falls back to the default. xCloud returns
403instead. - Granting every available team when an integration needs only one client workspace.
- Logging the token while debugging. Use the redacted placeholder
xc_live_xxxxxxxxxxxxin examples.
Frequently asked questions
Can I stop an AI agent from deleting my servers or sites?
Yes. Tick Refuse destructive actions when you create the API token, or turn it on later with the shield button on the token’s row. The token can still read and make safe changes, but xCloud refuses any delete, reboot, restore or other action that is hard to undo, before anything runs.
Does Refuse destructive actions work on a Full Access token?
Yes. It narrows every permission on the token, Full Access included, on the Public API and over MCP. Turn it off again with the shield button and confirm with Yes, allow them.
Does one token automatically access every team in my account?
No. The token can access its default team plus the additional teams you explicitly grant. Nothing else.
What happens when I omit the team selector?
The request runs against the token’s or connection’s default team, exactly as single-team tokens always have.
Can the same connection switch teams for each request?
Yes. The Public API accepts the X-Team-Id header, and MCP tools accept the optional team argument. No new token, no reconnecting.
Do team roles still apply?
Yes. Selecting a team changes the request context; it does not bypass that team’s roles, the token’s scopes, or endpoint permissions.
Do existing single-team integrations need changes?
No. They keep using their default team whenever no team selector is provided.
How do I see when an xCloud API token was last used?
Open Settings → Developers → API Tokens. The Last Used column shows the date and time of each token’s most recent authenticated request, or Never if it has not been used.
What is the difference between revoking an API token and revoking an MCP connection?
Revoking an API token disables that bearer token for every script, CI job or MCP client that uses it. Revoking a connected app removes every active OAuth authorization of that app or AI client, so it must sign in and be approved again to reconnect.
Does Full Access let an AI agent use my token over MCP?
No. MCP needs the separate mcp:invoke permission, and the agent can still only do what the token’s other API permissions allow. A token cannot be created with mcp:invoke alone.
Does xCloud have an activity log, expiry date or IP allowlist for API tokens?
Not yet. xCloud shows each token’s last-used time and lets you revoke tokens and connected apps at any time, but it does not show a per-token activity log, set token expiry dates, or restrict tokens to IP addresses.
Next steps
- Review the xCloud Public API reference and how to access the xCloud API.
- Connect an MCP client with the xCloud MCP setup guide, then see what you can ask xCloud MCP to do for prompts, including the multi-team recipe.
- Check each granted team at a glance with the fleet overview (
GET /api/v1/overviewwithX-Team-Id, oroverview_showover MCP). - Find out who on your team deleted a site or changed a server with team activity from the xCloud Public API and MCP. It lists actions by person over the last 30 days, not requests per token. Only the team owner or a Team Admin with the server logs and events permission can see it.
- Start with read-only scopes, verify default and non-default team behavior, then add write access only where the workflow requires it.
If you run into any issues with multi-team access, feel free to reach out to our support team for help.