Before you begin
You’ll need:- A Switch Trust account with the Editor role or higher, so you can create API keys. The key itself needs only Viewer.
- uv installed. The server runs with
uvx, which needs no clone and no build step. The server needs Python 3.11 or later. - Your Switch Trust instance URL, such as
https://app.switchagents.ai. The server sends your key only to anhttps://address onswitchagents.ai.
Connect the server
1
Create an API key
In Switch Trust, select Settings, then under Admin select API keys, and select Create key. Give the key a Name, and choose its Role and Expiration. Copy the token when it’s shown. You can’t see it again. See API keys for roles and expiration.Role starts at your own role. The server only reads, so change it to Viewer. When the key expires, the server reports
API key invalid, revoked, or expired, and you create a new one.2
Add the server to your MCP client
Add this entry to the MCP configuration for your client, with your token and instance URL in place of the examples.Restart your client or reload its MCP servers. The
- Claude Code
- Cursor
- VS Code
In
.mcp.json at the root of your project:switch-trust-mcp tools now appear in its tool list.3
Confirm the server reaches your workspace
Ask your coding agent:Your coding agent calls
get_context and reports the instance URL with a tenant ID and a workspace ID. The workspace is the one your API key belongs to. You don’t configure it.If the server doesn’t connect
The server starts even when its configuration is wrong. It reports the problem as an error the first time your coding agent calls a tool. Find what you see below.Next steps
Optimize agents
Find what’s driving the cost of an agent, change it, and prove quality and safety held
MCP tools
Every tool the server offers and what it returns

