Skip to content

feat: the user can register devstack's MCP server for every folder (ADR-0100) - #494

Merged
7schmiede merged 1 commit into
mainfrom
feat/mcp-for-every-folder
Nov 9, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/mcp-for-every-folder

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

devstack mcp carries the pool's upstreams and the hooks bound to them, but an agent got it only where a repository's own file registered it; a repository without a stack file was never offered it, and an agent there had no devstack tools, without saying why (#492). Now the user can choose, per coding agent: devstack's MCP server per repository (as before, the default) or for me, in every folder: the hub writes one entry devstack into the agent's user configuration and takes it out again when switched back.

Closes #492

Review card

Approved by the owner in the conversation on 2026-11-09, all five points.

# Category Point Beats Reversing costs
1 trust For the agents the user picks, the hub writes one entry devstack into the agent's user configuration (~/.claude.json mcpServers, ~/.codex/config.toml [mcp_servers.devstack], ~/.cursor/mcp.json); only that entry, the rest of the file kept, removed again when switched off, by ADR-0094's rules for the hooks. A hint the user follows by hand Low
2 term A setting in the hub per machine and agent: per repository (default) or for me, in every folder; the user decides, not a pool or a stack file. A pool pushing it Low
3 concept The user entry is always named devstack; an entry that runs devstack mcp under another name is reported as a double by doctor and the dashboard, not removed. devstack mcp noticing a sibling at runtime Medium
4 contract devstack doctor (and the MCP tool) says in a folder without a stack file too whether the server is registered there; the dashboard's hint offers every folder. doctor inside a stack only Low
5 contract GET/PUT /hub/mcp/scope with {agents: {<id>: "repository" | "user"}}. — Low

Decided on my own: the entry's command line is the repository entry's (devstack mcp); Codex's file is edited with toml_edit (MIT/Apache, new dependency) so comments and layout stay; an entry devstack the user had before is left on and not removed (the setting keeps what the hub wrote); one that runs something else is an error, not overwritten; VS Code keeps the per-repository prompt (its user MCP file lives in a settings profile); Cursor's merge of a same-named user and project entry is not checked, so only different names count as a double.

Verified

  • Unit tests on real files: the entry comes and goes and ~/.claude.json's other keys keep their order and their text; Codex keeps its comments and is byte for byte the same after on and off; the user's own entry stays; a foreign devstack entry is not overwritten; a missing file is made; doubles per agent.
  • devstack doctor outside a stack (info: … not registered for …) and in this repository (ok … registered … .mcp.json).
  • The page and the "MCP twice" pill in the lane against the mock hub.
  • Not yet against a real hub writing a real ~/.claude.json (the unit tests write the same code path into temporary homes).

ADR-0100, docs/dashboard-api.md, the devstack skill, CHANGELOG.

🤖 Generated with Claude Code

…DR-0100)

A setting per coding agent on the MCP upstreams page: devstack's MCP server
per repository (as before) or for the user, in every folder. Then the hub
writes one entry `devstack` into the agent's user configuration (Claude
Code's ~/.claude.json, Codex's config.toml with its comments kept,
Cursor's mcp.json) and removes the entry it wrote when switched back; the
rest of the file stays. An entry that runs `devstack mcp` under another
name beside one of the same agent is a double: the stack's head shows
"MCP twice", `doctor` warns. `doctor` says in any folder, a stack's or
not, whether the server is registered there. GET/PUT /hub/mcp/scope.

Closes #492

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 4812c31 into main Nov 9, 2026
@7schmiede
7schmiede deleted the feat/mcp-for-every-folder branch November 9, 2026 16:35
@7schmiede 7schmiede mentioned this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the user register devstack's MCP server for all folders, not only for repositories with a stack

1 participant