Summary
APM appears to ignore the per-server registry: field in dependencies.mcp during a normal apm install run.
If an MCP dependency is declared in apm.yml with a custom registry URL, installation succeeds only when the same URL is also provided through MCP_REGISTRY_URL in the environment. Based on the manifest schema and CLI docs, the manifest entry itself should be sufficient.
Environment
- APM:
0.14.0 (9d1161b)
- VS Code:
1.120.0
- macOS:
14.7.3 (23H417)
Reproduction
Use an apm.yml like this:
name: apm-test
version: 1.0.0
dependencies:
mcp:
- name: com.example/playwright-mcp
registry: https://registry.example.com
Then run:
Actual result
APM does not resolve the MCP servers from https://registry.example.com unless this is also set in the shell:
export MCP_REGISTRY_URL='https://registry.example.com'
With the environment variable set, install proceeds.
Expected result
apm install should honor the registry: value stored on each dependencies.mcp[] entry in apm.yml, without requiring MCP_REGISTRY_URL to be set externally.
Why this looks like a bug
The docs and schema imply that a custom registry URL is part of the persisted manifest state:
apm install --mcp ... --registry URL says the URL is persisted to apm.yml
- the manifest schema documents
dependencies.mcp[].registry as either:
false for self-defined servers, or
- a string custom registry URL
But the code path appears asymmetric:
apm install --mcp ... --registry URL uses registry_env_override(...) to export the registry URL for that immediate install flow
- the normal
apm install path does not appear to apply the per-dependency registry value before MCP resolution
registry_env_override usage seems limited to the dedicated --mcp command path
That would explain why the same registry works only when duplicated into MCP_REGISTRY_URL.
Impact
This makes apm.yml non-self-contained for MCP dependencies hosted in non-default registries. Teams cannot rely on the committed manifest alone; they must also distribute an environment variable out of band.
Suggested fix
During normal apm install, apply the registry value from each registry-resolved MCPDependency when resolving that server.
Possible approaches:
- Thread
dep.registry through the MCP resolution/install pipeline instead of relying on process-global env state
- If environment-based plumbing is kept temporarily, apply it per dependency when resolving/installing servers from
apm.yml
- Add a regression test covering a manifest-declared MCP dependency with
registry: https://registry.example.com and no MCP_REGISTRY_URL env var
Summary
APM appears to ignore the per-server
registry:field independencies.mcpduring a normalapm installrun.If an MCP dependency is declared in
apm.ymlwith a custom registry URL, installation succeeds only when the same URL is also provided throughMCP_REGISTRY_URLin the environment. Based on the manifest schema and CLI docs, the manifest entry itself should be sufficient.Environment
0.14.0 (9d1161b)1.120.014.7.3 (23H417)Reproduction
Use an
apm.ymllike this:Then run:
Actual result
APM does not resolve the MCP servers from
https://registry.example.comunless this is also set in the shell:With the environment variable set, install proceeds.
Expected result
apm installshould honor theregistry:value stored on eachdependencies.mcp[]entry inapm.yml, without requiringMCP_REGISTRY_URLto be set externally.Why this looks like a bug
The docs and schema imply that a custom registry URL is part of the persisted manifest state:
apm install --mcp ... --registry URLsays the URL is persisted toapm.ymldependencies.mcp[].registryas either:falsefor self-defined servers, orBut the code path appears asymmetric:
apm install --mcp ... --registry URLusesregistry_env_override(...)to export the registry URL for that immediate install flowapm installpath does not appear to apply the per-dependencyregistryvalue before MCP resolutionregistry_env_overrideusage seems limited to the dedicated--mcpcommand pathThat would explain why the same registry works only when duplicated into
MCP_REGISTRY_URL.Impact
This makes
apm.ymlnon-self-contained for MCP dependencies hosted in non-default registries. Teams cannot rely on the committed manifest alone; they must also distribute an environment variable out of band.Suggested fix
During normal
apm install, apply theregistryvalue from each registry-resolvedMCPDependencywhen resolving that server.Possible approaches:
dep.registrythrough the MCP resolution/install pipeline instead of relying on process-global env stateapm.ymlregistry: https://registry.example.comand noMCP_REGISTRY_URLenv var