You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2aa2cc4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(templates): point users at MCP config files their host reads (#2331)
The coordinator's MCP guide listed a project-level .copilot/mcp-config.json
as the team-shared location, and the coordinator told users to "Add it to
.copilot/mcp-config.json". Copilot CLI doesn't read that file; it reads
.mcp.json, .github/mcp.json and ~/.copilot/mcp-config.json.
- mcp-config.md (4 mirrors): name .mcp.json next to squad_state,
.github/mcp.json, .vscode/mcp.json (servers key),
~/.copilot/mcp-config.json, --additional-mcp-config and the --client hosts
- squad.agent.md templates + .github/agents/squad.agent.md: fallback line
- squad state-mcp --help: launched from the .mcp.json entry
- docs: mcp.md (CLI and VS Code locations, Windows path, troubleshooting),
portability.md, enterprise-platforms.md, notifications.md
- test pinning the guide and the fallback line
Closes#2330
Co-authored-by: Tamir Dresher <tamir.dresher@gmail.com>
Point users at MCP config files their host actually reads. The coordinator's MCP guide (`.squad/templates/mcp-config.md`) listed a project-level `.copilot/mcp-config.json` as the team-shared location and the coordinator told users to "Add it to `.copilot/mcp-config.json`", but Copilot CLI doesn't read that file. The guide now names the repo-root `.mcp.json` (next to `squad_state`), `.github/mcp.json`, `.vscode/mcp.json` (with its `servers` key), `~/.copilot/mcp-config.json`, and the files used by `--client` hosts. The `squad state-mcp --help` text and the MCP docs pages are corrected the same way.
Copy file name to clipboardExpand all lines: .github/agents/squad.agent.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -484,7 +484,7 @@ When spawning agents, include an `MCP TOOLS AVAILABLE` block in the prompt (see
484
484
Never crash or halt because an MCP tool is missing. MCP tools are enhancements, not dependencies.
485
485
486
486
1. **CLI fallback** — GitHub MCP missing → use `gh` CLI. Azure MCP missing → use `az` CLI.
487
-
2. **Inform the user** — "Trello integration requires the Trello MCP server. Add it to `.copilot/mcp-config.json`."
487
+
2. **Inform the user** — "Trello integration requires the Trello MCP server. Add it to `.mcp.json` next to `squad_state`." (Other hosts: see `.squad/templates/mcp-config.md`.)
488
488
3. **Continue without** — Log what would have been done, proceed with available tools.
4.**CLI override:**`--additional-mcp-config` flag (session-specific)
7
+
Squad registers its own `squad_state` server in the repo-root `.mcp.json`. Users add other servers next to it, in the file their host reads:
8
+
1.**Repository-level:**`.mcp.json` at the repo root (team-shared, committed). Copilot CLI and Claude Code read it; Copilot CLI also reads `.github/mcp.json`. Copilot CLI loads project-level servers once the folder is trusted, and does not read a project-level `.copilot/mcp-config.json`.
9
+
2.**Workspace-level:**`.vscode/mcp.json` (VS Code workspaces; the top-level key is `servers`, not `mcpServers`)
10
+
3.**User-level:**`~/.copilot/mcp-config.json` (personal; Copilot CLI loads it in every project, and VS Code reads it as its Copilot global config)
11
+
4.**CLI override:**`--additional-mcp-config @<file>` flag (session-specific; `squad loop` and `squad watch` execute mode pass `@.mcp.json` this way)
12
+
5.**Other hosts** (`squad init --client ...`): Kiro `.kiro/settings/mcp.json`, Cursor `.cursor/mcp.json`, OpenCode `opencode.json` (`mcp`), Codex `.codex/config.toml` (`[mcp_servers.<name>]`). For Antigravity use `agy mcp add`, because Squad regenerates `.agents/agents/squad.md`.
Copy file name to clipboardExpand all lines: .squad-templates/squad.agent.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -484,7 +484,7 @@ When spawning agents, include an `MCP TOOLS AVAILABLE` block in the prompt (see
484
484
Never crash or halt because an MCP tool is missing. MCP tools are enhancements, not dependencies.
485
485
486
486
1. **CLI fallback** — GitHub MCP missing → use `gh` CLI. Azure MCP missing → use `az` CLI.
487
-
2. **Inform the user** — "Trello integration requires the Trello MCP server. Add it to `.copilot/mcp-config.json`."
487
+
2. **Inform the user** — "Trello integration requires the Trello MCP server. Add it to `.mcp.json` next to `squad_state`." (Other hosts: see `.squad/templates/mcp-config.md`.)
488
488
3. **Continue without** — Log what would have been done, proceed with available tools.
Copy file name to clipboardExpand all lines: docs/src/content/docs/features/enterprise-platforms.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Squad uses the Azure CLI for ADO authentication — **no Personal Access Tokens
106
106
107
107
For GitHub repositories, Squad uses the `gh` CLI for authentication. When working across multiple GitHub accounts (e.g., personal GitHub and Enterprise Managed Users), use `gh auth switch` to toggle between accounts. See [Cross-organization authentication](../scenarios/cross-org-auth) for detailed multi-account setup.
108
108
109
-
Alternatively, if the Azure DevOps MCP server is configured in your environment, Squad will use it automatically for richer API access. Add it to `.copilot/mcp-config.json`:
109
+
Alternatively, if the Azure DevOps MCP server is configured in your environment, Squad will use it automatically for richer API access. Add it to `.mcp.json` at the repo root, next to `squad_state` (or to `~/.copilot/mcp-config.json` to keep it personal):
Copy file name to clipboardExpand all lines: docs/src/content/docs/features/mcp.md
+39-35Lines changed: 39 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,19 +22,23 @@ MCP bridges Squad agents and external services. Agents use MCP tools to send not
22
22
23
23
## MCP Configuration Files
24
24
25
-
There are two places to configure MCP, depending on your platform:
25
+
Where you add a server depends on your host:
26
26
27
27
| Platform | Config File | How to Edit | Startup |
28
28
|----------|------------|-----------|---------|
29
-
|**Copilot CLI**|`.copilot/mcp-config.json`| Text editor | Add to shell initialization (`~/.bashrc`, `~/.zshrc`, etc.) |
30
-
|**VS Code**|`.vscode/settings.json`| VS Code Settings GUI or JSON editor| Built-in; restarts Copilot extension|
29
+
|**Copilot CLI**|`.mcp.json` at the repo root (shared with your team; Squad's `squad_state` server already lives there) or `~/.copilot/mcp-config.json` (personal, every project)| Text editor | Add to shell initialization (`~/.bashrc`, `~/.zshrc`, etc.) |
30
+
|**VS Code**|`.vscode/mcp.json`(top-level key `servers`) or `~/.copilot/mcp-config.json`| Text editor, or **MCP: Add Server** from the Command Palette | Built-in; start or restart from **MCP: List Servers**|
31
31
32
-
This guide covers both. Pick the one that matches your workflow.
32
+
Copilot CLI doesn't read a `.copilot/mcp-config.json` inside the project (`squad init` writes a sample one there), so a server added to it never loads. Hosts added with `squad init --client` have their own MCP config (Claude Code shares `.mcp.json`), and Squad adds `squad_state` to it for you.
33
+
34
+
This guide covers Copilot CLI and VS Code. Pick the one that matches your workflow.
33
35
34
36
---
35
37
36
38
## Step-by-Step: CLI Setup
37
39
40
+
These steps use your personal config, `~/.copilot/mcp-config.json`. To share a server with your team, add the same `mcpServers` entry to `.mcp.json` at the repo root instead, next to `squad_state`, and commit it. Copilot CLI loads project servers once you trust the folder.
41
+
38
42
### Step 1: Create the `.copilot` directory and config file
39
43
40
44
Open your terminal:
@@ -53,7 +57,7 @@ Open `~/.copilot/mcp-config.json` in your editor:
53
57
nano ~/.copilot/mcp-config.json
54
58
55
59
# Windows (PowerShell)
56
-
notepad $PROFILE\..\mcp-config.json
60
+
notepad $HOME\.copilot\mcp-config.json
57
61
```
58
62
59
63
Paste this base structure:
@@ -115,38 +119,34 @@ If configured correctly, you'll see your GitHub server and its available tools (
115
119
116
120
## Step-by-Step: VS Code Setup
117
121
118
-
### Step 1: Open VS Code Settings
119
-
120
-
-**macOS:** Code → Preferences → Settings
121
-
-**Windows:** File → Preferences → Settings
122
-
123
-
Or use the keyboard shortcut: `Cmd+,` (macOS) or `Ctrl+,` (Windows).
122
+
### Step 1: Open the workspace MCP config
124
123
125
-
### Step 2: Search for "MCP"
124
+
Create `.vscode/mcp.json` in your project, or run **MCP: Add Server** from the Command Palette (`Cmd+Shift+P` on macOS, `Ctrl+Shift+P` on Windows) and follow the prompts.
126
125
127
-
In the settings search box, type `MCP` to find Copilot extension settings.
126
+
### Step 2: Add an MCP server
128
127
129
-
### Step 3: Add an MCP server
130
-
131
-
Look for the **"Copilot MCP Servers"** section (or similar — naming varies by Copilot version).
132
-
133
-
Click **"Edit in settings.json"** to see the raw configuration:
128
+
VS Code uses a top-level `servers` key, not `mcpServers`:
134
129
135
130
```json
136
-
"copilot.mcp.servers": {
137
-
"github": {
138
-
"command": "node",
139
-
"args": ["/absolute/path/to/github-mcp.js"],
140
-
"env": {
141
-
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
131
+
{
132
+
"servers": {
133
+
"github": {
134
+
"type": "stdio",
135
+
"command": "node",
136
+
"args": ["/absolute/path/to/github-mcp.js"],
137
+
"env": {
138
+
"GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
139
+
}
142
140
}
143
141
}
144
142
}
145
143
```
146
144
147
145
The `${env:GITHUB_TOKEN}` syntax reads from your shell environment. Replace `/absolute/path/to/github-mcp.js` with the actual path to your MCP server script.
148
146
149
-
### Step 4: Add environment variables
147
+
To keep a server personal instead, VS Code also reads `~/.copilot/mcp-config.json`, the same file Copilot CLI uses (with `mcpServers`).
148
+
149
+
### Step 3: Add environment variables
150
150
151
151
Open your VS Code integrated terminal (`` Ctrl+` `` or `` Cmd+` ``):
This sets the token for the current terminal session. To make it permanent, add it to your shell profile (see CLI Step 3 above).
158
158
159
-
### Step 5: Reload VS Code
159
+
### Step 4: Start the server
160
160
161
-
Press `Cmd+Shift+P` (macOS) or `Ctrl+Shift+P` (Windows) and select **"Copilot: Reload Copilot Servers"**.
161
+
Run **MCP: List Servers** from the Command Palette, select the server, and choose **Start Server** (or **Restart Server** after you change its config). VS Code can also start servers on its own when you send a chat message.
162
162
163
163
---
164
164
165
-
## Example: GitHub MCP (Already Included)
165
+
## Example: GitHub MCP
166
166
167
-
Most Squad installs come with GitHub MCP pre-configured. Here's what it looks like:
167
+
Here's what a GitHub MCP entry looks like:
168
168
169
-
### CLI: `.copilot/mcp-config.json`
169
+
### Copilot CLI: `.mcp.json` or `~/.copilot/mcp-config.json`
170
170
171
171
```json
172
172
{
@@ -184,12 +184,13 @@ Most Squad installs come with GitHub MCP pre-configured. Here's what it looks li
184
184
185
185
Replace `/absolute/path/to/github-mcp.js` with the actual path to your GitHub MCP server script.
186
186
187
-
### VS Code: `.vscode/settings.json`
187
+
### VS Code: `.vscode/mcp.json`
188
188
189
189
```json
190
190
{
191
-
"copilot.mcp.servers": {
191
+
"servers": {
192
192
"github": {
193
+
"type": "stdio",
193
194
"command": "node",
194
195
"args": ["/absolute/path/to/github-mcp.js"],
195
196
"env": {
@@ -352,20 +353,23 @@ Agents don't need special setup to discover tools. Here's the flow:
352
353
353
354
**Fix:**
354
355
355
-
1.**Verify config syntax:**
356
+
1.**Verify the server is in a file your host reads:** for Copilot CLI that's `.mcp.json` at the repo root, `.github/mcp.json`, or `~/.copilot/mcp-config.json`. A server in the project's `.copilot/mcp-config.json` is never loaded; move it to `.mcp.json`.
Copy file name to clipboardExpand all lines: docs/src/content/docs/features/notifications.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,7 +372,7 @@ For advanced use cases, you can also:
372
372
373
373
## Sample MCP Configs
374
374
375
-
Below are complete, copy-pasteable `.copilot/mcp-config.json` examples for each notification platform. Pick the one that matches your setup and copy the entire `mcpServers` block into your config file.
375
+
Below are complete, copy-pasteable MCP config examples for each notification platform. Pick the one that matches your setup and copy the entire `mcpServers` block into `.mcp.json` at the repo root (next to `squad_state`) or into `~/.copilot/mcp-config.json`. For VS Code's `.vscode/mcp.json`, put the entries under `servers` instead.
4.**CLI override:**`--additional-mcp-config` flag (session-specific)
7
+
Squad registers its own `squad_state` server in the repo-root `.mcp.json`. Users add other servers next to it, in the file their host reads:
8
+
1.**Repository-level:**`.mcp.json` at the repo root (team-shared, committed). Copilot CLI and Claude Code read it; Copilot CLI also reads `.github/mcp.json`. Copilot CLI loads project-level servers once the folder is trusted, and does not read a project-level `.copilot/mcp-config.json`.
9
+
2.**Workspace-level:**`.vscode/mcp.json` (VS Code workspaces; the top-level key is `servers`, not `mcpServers`)
10
+
3.**User-level:**`~/.copilot/mcp-config.json` (personal; Copilot CLI loads it in every project, and VS Code reads it as its Copilot global config)
11
+
4.**CLI override:**`--additional-mcp-config @<file>` flag (session-specific; `squad loop` and `squad watch` execute mode pass `@.mcp.json` this way)
12
+
5.**Other hosts** (`squad init --client ...`): Kiro `.kiro/settings/mcp.json`, Cursor `.cursor/mcp.json`, OpenCode `opencode.json` (`mcp`), Codex `.codex/config.toml` (`[mcp_servers.<name>]`). For Antigravity use `agy mcp add`, because Squad regenerates `.agents/agents/squad.md`.
0 commit comments