github / github/copilot-cli

Support wildcard/glob patterns in .copilot/mcp-config.json tools arrays for filtering tool visibility using prefixes for subsets of tools

Aberta
#1,986 0 comentários 0 reações 0 responsáveis Ver no GitHub
area:configuration area:mcp
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the feature or problem you'd like to solve

The MCP config `tools` array require exact tool names — add glob/wildcard pattern support (e.g., `ado-wit_*`) so users can filter tool visibility by prefix or pattern without enumerating every tool individually.

### Proposed solution

MCP servers often expose dozens of tools across functional domains. Pattern-based filtering — at both the CLI flag and MCP config level — lets users load only the tools relevant to their task, keeping the context window small and focused. Something like this may encourage more MCP Server Owners to adopt a filtering approach like ADO MCP did and make managing context windows much easier over time.

### Example prompts or workflows

An MCP server like Azure DevOps exposes very many tools prefixed by domain https://github.com/microsoft/azure-devops-mcp/blob/main/docs/TOOLSET.md — `wit_*` (work item tracking), `repo_*` (repositories/PRs), `pipelines_*` (builds/pipelines), etc.

### .copilot/mcp-config.json

Today, the `tools` array in MCP server configuration requires exact tool names:

```json
{
"mcpServers": {
"ado": {
"tools": [
"wit_get_work_item",
"wit_update_work_item",
"wit_create_work_item",
"repo_list_pull_requests_by_repo_or_project",
"repo_get_pull_request_by_id"
]
}
}
}
```

With pattern support in the `tools` array:

```json
{
"mcpServers": {
"ado": {
"tools": [
"pipelines_*",
"repo_*",
"search_*",
"wit_*"
]
}
}
}
```
could also let you do something like the following in order to enable all get related tools for an autopilot/yolo session

```json
{
"mcpServers": {
"ado": {
"tools": [
"*_get_*",
]
}
}
}
```

This lets users scope an MCP server to specific tool domains at the config level — before tools ever reach the agent — without needing to know or maintain the full list of tool names.

**Suggested pattern syntax:** glob-style matching, consistent with the existing `shell(git:*)` prefix-matching pattern already supported in `--allow-tool`.

### Additional context

_No response_

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.