Skip to content

MCP Server not available in Copilot Session #5208

Open

Description

@LukasMetzger

Describe the bug

When an issue is assigned to the agent, MCP tool discovery completes successfully. However, when the agent attempts to use the MCP server defined in its configuration, it reports that the server is not accessible.

The MCP server is configured in the repository under Copilot → MCP Servers using the following configuration:

{
	"mcpServers": {
		"<mcpName>": {
			"type": "http",
			"url": "https://<url>/mcp",
			"headers": {
				"Authorization": "Bearer <Token>"
			},
			"tools": ["*"]
		}
	}
}

The configuration has been validated, as access to the MCP server works successfully from both VS Code and GitHub Codespaces. The issue appears to be specific to Copilot agent execution.

The logs show, that the mcp is discovered:

  • [rust:runner] [cca-engine] Discovered MCP server: github-mcp-server {"runner_action":"info"}
  • [rust:runner] [cca-engine] Discovered MCP server: arc1 {"runner_action":"info"}
  • [rust:runner] [cca-engine] Discovered MCP server: playwright {"runner_action":"info"}

Its then also listed in the session configuration:

  • [rust:runner] [cca-engine] MCP servers configured for session: runtime-tools, github-mcp-server, arc1, microsoftdocs, playwright, engine-tools {"runner_action":"debug"}

Afterwards, a new session is created:

  • [rust:runner] [cca-engine] Created new session <session_id> {"runner_action":"info"}

After that, the mcp is missing from the list of connected mcp's:

  • [rust:runner] [cca-engine] [session=<session_id>] MCP server 'github-mcp-server': pending {"runner_action":"info"}
  • [rust:runner] [cca-engine] [session=<session_id>] MCP server 'playwright': pending {"runner_action":"info"}
  • [rust:runner] [cca-engine] [session=<session_id>] MCP server 'runtime-tools': pending {"runner_action":"info"}
  • [rust:runner] [cca-engine] [session=<session_id>] MCP server 'engine-tools': pending {"runner_action":"info"}

Affected version

CLI 1.0.102

Steps to reproduce the behavior

  1. Assing an issue to a generic or custom agent, that needs the access to a MCP
  2. Tool discovery works
  3. Agent outputs: MCP server not available in this session while the logs show, that all mcps, configured in the repository are dropped

Expected behavior

The agent should be able to access the discovered tools

Additional context

  • Windows
  • GitHub CLI version 1.0.102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions