Skip to content

[FEATURE] Deploy a project's dependencies.mcp entries to user scope #2737

Description

Is your feature request related to a problem? Please describe.
I'm always frustrated when a shared team repo declares its MCP servers in dependencies.mcp: and there is no way to make them available outside that repo. The servers are general developer tooling (docs fetchers, issue tracker, code quality, browser automation), so they should be available in every repo a developer works in — but they are only configured when the shell is inside the team repo.

There is no command that deploys a project's MCP list to user scope. apm install -g reads ~/.apm/apm.yml and never the project's own apm.yml, so the entries cannot get there. The practical effect is that "one shared repo declares the tooling, every developer runs one command and has it machine-wide" is not expressible today, even though both halves of it exist separately.

Describe the solution you'd like
A flag on the existing command that keeps the project manifest as the source while writing at user scope:

apm install --only mcp -g --from-project

Read dependencies.mcp: from the project manifest, merge into the user manifest (upsert by server name, leaving unrelated user entries untouched), then deploy through the existing user-scope pipeline and runtime capability filtering. No new deployment logic — only the source of the entries changes.

The naming is secondary; the capability is what matters: use the project manifest as the source while writing at user scope.

Describe alternatives you've considered

  1. apm install --only mcp -g — deploys correctly, but only entries already present in ~/.apm/apm.yml. No supported way to get the project's entries in there in the first place.

  2. apm install -g --mcp NAME per server — single server, imperative. Our servers are self-defined (registry: false), so this means restating every command/args/env on the command line, duplicating what the project apm.yml already declares and leaving two copies to drift apart. (This path is also currently rejected — [BUG] apm install -g --mcp is rejected outright: "MCP servers are project-scoped" #2548, fix in flight in fix: allow global direct MCP installs (closes #2548) #2734 — but even once fixed it does not address this request.)

  3. Depending on the team repo as a global package (apm install -g <repo>) — MCP entries only propagate transitively for whole-package dependencies, which requires --trust-transitive-mcp and additionally deploys the repo's agents and instructions globally into every unrelated project. Too blunt.

  4. What we actually do: a script in the team repo that splices the project manifest's mcp: block into ~/.apm/apm.yml between marker comments (so the developer's own entries survive), then shells out to apm install --only mcp --target <runtime> -g for the deployment half. It is idempotent and works well, but it hand-edits a file APM owns and will break silently if the manifest schema or nesting changes.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions