Fix: MCP entries not being read by some agents - #274
Open
Fluzko wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
A plugin can declare
[[mcp_servers]], andsyncwrites those entries into each agent's config. Three of our five agent CLIs can't use what we write, and nobody finds out: sync reports success because it did write the file it meant to write.Claude Code ignores our entry, so the feature silently does nothing. The Copilot CLI and Goose reject their whole config file, which also takes down MCP servers the user set up themselves. Codex and Gemini were fine.
Root cause: each agent has its own vocabulary for the same thing. Different file (usually not the one hooks live in), different field names, different container key, different name for a remote transport. Symposium wrote one plausible shape everywhere and assumed it landed.
Fix
Each adapter writes what its tool actually accepts. The four duplicated per-agent path tables collapse into one seam,
Agent::mcp_config_path. MCP scope becomes its own concept instead of following hook scope, since only some agents have a project-level MCP file; the rest fall back to user level and say so.Two robustness points came with it: one file we now write is live agent state, so JSON writes go through temp-file-plus-rename, and a server the user disabled stays disabled (auto-sync runs per hook event and would re-enable it forever).
Verification
Checked by asking each tool, not by reading docs: feed it the file symposium wrote, ask its own
mcp listwhat it sees, compare against what its ownmcp addwrites. Several shapes looked right on paper and were rejected in practice.An e2e sweep covers all six installable CLIs across three entry kinds (stdio, stdio+env, remote+headers), env vars reaching the server process, recovery from the broken shapes already on disk, and cleanup when an agent is removed. A real Claude session drives a tool call end to end. Kiro is the gap: GUI-only, no CLI to ask, paths unchanged.
Disclosure questions
AI disclosure.
Questions for reviewers.