-
Notifications
You must be signed in to change notification settings - Fork 326
feat(mcp): per-dependency targets scoping for dependencies.mcp entries #2606
Copy link
Copy link
Open
Labels
area/mcp-configMCP server configuration depth, transports, variable resolution.MCP server configuration depth, transports, variable resolution.area/mcp-trustTransitive MCP trust prompts, consent contract, transport security.Transitive MCP trust prompts, consent contract, transport security.priority/highShips in current or next milestoneShips in current or next milestonestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/governanceGoverned by policy. apm-policy, audit, enforcement, enterprise rollout.Governed by policy. apm-policy, audit, enforcement, enterprise rollout.theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Description
Metadata
Metadata
Assignees
Labels
area/mcp-configMCP server configuration depth, transports, variable resolution.MCP server configuration depth, transports, variable resolution.area/mcp-trustTransitive MCP trust prompts, consent contract, transport security.Transitive MCP trust prompts, consent contract, transport security.priority/highShips in current or next milestoneShips in current or next milestonestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/governanceGoverned by policy. apm-policy, audit, enforcement, enterprise rollout.Governed by policy. apm-policy, audit, enforcement, enterprise rollout.theme/securitySecure by default. Content scanning, lockfile integrity, MCP trust boundaries.Secure by default. Content scanning, lockfile integrity, MCP trust boundaries.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Type
Projects
StatusShow more project fields
Todo
Problem
Global MCP installs have exactly one reconciliation domain: every
apm install -g --only mcpreconciles the whole MCP surface across every target it has previously touched.--targetis per-invocation only, so:--target claudewith server A, pass 2--target codexwith server B → A is removed as stale).Verified on apm-cli 0.28.0.
Current behavior
The documented per-dependency
targetsfield works for package (apm:) dependencies, but ondependencies.mcpentries the key is not part of the model — it is swept into the harness-specificextrapassthrough (with an unknown-key warning) and flattened verbatim into the deployed config (e.g. it appears as a bogustargetsproperty inside the~/.claude.jsonserver object), with no scoping effect.Request
Honor
targets:ondependencies.mcpentries with the same semantics as package dependencies: effective reach = install targets ∩ per-dependencytargets, omitted = all install targets, and reconciliation/stale-pruning computed per target from the intersection rather than the whole surface.Related
apm install -g --mcpis rejected outright: "MCP servers are project-scoped" #2548 — the imperative-g --mcppath; the declarative manifest path this request builds on is the working one.Context: building fleet tooling that generates
~/.apm/apm.ymlper host from a shared config; per-agent MCP scoping is currently the one thing forcing servers to stay outside APM.