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

Abierto
#1,986 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:configuration area:mcp
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### 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_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.