Skip to content

Registry policy rejects MCP configs that add required runtime headers #4205

Description

@audunsolemdal

Describe the bug

The Copilot CLI (and app) reject MCP server sapproved by my Github organization's registry configured in the Allowlist. This happens when the local configuration adds a required runtime authentication header that the registry cannot publish.

Essentially I want some form of authentication on my self hosted MCP servers and need to provide a key value pair with http headers

I am using Azure API Center as my MCP registry. Here is an example of a configured MCP server

Affected version

1.0.73

Steps to reproduce the behavior

  1. Create Azure API Center or another MCP-compliant registry. Add a HTTP-based MCP server.
  2. Configure a Github MCP server registry policy configured with an Azure API Center MCP registry
    3.. Add local MCP config. In the local config, add HTTP headers, copilot cli on startup will then return: "1 MCP server were blocked by policy: "
  3. Remove the header(s) from the local config - no issues with blocked by policy
    The same local config with headers works fine in VS Code, but does not work in both the Copilot App or the CLI.

Expected behavior

I am not sure if this is intended behaviour for the MCP standard. The same exact config in VSCode boots without issues. I would have expected headers to be ignored in the identity mathching.

Additional context

My local mcp server config.

{
  "mcpServers": {
    "terraform-mcp-server": {
      "type": "http",
      "url": "https://my-api-gw.no/mcp-terraform/v1/mcp",
      "gallery": "https://p-ne1apim-apicenter.data.swedencentral.azure-apicenter.ms/workspaces/default",
      "version": "v1",
      "headers": {
        "Ocp-Apim-Subscription-Key": "xxx"
      }
    },
}

Removing the "headers" section removes the issue (but leaves me unauthenticated).

GPT 5.6 Sol believes the issue comes from the header creating different identities (I do not know if this is accurate):

"The server is blocked as not matching the organization registry entry, despite the normalized remote URL being identical.

This appears consistent with the published @github/mcp-registry@0.1.6 fingerprint implementation:

Header names are lowercased and sorted.
Remote identity includes the normalized URL and header names.
Header values are excluded.
The two identities therefore differ:

Plain text
v1:remote:https://example.azure-api.net/my-mcp/mcp
v1:remote:https://example.azure-api.net/my-mcp/mcp:ocp-apim-subscription-key
Relevant implementation:

https://unpkg.com/@github/mcp-registry@0.1.6/dist/fingerprint/normalize.js
https://unpkg.com/@github/mcp-registry@0.1.6/dist/fingerprint/fingerprint.js
https://unpkg.com/@github/mcp-registry@0.1.6/dist/fingerprint/canonical.js
The exact Copilot CLI 1.0.73 call path is not public, but the observed rejection is consistent with this behavior.
"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions