setup: author MCP and skills into the manifest, not local state - #305
Open
tt-le wants to merge 2 commits into
Open
setup: author MCP and skills into the manifest, not local state#305tt-le wants to merge 2 commits into
tt-le wants to merge 2 commits into
Conversation
`ucode setup`'s MCP and skills sections delegated to `configure_mcp_command` /
`configure_skills_mcp_command`, which are built for `ucode configure` — they
pre-check the picker from the admin's *own* registered servers, mutate the admin's
machine (`claude mcp add-json`, `~/.claude.json`, `save_state`), then read the
result back out of `state.json`. So authoring a workspace-wide config both showed
the wrong pre-selections (the reported bug) and silently reconfigured the admin's
local agents.
The picker's interaction half is extracted into `mcp.pick_mcp_servers` — source
picker, discovery, checkbox, resolve each pick to `{name, url}`. Persistence stays
with each caller: `configure_mcp_command` keeps its diff-apply-save against local
state (behaviour unchanged, 99 mcp tests green), while the new
`_author_mcp_servers` maps picks to the manifest's `{name, type}` and writes
nothing to the machine. It starts the picker empty — an admin's own servers are
irrelevant to a workspace declaration, and an empty start also keeps every pick
resolvable to a type (a kept row would carry a state-only URL the manifest omits).
Skills likewise now author `catalog.schema` names straight into the manifest
instead of registering a live skills MCP connection.
Scope: author side only. The pull side (a developer's ucode rebuilding these into
agent configs) is still shown as "pending" and unimplemented — a separate change.
Tests: +TestAuthorMcpServers (starts empty, no machine/state mutation, cancel);
TestMcpServersFromState reworked to TestMcpEntriesToManifest (now takes a list).
Mutation-verified: seeding the picker from local state fails the empty-start test.
Co-authored-by: Isaac
tt-le
requested review from
AarushiShah-db
and removed request for
AarushiShah-db
August 11, 2026 04:34
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.
ucode setup's MCP and skills sections delegated toconfigure_mcp_command/configure_skills_mcp_command, which are built forucode configure— they pre-check the picker from the admin's own registered servers, mutate the admin's machine (claude mcp add-json,~/.claude.json,save_state), then read the result back out ofstate.json. So authoring a workspace-wide config both showed the wrong pre-selections (the reported bug) and silently reconfigured the admin's local agents.Changes
mcp.pick_mcp_servers— source picker, discovery, checkbox, resolve each pick to{name, url}. Persistence stays with each caller.configure_mcp_commandkeeps its diff-apply-save against local state (behaviour unchanged)._author_mcp_serversmaps picks to the manifest's{name, type}and writes nothing to the machine. It starts the picker empty — an admin's own servers are irrelevant to a workspace declaration, and an empty start also keeps every pick resolvable to a type (a kept row would carry a state-only URL the manifest omits).catalog.schemanames straight into the manifest instead of registering a live skills MCP connection.Scope
Author side only. The pull side (a developer's ucode registering these into agent configs) is still shown as
(pending)and unimplemented — a separate follow-up.Tests
+TestAuthorMcpServers (starts empty, no machine/state mutation, cancel); TestMcpServersFromState reworked to TestMcpEntriesToManifest (takes a list). Mutation-verified: seeding the picker from local state fails the empty-start test.
This pull request and its description were written by Isaac.