Existing sessions hold a stale MCP tool surface: added servers invisible, removed servers linger
@JAORMX is already working on this.
Since Sep 14, 2026.
- Dominant language
- Go
- Stars
- 152
- Forks
- 16
- Avg merge
- 14h 48m
- Merged PRs (30d)
- 536
Description
Bug description
An existing session's view of the available MCP servers/tools is frozen at session creation and never converges with the live MCP configuration:
- Added server is invisible to existing sessions. After adding a new MCP server, sessions created before the addition never learn the new server's tools exist. The
/mcpcommand correctly lists the server as available, but the model in an existing session has no context (no tool specs, no prompt-level mention) that the new tools can be called. - Removed server lingers as stale context. Conversely, a session created while an MCP server was configured keeps that server's tools in its conversation context after the server is removed.
/mcpcorrectly no longer lists it, but the model still believes the tools exist and attempts calls, which fail withmcp call failed: MCP server "<name>" unavailable after reconnecton every attempt (observed with anosvserver:get_vulnerabilityfailed repeatedly while a siblingfetchserver kept working).
The client-facing /mcp surface and the model-facing tool surface disagree in both directions — the session catalog appears to be assembled once (per-session catalog over the shared global MCP manager) and never refreshed or re-announced when the global manager's server set changes.
Steps to reproduce
- Start mecated/mecatui with MCP servers A and B configured; create a session and converse so the session holds context.
- Remove server B (or make it unavailable) and add a new server C.
- In the same session, run
/mcp: it reflects the new truth (C listed, B gone). - Ask the model to use a tool from C: it does not know C exists.
- Ask the model to use a tool from B: it attempts the call and gets
MCP server "B" unavailable after reconnect; nothing informs the model that B was removed rather than transiently failing.
Expected behavior
An existing session should converge with the live MCP server set, or at minimum the model should be told about the divergence:
- Tools from a newly added server become callable (and discoverable by the model) in existing sessions, or the session is explicitly told a refresh/new session is required.
- Tools from a removed server are withdrawn from the session's advertised catalog, and a call to a removed tool returns a model-visible result distinguishing "server removed from configuration" from a transient connection failure.
Per the AGENTS.md rule, a model-facing affordance that depends on model behavior needs a model-visible instruction — a stale tool surface with no signal fails that discipline in both directions.
Actual behavior
- Existing sessions never see tools from servers added after session creation, even though
/mcplists them. - Existing sessions keep advertising tools from removed servers; calls fail with a generic
unavailable after reconnecterror that reads as transient, so the model retries a permanently-gone server.
Environment (if relevant)
- OS/version: macOS (darwin)
- mecatl version or commit: main @ ebb14c788
- Deployment shape: mecatui (in-process mecated)
Additional context
Likely touchpoints: the per-session catalog assembly over the shared global MCP manager (internal/app/catalog.go assembleCatalog / sessionEngineFactory) and the "reused-not-reconnected" global manager contract — per-session catalogs are built once from catalogAssets and there is no re-assembly or model-visible announcement when the manager's server set changes mid-session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.