github / github/copilot-cli

Respect VS Code User Settings for Copilot CLI Configuration (e.g., mcp.json)

Abierto
#146 6 comentarios 12 reacciones 0 asignados Ver en GitHub
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

_No response_

### Proposed solution

To improve user experience and consistency, the Copilot CLI should **respect existing VS Code user settings for configuration**, mirroring the setup used within the editor.

#### 💡 Proposal

The Copilot CLI should look for and utilize configuration files stored in the standard VS Code user settings locations, such as the example below for macOS:

**Example Configuration Location (macOS VS Code Insiders):**
`$HOME/Library/Application Support/Code - Insiders/User/mcp.json`

(Note: The path varies based on the OS and VS Code version, e.g., stable, Insiders.)

#### ⚙️ Sample Configuration Format

The CLI should be able to read and utilize a configuration file formatted like this (using `mcp.json` as an example):

```json
{
"servers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking@latest"],
"type": "stdio"
},

"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "${input:CONTEXT7_API_KEY}"
}
},
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch",
"--user-agent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15\"",
"--ignore-robots-txt"
],
"type": "stdio"
},
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--no-sandbox",
"--isolated",
"--image-responses",
"omit",
"--block-service-workers",
"--ignore-https-errors",
"--save-session",
"--save-trace"
],
"type": "stdio"
},
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"],
"type": "stdio"
}
},
"inputs": [
{
"id": "CONTEXT7_API_KEY",
"type": "promptString",
"description": "Your Context7 API key"
}
]
}
```

#### ➕ Benefits

* **Consistency:** Users maintain a single source of truth for their Copilot configuration across VS Code and the CLI.
* **Ease of Setup:** Reduces redundant configuration steps.
* **Standardization:** Aligns the CLI's behavior with the common configuration practices of the VS Code ecosystem.

This integration would significantly enhance the workflow for developers heavily using both VS Code and the Copilot CLI.

### Example prompts or workflows

_No response_

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