Skip to content

feat(mcp): /settings surface — list mounted MCP servers + health - #203

Merged
saucam merged 2 commits into
mainfrom
feat/mcp-settings-surface
Jul 19, 2026
Merged

feat(mcp): /settings surface — list mounted MCP servers + health#203
saucam merged 2 commits into
mainfrom
feat/mcp-settings-surface

Conversation

@saucam

@saucam saucam commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

What

The deferred /settings surface for the MCP mounter: a read-only 🔌 MCP Servers view in the settings drawer that lists every registry server (config mcpServers + imported from ~/.claude.json) with its transport, trust, scope, backends, and live health.

How

  • protocolMcpServerStatus + an optional mcpServers on SettingsSnapshot.
  • McpHub — tracks the last-observed status (tool names / error) per server from normal use, exposed via statusFor() / hasClient(). No live probe on read — opening settings has zero side effects; a server shows idle until it's exercised, then connected or error (with the message).
  • session-manager#mcpServerStatuses() maps registry specs + hub status into the snapshot for both settings.get and settings.set results.
  • web — a synthetic read-only "🔌 MCP Servers" tab in the SettingsDrawer (shown only when the daemon reports mcpServers): a health chip, tool chips, and per-server transport/trust/backends. Built-in codeoid_memory is labeled.

Tests

  • daemon: hub status tracking (tools + connected; timeout → error); settings.get surfaces built-in memory + a configured stdio server with idle health. tsc + biome clean.
  • web: tsc -b + vitest (251) + production build clean; lint 0 errors.

Notes

Health is observation-based (from actual tool use), not a forced connect — deliberate, so viewing settings never spawns MCP subprocesses. A "refresh/probe" button and registry hot-reload remain optional follow-ups.

🤖 Generated with Claude Code

Adds a read-only "MCP Servers" view to the settings drawer showing every
registry server (config + imported from ~/.claude.json) with its transport,
trust, scope, backends, and live health — the deferred S6 follow-up.

- protocol: `McpServerStatus` + optional `mcpServers` on `SettingsSnapshot`.
- McpHub: track last-observed status (tools / error) per server from normal
  use + `statusFor()` / `hasClient()`. No live probe on read — opening settings
  has zero side effects; health is "idle" until a server is exercised, then
  "connected"/"error".
- session-manager: `#mcpServerStatuses()` maps registry specs + hub status into
  the snapshot for both settings.get and settings.set results.
- web: a synthetic read-only "🔌 MCP Servers" tab in the SettingsDrawer (shown
  only when the daemon reports mcpServers) — health chip, tool chips, per-server
  transport/trust/backends.

Tests: hub status tracking (tools + connected + timeout→error); settings.get
surfaces built-in memory + a configured stdio server with idle health. daemon
tsc + biome clean; web tsc + vitest (251) + build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread web/src/components/SettingsDrawer.tsx
@github-actions

Copy link
Copy Markdown

🤖 Gemini code review

Introduces a read-only MCP Servers settings panel displaying registered servers, their configuration, and live health statistics aggregated from actual tool usage. This allows users to inspect server statuses without triggering proactive subprocess spawns.

Findings: 🔴 0 · 🟠 1 · 🟡 0 · 🟢 0


Tokens spent · ⬆️ Input: 5,674 · ⬇️ Output: 240 · Σ Total: 9,965
Total may be higher due to thinking token counts.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.52%. Comparing base (56559bb) to head (090fba1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
+ Coverage   87.49%   87.52%   +0.03%     
==========================================
  Files         118      118              
  Lines       21082    21122      +40     
==========================================
+ Hits        18446    18488      +42     
+ Misses       2636     2634       -2     
Flag Coverage Δ
daemon 87.52% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/daemon/mcp/hub.ts 99.20% <100.00%> (+0.02%) ⬆️
src/daemon/session-manager.ts 74.69% <100.00%> (+0.52%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Export McpServersPanel + a @solidjs/testing-library render test asserting the
panel shows server names, health labels, the built-in badge, error text, and
tool chips, plus the empty state. Closes the gap where the new MCP settings UI
was only type/build-checked, never actually rendered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@saucam
saucam merged commit 98133d8 into main Jul 19, 2026
4 checks passed
@saucam saucam mentioned this pull request Jul 20, 2026
saucam added a commit that referenced this pull request Jul 20, 2026
Bump package.json 0.3.1 → 0.3.2 and roll the 0.3.2 CHANGELOG section
(the release workflow gates on package.json matching the tag). 0.3.2 carries
the SDLC pipeline primitive (#204#209), the /settings MCP Servers surface
(#203), embedded-handoff ZeroID token consumption (#210), and the cross-cutting
audit fixes (#211).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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