Repository navigation
Workspace-scoped MCP registration — or is CLI + workspace skill the intended pattern? #8865
Replies: 1 comment
|
Adding measured evidence from the same gap, one level up — agent presets. We run three custom presets in one profile:
So the unconditional cost you measured applies at the preset level too: every session pays for the capability set of whichever preset happens to be the profile default. We then tried to close it with a plugin, and hit a wall worth reporting. Our host plugin listens on …but the next new session fails to start:
The API documentation points at the correct moment —
but that Ask — either would remove the need for a plugin on the session-creation path:
Your question 1 also applies here verbatim: Environment: dsh 0.2.1-alpha.4 · Windows 11 · profile |
Uh oh!
There was an error while loading. Please reload this page.
Ask: a supported way to scope an MCP server registration to the workspace a session runs in — or explicit confirmation that "CLI + workspace skill" is the intended pattern for workspace-local capabilities.
Why
Two MCP servers registered at the profile root (a pair of EDA bridges) put 18 tools / 12,486 characters of schema ≈ 3.1k–4.2k tokens into every request of every session in that profile, including sessions in workspaces that will never call them. Measured in a live session with
cordis_inspect_query, HostTool.listTools:(
chars/4 … chars/3over schema text; not a tokenizer count.) The point is not the absolute number but that it is unconditional: there is no way to say "this capability belongs to this workspace".What I can see in 0.2.0-rc.2 (desktop, macOS)
@deepseek-ai/dsh-mcp-client's config isserverName / command / args / env / cwd / toolCallTimeoutMs / failOnStartupError / maxInstructionBytes / reconnect(HostConfig.listConfigs).cwdis the child process's working directory, not a visibility filter.serverNameinside the current registration scope", "An empty caller scope adds no MCP tools or prompt text", "Independent Agent scopes may reuse the same namespace because their tools and transports are isolated".@deepseek-ai/dsh-agent-presetis{id, name, description, order, plugins[]}, and the bundledediting-cordis-compositionsskill states "Preset plugins contribute scoped tools". So the knob that exists is per preset, and presets are selected per session — not per workspace.skill-filesystemandagent-instructionsdo resolve workspace roots (per-workspace.git), but MCP does not participate in that resolution.Questions
!!jsin a preset's child entries is evaluated when the child plugin activates (agent creation), where there is no workspace context — so!!jscannot currently mean "only when this session's workspace is under X". Is that a deliberate boundary, or a gap worth a feature request?editing-cordis-compositions) would save each user from rediscovering it — today the obvious reading is "just register an MCP server", which is exactly the choice that taxes every session in the profile.pluginsis a complete list with no inheritance, so scoping a single MCP row to one preset currently means forking a shipped preset and re-syncing it on every upgrade.Workaround I am using meanwhile
Move the MCP rows out of the profile into a dedicated preset (keeps tool-shaped access, costs a forked preset), and/or drive the same engines through their CLIs from a workspace skill (the CLIs already exist; the MCP servers are thin adapters). Both work; neither is a way to say "this workspace only".
Happy to turn any of this into a concrete proposal or a patch to the docs if that helps.
All reactions