Skip to content

[BUG] MCP Registry functionality not consistent #2740

Description

@reinrl

I am attempting to hook up to an internal MCP Registry (created using Microsoft API Center) to avoid duplication of MCP server configuration information. The registry appears to be successfully used when attempting to search for the corresponding MCP server, but returns a not found error when attempting to use that same MCP server name in APM config/running an APM install. (Note: in the example commands and logs below, URLs have intentionally been obfuscated - the actual commands run locally show the URLs that I would expect)

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'apm config get mcp-registry-url' - returns Not set
  2. Run command apm config set mcp-registry-url https://*******/registry - returns MCP registry URL set to: https://*******/registry
  3. Run command apm mcp show ado-mcp (the name used in the registry for our whitelisted Azure DevOps MCP server) - this successfully finds the MCP server by name
  4. Configure the same MCP server by name as a dependency in apm.yaml.
  5. Run command apm install - returns error that the MCP server was not found by name

Expected behavior
If a search is successful, shouldn't an install be as well?

Environment:

  • OS: Windows
  • Python Version: n/a
  • APM Version: 0.29.0
  • VSCode Version: 1.134.0

Logs
Able to search for the MCP server by name:

$ apm mcp show ado-mcp
Registry: https://*******/registry (from apm config)

MCP Server Details
Fetching: ado-mcp
                                                                                          MCP Server: ado-mcp                                                                                         
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Property     ┃ Value                                                                                                                                                                               ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Name         │ ado-mcp                                                                                                                                                                             │
│ Version      │ Unknown                                                                                                                                                                             │
│ Description  │ Provides tools for interacting with Azure DevOps: repositories, branches, pull requests, pipelines, work items, wikis, test plans, and work item queries across our projects. │
│ Repository   │ Unknown                                                                                                                                                                             │
│ Registry ID  │ ...                                                                                                                                                                                 │
└──────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                                        Remote Endpoints                                        
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Type       ┃ URL                                                      ┃ Features             ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ UNKNOWN    │ https://my.obfuscated.url    │ Hosted by provider   │
│ UNKNOWN    │ https://my.obfuscated.url    │ Hosted by provider   │
└────────────┴──────────────────────────────────────────────────────────┴──────────────────────┘
                         * Installation Guide                         
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Step  ┃ Action                         ┃ Command/Config            ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1     │ Add to apm.yml dependencies    │ mcp: - ado-mcp            │
│ 2     │ Install dependencies           │ apm install               │
│ 3     │ Direct install (coming soon)   │ apm install ado-mcp       │
└───────┴────────────────────────────────┴───────────────────────────┘

Relevant portion of my apm.yml:

dependencies:
  apm: []
  mcp: 
    - name: ado-mcp
      registry: true

Results of an install (Note: no policy yet exists, so using --no-policy to remove that part of the messaging from the return):

$ apm install --verbose --no-policy
[>] Installing dependencies from apm.yml...
Parsed apm.yml: 0 APM deps, 1 MCP deps
No APM dependencies found in apm.yml
[!] Policy enforcement disabled by --no-policy for this invocation. This does NOT bypass apm audit --ci. CI will still fail the PR for the same policy violation.
+- MCP Servers (1)
[i] Targeting declared target from apm.yml: copilot
[>] Looking up 1 MCP server in registry...
[x] Server(s) not found in registry: ado-mcp
[i] Run 'apm mcp search <query>' to find available servers
[x] Error installing dependencies: Cannot install 1 missing server(s)
[x] Install failed after 0.0s.

Additional context
This issue does not seem to be the same as Bug 1210. Instead, I am seeing functionality where a registry search appears to work as intended, but an install from that same registry fails to find the named MCP server that a search was able to find?

I also tried removing the MCP configuration entirely, and using the apm install --mcp ado-cmp command to add it. That instead added the following block to my apm.yml:

dependencies:
  apm: []
  mcp:
  - ado-mcp

But still the same error:

$ apm install --mcp ado-mcp --verbose --no-policy
[i] Using MCP registry: *******/registry (from apm config)
[!] Policy enforcement disabled by --no-policy for this invocation. This does NOT bypass apm audit --ci. CI will still fail the PR for the same policy violation.
Target: copilot
+- MCP Servers (1)
[i] Targeting declared target from apm.yml: copilot
[>] Looking up 1 MCP server in registry...
[x] Server(s) not found in registry: ado-mcp
[i] Run 'apm mcp search <query>' to find available servers
MCP integration error: Cannot install 1 missing server(s)
[x] MCP server written to apm.yml but tool integration failed. Run with --verbose for details.
[x] Error installing dependencies: MCP integration failed for 'ado-mcp'
[x] Install failed after 0.0s.

If I instead bypass the registry setting and use the MCP server's URL/protocol that are configured in the registry, then apm install works as expected:

dependencies:
  apm: []
  mcp: 
    - name: ado-mcp
      transport: http
      url: https://my.obfuscated.adourl
      registry: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething does not work as documented.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions