Skip to content

feat(context): manage shared MCP servers alongside Skills - #48

Open
0libote wants to merge 8 commits into
dizys:mainfrom
0libote:feat/shared-mcp-servers
Open

0libote wants to merge 8 commits into
dizys:mainfrom
0libote:feat/shared-mcp-servers

Conversation

@0libote

@0libote 0libote commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Add MCP servers under Instructions & skills, using the same agent picker, compact rows, switches and editor sheets as Skills. Define a local command or remote HTTP server once, then choose which agents receive it.

Behavior

  • Save changes the shared definition; Apply updates an agent’s copy. Existing copies stay unchanged after an edit and show Differs until applied or unlinked. Switches show saved entries, including disabled ones, rather than live connections.
  • Press a server’s name to edit it. JSON command/environment/header fields preserve empty arguments, whitespace and multiline values. Switching transport keeps separate drafts; unsaved edits require discard confirmation, and saves cannot be dismissed mid-flight.
  • Applying a differing entry confirms replacement of the complete native entry, including agent-specific options. Apply and unlink check both revisions, preserve symlinks and unrelated settings/comments, and leave private backups beside the resolved file. Unlink every supported agent before removing a shared definition.
  • Keep definitions in $T3CODE_HOME/setup/mcp/servers.json with owner-only permissions, a 128-server limit and a 256 KiB limit. Native settings reads/writes are bounded to 1 MiB and share the settings queue with skills. Codex uses pinned, vendored TOML syntax-tree editing; no runtime npm installation.
  • Load environment/header values only in the authenticated editor. Lists and polling expose key names/counts and URL origins. Commands remain visible; OAuth and native approval stay with each agent.
  • Persist Claude’s default .claude.json on the state volume. Use the same Codex/OpenCode adapters in t3-browser-mcp, so the helper and console agree on TOML, JSONC and V2 settings.

Provider support

Agent Global configuration Managed behavior
Claude Code ~/.claude.json or $CLAUDE_CONFIG_DIR/.claude.json Local and HTTP; HTTP requires an explicit transport type, including the documented streamable-http alias. Unlink to remove the global copy. Native project toggles stay unchanged.
Codex $CODEX_HOME/config.toml Local and HTTP; native enabled = false.
OpenCode 1 opencode.json[c], .mcp[name] Local and HTTP; native enabled: false; a V2-only state flag shows Differs.
OpenCode 2 Existing .mcp.servers[name] retained Local and HTTP; native disabled: true. V1-only state flags show Differs; global-only V2 options retain their shape when adding the first server. New files use V1-compatible syntax, also accepted by V2.
Cursor ~/.cursor/mcp.json Local and HTTP, including URL-only remote entries; native approval/login still applies.
Antigravity / Grok Build / Muse Code Native formats and limitations documented Not managed in this release. Grok may inherit Claude/Cursor entries through native compatibility imports.

OpenCode JSONC takes precedence. This manages default global files and the server environment’s directory overrides. Project settings, custom T3 agent profiles, enterprise policy and effective runtime availability are outside its inventory. Start a fresh agent session after applying changes.

Rechecked the Claude, Codex, OpenCode V1, OpenCode V2, and Cursor contracts. Implementation details, remaining provider limits and reproduction commands are in the context guide.

Validation

  • 627/627 Node tests pass, including revision conflicts, secret redaction, symlinks, lossless transport data, missing Claude HTTP selectors OpenCode V2 settings without a server dictionary, and wrong-layout OpenCode state flags.
  • Shell parsing/ShellCheck, shell behavior/persistence tests, JavaScript syntax, harness UI audit and mise generation checks pass.
  • MCP interaction audit passes phone/desktop/embedded in both themes: agent selection, links, stale editor revisions, separate transport drafts, save/discard guards, apply/unlink, and failed/late reads. Fixtures never modify real agent configurations.
  • Targeted MCP geometry checks cover five agent selections and the editor across seven standalone/embedded sizes. Ready/first-start/attention screenshots cover desktop, embedded and phone layouts in both themes without horizontal overflow.
  • Latest native rechecks pass local/HTTP negotiation, credential delivery, unlink and disabled-state behavior on Codex 0.163.0 and OpenCode 2.0.32/2.1.0. Earlier checks also verified Claude 2.1.303, OpenCode 1.14.19/2.0.18 and Cursor 2026.10.18-ea085cb. These use disposable homes and fixture servers, without model prompts or real credentials.
  • Final CI on 8eb7747 passes lint and all four core/browser builds and smoke suites on native amd64/arm64. Both amd64 harness lifecycle suites pass. Browser smoke suites include the MCP interaction audit and general console geometry audit; the broad local audit’s scratch-server pairing limitation is covered by those successful image runs.

Screenshots

Light Dark
Desktop light Desktop dark
Phone light Phone dark

Third tab next to Instructions and Skills: one canonical list at
$T3CODE_HOME/setup/mcp/servers.json, linked per provider into each
provider's own config file. Local and remote servers, secrets stay out
of status polling, revision-checked saves like the other two.

Supported: claude, codex, opencode, cursor, antigravity. Grok and Muse
layouts are unverified and reported as unsupported.
@0libote 0libote changed the title feat(context): shared MCP servers feat(context): manage shared MCP servers alongside Skills Oct 20, 2026
@0libote
0libote marked this pull request as ready for review October 20, 2026 09:05
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.

1 participant