Skip to content

[BUG] MCP dependencies from transitive packages are not propagated to the consumer project #121

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Describe the bug

When a package declares MCP dependencies in its apm.yml, those dependencies are not propagated to consumer projects that depend on it transitively. After apm install, the consumer has no MCP server configuration, even though a transitive dependency explicitly declares one.

This is the MCP counterpart of the transitive APM dependency issue fixed in PR #111 — APM now correctly resolves transitive apm: dependencies, but mcp: dependencies declared in transitive packages are silently dropped.

To Reproduce

  1. Create a skill package with an MCP dependency:
    name: skill-with-mcp
    dependencies:
      apm: []
      mcp:
        - name: my-mcp
          type: sse
          url: https://my-mcp-server.example.com/sse
  2. Create a bundle package that depends on the skill:
    name: bundle
    dependencies:
      apm:
        - org/repo/skill-with-mcp
      mcp: []
  3. Create a consumer project that depends on the bundle:
    name: my-project
    dependencies:
      apm:
        - org/repo/bundle
      mcp: []
  4. Run apm install --verbose
  5. Observe that skill-with-mcp is resolved and installed (skills + instructions), but its MCP dependency is not configured in the consumer project
  6. Output confirms: "No MCP dependencies found in apm.yml"

Expected behavior

apm install should collect MCP dependencies from all resolved transitive packages and merge them into the consumer project's MCP configuration (e.g., .vscode/mcp.json), just as it already does for directly declared MCP dependencies.

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.12
  • APM Version: v0.7.3 (main @ 1849009)

Logs

Install output shows the transitive package resolved but no MCP setup:

✓ org/repo/skill-with-mcp (cached)
  └─ 1 skill(s) integrated → .github/skills/
  └─ 1 instruction(s) ready (compile via `apm compile`)
...
No MCP dependencies found in apm.yml

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedDirection approved, safe to start work

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions