Skip to main content
Add the Switch Trust MCP server to your coding agent and confirm it reaches your workspace. Claude Code, Cursor, and VS Code each include an MCP client, the part of the coding agent that connects to MCP servers like this one. Setup takes an API key, an entry in the MCP client configuration, and a question to your coding agent.

Before you begin

You’ll need:
  • A Switch Trust account that can create API keys, which needs the Editor role or higher.
  • 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 an https:// address on switchagents.ai.

Connect the server

1

Create an API key

In Switch Trust, select Settings, then under Admin select API keys, and create a key. Copy the token when it’s shown. You can’t see it again. See API keys for roles and expiration.Give the key the Viewer role or higher. The server only reads, so Viewer is enough.
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.
In .mcp.json at the root of your project:
Restart your client or reload its MCP servers. The switch-trust-mcp tools now appear in its tool list.
These files hold your API key in plain text. Don’t commit them. Add the file you edited, .mcp.json, .cursor/mcp.json, or .vscode/mcp.json, to .gitignore. If your client supports it, have it read the key from an environment variable instead.
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.
You now have a coding agent that can read your Switch Trust workspace.

If the server doesn’t connect

The server starts even when its configuration is wrong. It reports the problem the first time your coding agent calls a tool, in an error field in the tool result. 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