Skip to content

Commit 2aa2cc4

Browse files
joslattamirdresher
andauthored
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>
1 parent c3f54c2 commit 2aa2cc4

16 files changed

Lines changed: 129 additions & 66 deletions

File tree

‎.changeset/mcp-config-locations.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@bradygaster/squad-cli": patch
3+
"@bradygaster/squad-sdk": patch
4+
---
5+
6+
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.

‎.github/agents/squad.agent.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ When spawning agents, include an `MCP TOOLS AVAILABLE` block in the prompt (see
484484
Never crash or halt because an MCP tool is missing. MCP tools are enhancements, not dependencies.
485485
486486
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`.)
488488
3. **Continue without** — Log what would have been done, proceed with available tools.
489489
490490
### Accountable Ownership

‎.squad-templates/mcp-config.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ MCP (Model Context Protocol) servers extend Squad with tools for external servic
44

55
## Config File Locations
66

7-
Users configure MCP servers at these locations (checked in priority order):
8-
1. **Repository-level:** `.copilot/mcp-config.json` (team-shared, committed to repo)
9-
2. **Workspace-level:** `.vscode/mcp.json` (VS Code workspaces)
10-
3. **User-level:** `~/.copilot/mcp-config.json` (personal)
11-
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`.
1213

1314
## Sample Config — Trello
1415

‎.squad-templates/squad.agent.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ When spawning agents, include an `MCP TOOLS AVAILABLE` block in the prompt (see
484484
Never crash or halt because an MCP tool is missing. MCP tools are enhancements, not dependencies.
485485
486486
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`.)
488488
3. **Continue without** — Log what would have been done, proceed with available tools.
489489
490490
### Accountable Ownership

‎docs/src/content/docs/concepts/portability.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ MCP (Model Context Protocol) servers extend Squad with external services. Agents
170170

171171
| Platform | Config File |
172172
|----------|------------|
173-
| **Copilot CLI** | `.copilot/mcp-config.json` |
174-
| **VS Code** | `.vscode/settings.json` (under `copilot.mcp.servers`) |
173+
| **Copilot CLI** | `.mcp.json` at the repo root (shared) or `~/.copilot/mcp-config.json` (personal). Not a project-level `.copilot/mcp-config.json`. |
174+
| **VS Code** | `.vscode/mcp.json` (top-level key `servers`) or `~/.copilot/mcp-config.json` |
175175

176176
### Example: GitHub MCP
177177
```json

‎docs/src/content/docs/features/enterprise-platforms.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Squad uses the Azure CLI for ADO authentication — **no Personal Access Tokens
106106

107107
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.
108108

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):
110110

111111
```json
112112
{

‎docs/src/content/docs/features/mcp.md‎

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,23 @@ MCP bridges Squad agents and external services. Agents use MCP tools to send not
2222

2323
## MCP Configuration Files
2424

25-
There are two places to configure MCP, depending on your platform:
25+
Where you add a server depends on your host:
2626

2727
| Platform | Config File | How to Edit | Startup |
2828
|----------|------------|-----------|---------|
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** |
3131

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

3436
---
3537

3638
## Step-by-Step: CLI Setup
3739

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+
3842
### Step 1: Create the `.copilot` directory and config file
3943

4044
Open your terminal:
@@ -53,7 +57,7 @@ Open `~/.copilot/mcp-config.json` in your editor:
5357
nano ~/.copilot/mcp-config.json
5458

5559
# Windows (PowerShell)
56-
notepad $PROFILE\..\mcp-config.json
60+
notepad $HOME\.copilot\mcp-config.json
5761
```
5862

5963
Paste this base structure:
@@ -115,38 +119,34 @@ If configured correctly, you'll see your GitHub server and its available tools (
115119

116120
## Step-by-Step: VS Code Setup
117121

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
124123

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

127-
In the settings search box, type `MCP` to find Copilot extension settings.
126+
### Step 2: Add an MCP server
128127

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`:
134129

135130
```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+
}
142140
}
143141
}
144142
}
145143
```
146144

147145
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.
148146

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
150150

151151
Open your VS Code integrated terminal (`` Ctrl+` `` or `` Cmd+` ``):
152152

@@ -156,17 +156,17 @@ export GITHUB_TOKEN=$(gh auth token)
156156

157157
This sets the token for the current terminal session. To make it permanent, add it to your shell profile (see CLI Step 3 above).
158158

159-
### Step 5: Reload VS Code
159+
### Step 4: Start the server
160160

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

163163
---
164164

165-
## Example: GitHub MCP (Already Included)
165+
## Example: GitHub MCP
166166

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:
168168

169-
### CLI: `.copilot/mcp-config.json`
169+
### Copilot CLI: `.mcp.json` or `~/.copilot/mcp-config.json`
170170

171171
```json
172172
{
@@ -184,12 +184,13 @@ Most Squad installs come with GitHub MCP pre-configured. Here's what it looks li
184184

185185
Replace `/absolute/path/to/github-mcp.js` with the actual path to your GitHub MCP server script.
186186

187-
### VS Code: `.vscode/settings.json`
187+
### VS Code: `.vscode/mcp.json`
188188

189189
```json
190190
{
191-
"copilot.mcp.servers": {
191+
"servers": {
192192
"github": {
193+
"type": "stdio",
193194
"command": "node",
194195
"args": ["/absolute/path/to/github-mcp.js"],
195196
"env": {
@@ -352,20 +353,23 @@ Agents don't need special setup to discover tools. Here's the flow:
352353

353354
**Fix:**
354355

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`.
357+
358+
2. **Verify config syntax:**
356359
```bash
357360
# CLI
361+
cat .mcp.json | jq .
358362
cat ~/.copilot/mcp-config.json | jq .
359363
# Should be valid JSON; if not, `jq` will error
360364
```
361365

362-
2. **Restart Copilot to reload config:**
366+
3. **Restart Copilot to reload config:**
363367
```bash
364368
copilot quit
365369
copilot
366370
```
367371

368-
3. **Test the MCP server directly:**
372+
4. **Test the MCP server directly:**
369373
```bash
370374
node /absolute/path/to/mcp-server.js
371375
```

‎docs/src/content/docs/features/notifications.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ For advanced use cases, you can also:
372372
373373
## Sample MCP Configs
374374
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.
376376
377377
### Teams Webhook (Simplest)
378378

‎packages/squad-cli/src/cli/commands/state-mcp.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ export function printStateMcpHelp(): void {
312312
'',
313313
'Usage: squad state-mcp [--experimental-backend]',
314314
'',
315-
'This command is intended to be launched by GitHub Copilot CLI through',
316-
'.copilot/mcp-config.json. It exposes squad_decide, squad_state_* and',
315+
'This command is intended to be launched by your MCP host from the',
316+
'squad_state entry Squad writes to the repo-root .mcp.json (--client',
317+
'hosts get it in their own MCP config file). It exposes squad_decide,',
318+
'squad_state_* and',
317319
'squad_state_upstreams (declared upstream inheritance, read from local',
318320
'snapshots only) backed by the configured Squad state backend. Pass',
319321
'--experimental-backend',

‎packages/squad-cli/templates/mcp-config.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ MCP (Model Context Protocol) servers extend Squad with tools for external servic
44

55
## Config File Locations
66

7-
Users configure MCP servers at these locations (checked in priority order):
8-
1. **Repository-level:** `.copilot/mcp-config.json` (team-shared, committed to repo)
9-
2. **Workspace-level:** `.vscode/mcp.json` (VS Code workspaces)
10-
3. **User-level:** `~/.copilot/mcp-config.json` (personal)
11-
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`.
1213

1314
## Sample Config — Trello
1415

0 commit comments

Comments
 (0)