MCP servers
MCP servers give an agent extra tools. There are two kinds:
- The agent’s servers. They’re part of the agent’s setup in the web app, on the agent’s page, so a task gets the same servers in the cloud and on your computer.
- This computer’s own servers. You add them on this computer, and only tasks that run here get them.
See them
Code
On its own, it lists this computer’s own servers, whether or not the computer is paired. To see an agent’s servers too, name a task, an agent or a workspace:
- The servers of one task: paste its address,
context mcp list https://your-workspace.example.com/client/tasks/8f1c… - One agent’s servers:
context mcp list --workspace <name> --agent <name>. Use the names the web app shows, in any case. Leave one out to pick from a list. - For a script: add
--json.
context mcp get <name> shows one of this computer’s servers. Header and environment values are never printed, only their names.
Add and change this computer’s servers
| Command | What it does |
|---|---|
context mcp add <name> -- <command…> | Add a local program as a server. Add --env KEY=VALUE for its environment. |
context mcp add <name> --url <address> | Add a remote server. Add --header KEY:VALUE, or --token-env <NAME> to send a token from your shell. |
context mcp remove <name> | Remove a server, and its sign-in. |
context mcp disable <name> / enable <name> | Keep a server but stop starting it, or turn it back on. |
context mcp login <name> / logout <name> | Sign in to a remote server that asks for it in your browser, or sign out. |
context mcp trust <name> / untrust <name> | Trust a server, so its tools that say they only read run as reads. Untrusted, every tool asks as a write does. |
A token is never taken on the command line. Use --token-env <NAME>, or --token-stdin to read it from standard input.
/mcp add in the terminal home edits the same file.
Your computer’s own servers
Besides the ones you added, a task that runs on this computer gets servers from the earlier app’s config (~/.config/opencode/opencode.json and the like, brought into the same file once), and, for a task placed in a project folder, the ones that folder declares (opencode.json, .opencode/, .mcp.json, .omp/mcp.json). A task that runs on this computer gets this computer’s servers unless your organization turned that off; then add, remove, enable, disable and login are refused. Tasks in Context’s cloud never get them.
They work as they did in the earlier app: a ${MY_KEY} or {env:MY_KEY} in a header or environment value is filled from the shell you started the app from. The tools of servers from your own files (~/.config/opencode, /mcp add in the home) run without the agent’s permission preset being asked: they are your servers on your computer. A project folder’s servers follow the agent’s preset, like the agent’s own, because the agent writes that folder. If a value comes out empty, the variable was not set in that shell.
In a task on this computer, /mcp disable <name> and /mcp enable <name> work for these servers as for the agent’s: the choice is the task’s, takes effect from your next message when the running task can apply it (otherwise when it next starts), and stays with the task when it moves.