github / github/copilot-cli

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

Open
#146 6 comments 12 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.