MCP Servers
Model Context Protocol (MCP) is the open standard for handing a coding agent extra tools and data — a GitHub server, a Postgres connection, a headless browser, your company's internal API. Any of the agents Codeg drives can use MCP servers; the catch is that each one keeps its MCP setup in its own config file, in its own format. Codeg is the single place to manage them all: it reads every agent's file, shows you one list, and writes a change into each agent's file in that agent's format.
Codeg doesn't run the tools — MCP is the agent's feature, and the server talks to the agent, not to Codeg. What Codeg gives you is the management layer on top: every agent's servers side by side, a per-agent switch for each, ways to add more — by hand, by pasting a config, or from the SRN Harness catalog — and, for an edit, a review of exactly what will be written before anything is.
Where MCP servers are managed
Open Harness Engineering → MCP, from the workspace sidebar. Since 0.46.0 this is where MCP lives; it used to be Settings → MCP, with Local and Market tabs, and both are gone.
The toolbar holds:
- View — Servers, the default, with one row per server name across all agents; or Agents, with one row per agent and its file.
- Search by name, and Show — All servers, With problems, and, once they apply, From SRN Harness and Update available.
- Add — Add by hand, Paste configuration, and Find on SRN Harness, which opens Discover on its MCP servers (offered while the catalog is on).
In a wide window the list and the selected server's detail sit side by side; in a narrow one they're two screens, with Back to the list. To re-read the files after editing one outside Codeg, use the page's Refresh in the top-right corner (Read the configuration again) — the section reads them each time you open it and whenever Codeg itself saves, but doesn't watch them.
What a server looks like to Codeg
A server is a name plus an entry in each agent's file that has it. The entry comes in two shapes:
- stdio — a local command the agent launches and talks to over stdin/stdout:json
{ "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "ghp_…" } } - remote — an HTTP (streamable HTTP) or SSE endpoint the agent connects to:json
{ "type": "http", "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer …" } }
Nothing is merged. When two agents hold the same name with a different definition — command, arguments, environment, address, headers; an agent's own extra fields don't count — the server reads 2 definitions, and its detail keeps them apart as Definition A and Definition B, each listing its agents and each edited for those agents only. The Agents view marks such an entry Differs elsewhere.
An agent's own fields stay its own. Fields an agent keeps on an entry that Codeg's editor doesn't show — Cursor's envFile, auth or tls, Kiro's autoApprove or disabledTools — are listed in the detail under Its own fields, kept as they are, survive every save, and are never copied to another agent's file. The exception is switching an entry between stdio and a remote transport: fields only the other kind of server uses are removed where the agent would refuse them, and the review says which.
Install from SRN Harness
The Market tab, with its Official MCP Registry and Smithery catalogs, is gone since 0.46.0. Catalog servers now come from SRN Harness: Add → Find on SRN Harness, or Discover → MCP, then Install on a server's page. The dialog asks SRN Harness about that exact version and shows, in order:
- What SRN Harness says now — status, risk, review, findings, packages and whether they run install scripts, and What it asks for. → Install from Discover
- How it runs — A package Codeg starts or A hosted server, with its transport, and below it What will be run or What will be reached: the exact definition that will be written. Codeg writes only an npm package (launched as
npx -y <package>@<version>) or a PyPI package (uvx <package>==<version>), at the exact version SRN Harness pinned — the agent starts it, not Codeg — and a hosted server only at an HTTPS address whose host isn't this machine, a private or reserved network or a local-only name, judged from the address itself (it isn't looked up). Anything else is marked Cannot be used, with why. The default is the option this item's other installs use, else the first usable one, stdio before HTTP before SSE. - Settings — what the option needs: required and optional values, secrets, each with where it goes (an environment variable, a header, the address, an argument). Secret values are written in plain text into the configuration file of each agent you tick. They are not sent to SRN Harness.
- Name — the item's name, or
<name>-<publisher>(then-2,-3…) when that's taken. - Install in — the installed agents that can use this server are ticked; agents that already have a newer version of it from SRN Harness aren't.
- Replace — when a ticked agent already has a server of that name, you tick each one to replace it. Only this item's own earlier installs start ticked; a server you added by hand never does.
Press Install, and Codeg checks with SRN Harness once more and checks that no file changed since the dialog read it, before writing. Installed servers list under From SRN Harness, with the version.
Afterwards the server's detail has a From SRN Harness card with its status — As installed, Changed here, Up to date, Update available, or a catalog mark such as Version withdrawn — and Update, Manage agents (add it to more agents) and View on SRN Harness. An update fills your settings back in from what the agents hold now, where it can tell — Codeg keeps no copy of them — and replaces an entry you changed here; the dialog says when. Where the header would say Remove…, a server from SRN Harness says Uninstall…: tick the agents to take it out of, and an entry changed here stays unless you tick Remove it anyway, with the changes made here.
Add one by hand
For a server that isn't in any catalog — an internal tool, something you're developing, a one-off — use Add → Add by hand:
- Name — letters, digits,
-and_, up to 64 characters (agents such as Claude Code build tool names from it). The namecodeg-mcpis reserved for Codeg's own companion. - Edit as Form or JSON — the two stay in step. JSON takes
type,command,args,env,urlandheaders, the shapes above. - Transport — stdio (the default), HTTP or SSE. A stdio server gets Command, Arguments and Environment variables; a remote one Address and Headers.
envbelongs to stdio and headers to remote, so in JSON a field of the other transport is an error. An address that isn't HTTPS gets a warning, unless it's a loopback address on the host. - Apply to — tick the agents. The installed agents that can use this transport start ticked; agents that can't take it are greyed out with the reason.
- Review changes, then Save.
Start from a known server fills the form for you, before you've typed anything. Since 0.31.0 it holds Google's official Chrome DevTools server, chrome-devtools-mcp@latest, run through npx — the real package, where catalogs carry lookalikes under the same name. npx downloads it on first run.
It is not the built-in browser
The DevTools server drives a separate Chrome that Codeg doesn't supervise. You get network and performance data the built-in browser tools don't offer — and none of their safeguards: no per-tab sharing, no activity strip on the tab, no approval per snippet of code. Two different tools for two different jobs.
Paste a configuration
Add → Paste configuration takes what a README or another agent's file gives you: an mcpServers block (or VS Code's servers, or OpenCode's mcp), a single server's entry, or Codex's [mcp_servers.<name>] tables. It reads loosely — any agent's spelling of the transport, the URL or the environment, and JSON with comments. Read it lists the servers found, each named — a single entry pasted without its name is left for you to name — and ticked unless Codeg couldn't read it as a server; untick or rename any, pick the agents under Add to, and review and save the same way. Reading the text writes nothing.
See what's already there
The section doesn't only show what you added in Codeg: it lists every server in every agent's own file, so one you set up by hand-editing ~/.claude.json, or one another tool installed, is there too, ready to edit, rename, remove, or switch on for more agents.
The Agents view shows one agent at a time: its Configuration file (with Copy the path), whether it's readable, its format, how its servers reach a session, and its servers, each with a switch. It also shows Codeg's own companion, codeg-mcp (built in), which isn't in any file — Open Settings goes to Settings → Collaboration, where it's switched on and off.
A file Codeg can't read takes only its own agent out. That agent shows File unreadable, and every other agent stays listed and editable. An entry Codeg can't make sense of is listed with the problem. An entry with a key repeated inside it is shown read-only, and a file that repeats the key holding its servers (mcpServers, say) is read-only as a whole, until you fix it by hand. A server sitting where an older version of the agent kept them — OpenCode 1.x's mcp.<id>, or an older Codeg's [mcp.servers.<id>] in Codex's config.toml — reads Older place, and editing it moves it to the current place.
Choose which agents get a server
A server's detail has an Agents list: one row per agent with a switch and its state — On, Off, Not set up, or why it can't be (Cannot use SSE servers, read-only). Agents that aren't installed and have nothing to show are folded behind Show all agents. A switch saves as soon as you flip it, without a review:
- Switching on an agent that lacks the server copies the definition into its file. When the agents that have it disagree, Codeg asks which definition this one should get.
- Switching off sets the agent's own off flag and keeps the entry. Claude Code, Gemini, Cursor and Google Antigravity have no such flag in their user config, so for them switching off removes the entry, after a confirmation — the other agents keep theirs.
Each agent's file, by default — apart from Cursor's and OpenClaw's fixed paths and Codeg's own records, the location follows the agent's launch environment, so a CODEX_HOME, CLAUDE_CONFIG_DIR, KIRO_HOME or TRAE_HOME set in that agent's Environment Variables on the Agents screen moves the file Codeg reads and writes:
| Agent | File |
|---|---|
| Claude Code | ~/.claude.json (.claude.json under CLAUDE_CONFIG_DIR if set; a legacy .config.json in the config dir wins if it exists) |
| Codex | ~/.codex/config.toml |
| Gemini | ~/.gemini/settings.json |
| OpenCode | ~/.config/opencode/opencode.json or opencode.jsonc |
| Cline | ~/.cline/data/settings/cline_mcp_settings.json |
| Hermes | config.yaml in its home (HERMES_HOME) |
| CodeBuddy | the first that exists of ~/.codebuddy/.mcp.json, ~/.codebuddy/mcp.json, ~/.codebuddy.json |
| Kimi Code | ~/.kimi-code/mcp.json |
| Grok | ~/.grok/config.toml |
| Cursor | ~/.cursor/mcp.json, wherever CURSOR_CONFIG_DIR points |
| Qoder | ~/.qoder/settings.json |
| Google Antigravity | <GEMINI_HOME>/config/mcp_config.json |
| Kiro CLI | ~/.kiro/settings/mcp.json |
| TRAE CLI | ~/.trae/traecli.toml |
| Command Code | ~/.commandcode/mcp.json |
| DeepSeek Harness | ~/.dsh/mcp.json (DSH_HOME) — Codeg's own record, since the agent reads no file of its own |
| ZCode, MiniMax Code | mcp/zcode.json and mcp/minimax_code.json in Codeg's data directory — Codeg's own records; MiniMax Code's native configuration is left untouched |
| OpenClaw | ~/.openclaw/openclaw.json — listed only |
| Pi | mcp.json in Pi's agent directory (~/.pi/agent) — listed only |
That's eighteen agents Codeg writes to. OpenClaw and Pi are listed so you can see their servers, but Codeg doesn't change their files (Codeg only lists this agent's servers); Pi itself has no MCP — a third-party Pi extension reads that file — and Codeg sends neither agent any servers. For Claude Code and CodeBuddy, Codeg also adds or removes the server's <name>@local switch in their settings.json, which both CLIs need to load a user-scope server; the review lists it as a Plugin switch. → How agents differ
How a server reaches a session. The Agents view says it for each agent under Sessions. For Claude Code, Codex, Gemini, CodeBuddy, DeepSeek Harness, ZCode and MiniMax Code, Codeg sends the servers that are on when a session starts; every other agent reads its file itself when it starts. Codeg sends none that the agent's own flag turns off, none named codeg-mcp, and none whose transport the agent can't run.
Not every agent can host every transport. ZCode takes stdio servers only, and OpenCode 2, Codex, DeepSeek Harness, Kiro CLI, TRAE CLI and Command Code take no SSE server. An agent that can't take a server's transport can't be ticked for it, and keeps what it has. A save needs at least one agent that can take it.
Kimi Code retired the kaos executor. Codeg leaves an entry's fields as they're written, so a leftover kaos stays until you remove it; since Kimi Code 2.5.0 only that server fails to load, so if one stops after an upgrade, look for it there. Kimi's own fields, such as environment_id and deferred, are kept on a stdio entry.
Hermes 0.23 can't connect the servers in its own config.yaml — which is where the servers you assign to Hermes here are written — in a session that also receives servers from Codeg, which every session with codeg-mcp attached does. → Hermes
Custom agents aren't listed here
This section works by writing into each agent's own config file, and Codeg deliberately knows nothing about the config file of a custom agent you registered yourself — so those aren't offered as targets. What they still get is Codeg's own companion server, on the same terms as any built-in: it's attached when a connection starts with the agent's MCP support switch on and at least one of its tool groups enabled for that connection — a Collaboration settings feature, or the browser, computer-use or task-run tools — and carries the delegation tool once delegation itself is enabled and Let the agent handle files and commands is off. → Delegation and MCP To give a custom agent an MCP server of its own, configure it in that agent's native way.
Rename, remove or uninstall
- Rename renames the server in every agent that has it, together, so it stays one server; an agent Codeg can't change keeps the old name, and the dialog says which.
- Remove… deletes the entry from each agent you tick — all of them to start with; untick an agent to keep it there.
- A server from SRN Harness has Uninstall… instead. → Above
Rename and Remove… go through the same review as an edit; Uninstall… confirms in its own dialog.
How a save stays safe
Adding, pasting, editing, renaming and removing a server end in What will be written — the files, and per agent whether the server is added, updated, removed, renamed or switched. Nothing is saved until you confirm. A switch flip saves at once, and an install or uninstall from SRN Harness confirms in its own dialog. Every save, whichever way it starts:
- All or nothing. Codeg re-reads every file it's about to touch; if any changed since you saw it, nothing is written and Check again shows the new plan. If any part can't be done, none of it is — each agent says why.
- The rest of the file is left alone. In JSON, JSONC and TOML files, everything Codeg doesn't change — comments, key order, spacing — comes out byte for byte. Hermes'
config.yamlis the exception: YAML is rewritten whole, keeping keys and values but losing comments, and Codeg warns before it saves a file that has some. - A copy before every write. Each file that already exists is copied first to
~/.codeg/mcp/backups/<agent>/, keeping the newest five per file; if the copy can't be made, that file isn't written. If a write fails partway, Codeg puts back the files already written as far as it can — one that something else changed in between is left alone — and the result says, per agent, what was restored and where its copy is. - One save at a time. A lock in
~/.codeg/locks/is shared by the desktop app, anycodeg-serveryou run as the same user, and the agent settings panels that rewrite those files. A save that finds another in progress waits up to five seconds for it, then writes nothing and asks you to try again. - Links are followed. A config that's a symlink is written through the link, and a file keeps its permissions.
The backups, the lock and the record of what came from SRN Harness (~/.codeg/harness/mcp.json) are under your home directory's .codeg, not CODEG_HOME, and aren't part of Codeg's own backup.
Changes apply on the next session
Because a server lives in the agent's config, the agent reads it when it starts a session. Add or change a server and it takes effect for new conversations; for one that's already open, Reconnect to apply picks up the new config without losing your history. → Configure an agent
Good to know
- Secrets sit in the agents' config files. An API key you type into a server's environment, headers or an install setting is written into each assigned agent's own config on disk — not encrypted at rest — and, from the next save that copies that file, into the pre-write copies in
~/.codeg/mcp/backups. The detail masks values that look secret, with Show to reveal one, and SRN Harness never receives them. Treat access to your machine as the boundary, exactly as for agent credentials. - stdio servers need their command available.
npx,uvx, a binary — whatever the entry launches has to be on the PATH the agent runs with, or the server won't start. - It works the same on a server. In a browser or a remote-workspace window the section edits the files on the machine that Codeg runs on. → Which machine it works on
- Only user-wide config. Codeg reads and writes each agent's user-level file; project-level MCP files in a repository aren't listed.
- Claude Code answers
/mcpin the conversation. Since 0.34.0 (adapter 0.86.0)/mcpis in Claude Code's/menu and replies with your MCP servers and their tool counts, and/mcp reconnect,/mcp enableand/mcp disable, followed by a server's name orall, act on them. Neither the command nor its answer is shown when you open the conversation again. A reconnect can't start a server's OAuth sign-in from Codeg. - So does Codex, since 0.35.0. With codex-acp 2.2,
/mcpin a Codex conversation reports each MCP server's live status, and/mcp reconnectreconnects them. Each status check briefly starts one more copy of every session MCP server, Codeg's own companion included, which is harmless.
Next steps
- Harness Engineering — the page this section lives on, with the SRN Harness catalog and plugins.
- Skills — the other way to extend an agent: reusable instruction packs, enabled per agent, invoked with a
/command. - Supported Agents — which agents take MCP servers, and how they otherwise differ.
- Working with Agents — reconnect a running session to apply config changes.