Commit Graph
11 Commits
Author SHA1 Message Date
gengruilin 30bf5733d6 refactor(mcp-manager): publish the manager as ctx.mcpManager
The `ctx.mcpServers` key reads as a collection of servers, but the
service manages that collection, and ACP already uses `mcpServers` for
a plain server list. Publish the service as `ctx.mcpManager`, matching
the package name, the `mcp-manager/` event prefix, and
`ctx.pluginManager`. Remote endpoints become `mcpManager/*`; the class
keeps its name, McpServerManager.
2026-11-02 21:01:42 +08:00
gengruilin 9ce7b0e6f6 Revert "refactor(mcp): keep only plugin-registered servers in the MCP manager"
This reverts commit 1c45a63dd65. Settings-configured servers, credential
templates, probes, stdio and enabled entries, and the status event implement
the backend of #3371, which remains open.
2026-10-20 16:31:24 +08:00
gengruilin 5a30774840 refactor(mcp): keep only plugin-registered servers in the MCP manager
The Settings management page this manager was built for is not shipping, and
every connector plugin registers its server. Remove what only that page used:

- mcp-manager: the volatile `servers` configuration and its write-time
  validation, stdio entries, the `enabled` flag, the `probe` operation, and the
  `mcp-manager/status` event. A registration takes a Streamable HTTP `url`, and
  a `startupTimeoutMs` setting bounds each registered server's startup.
- mcp-client: `${credential:REF}` templates (`expandTemplates`), the
  `waiting-credentials` state, `probeServer`, and the exports that existed only
  for the manager's write-time validation.

The Web profile mounts the manager without injecting credentials, and the
`mcp-template-error` snapshot goes with the templates.
2026-10-20 11:19:40 +08:00
gengruilin 6719b28294 feat(mcp): let plugins register servers and manage them over Remote
Plugins that integrate an MCP service now call ctx.mcpServers.register()
for their own lifetime instead of writing the manager's Settings entry, so
two applications never overwrite each other's servers, a settings write
needs no namespace lookup or restart to take effect, and disabling or
uninstalling the plugin withdraws the server's tools.

- The manager is a Typert Remote service: watch streams the complete
  server list, and restart and probe run the Host operations. The Web
  application mounts one shared manager after the credentials provider.
- Credential templates replace every resolved value with [redacted] in
  diagnostics, tool-call failures, and isError results instead of hiding
  all upstream text, so the model can act on a server's error.
- Remove health checks, the ${env:NAME} template scheme that credential
  references already cover, and the per-request credential re-check that
  duplicated the rotation-driven reconnect.
- Client-safe status and probe types move to the ./types exports, and the
  manager documentation moves from the tools reference to the MCP page.
2026-10-04 19:34:19 +08:00
Tianyi Cui c7f66d13a6 docs(notes): prune redundant active decision records 2026-09-30 23:20:22 +08:00
Tianyi Cui 4c6b2c02af docs(mcp): clarify resource discovery and profile verification 2026-09-13 11:52:42 +08:00
Tianyi Cui e08468954a feat(mcp): activate profile resource tools for configured servers 2026-09-13 11:52:42 +08:00
Tianyi Cui 834bd55a59 fix(mcp): expose scoped resource server names to the model 2026-09-12 22:40:51 +08:00
Tianyi Cui aec2d5e5f0 docs(mcp): explain resource providers and server instructions 2026-09-12 22:40:51 +08:00
Tianyi Cui 3ba5b6eb04 feat(mcp): add scoped resources and server instructions 2026-09-12 22:40:50 +08:00
Tianyi Cui 395f79b772 docs(mcp): describe subsystem roles and configuration 2026-09-12 22:31:42 +08:00