Skip to content

setup: author MCP and skills into the manifest, not local state - #305

Open
tt-le wants to merge 2 commits into
mainfrom
tien/setup-author-manifest-not-state
Open

setup: author MCP and skills into the manifest, not local state#305
tt-le wants to merge 2 commits into
mainfrom
tien/setup-author-manifest-not-state

Conversation

@tt-le

@tt-le tt-le commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

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.

Changes

  • Extract the picker's interaction half 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).
  • 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 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 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.

tt-le added 2 commits August 7, 2026 21:53
`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
tt-le requested review from AarushiShah-db and removed request for AarushiShah-db August 11, 2026 04:34
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