Skip to content

Copilot CLI starts every local MCP server from every agent in .github/agents folder #696

@dufton

Description

@dufton

Describe the bug

In Copilot CLI version 0.0.361, after sending the first message in an interactive session, it starts all the local MCP servers defined in all the agents under .github/agents in the current repo.

Affected version

0.0.361 Commit: fdd8f6541

Steps to reproduce the behavior

  1. Create an agent in the .github/agents folder at the root of the current cloned repo, include a local MCP server. Can be any command, e.g.
name: demo
description: Some description
mcp-servers:
  demodemo:
    type: local
    command: calc.exe
    args: []
    tools: ["*"]
# Comment to avoid CRLF bug
---

Some instructions
  1. Start copilot CLI, send any message.
  2. After sending a single message, all local MCP servers from all agents are running

Expected behavior

MCP servers are only started for the agents being used

Additional context

No response

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