Skip to content

Commit 35c4587

Browse files
roysha1Copilotkingpanther13
authored
feat(site): add Copilot CLI support to installation wizard (homeassistant-ai#909)
Add GitHub Copilot CLI as a new AI client in the setup wizard with: - New client entry (copilot-cli.md) with stdio, SSE, and HTTP support - Interactive /mcp add form instructions adapting for local vs remote - New copilot-cli.svg logo - Wizard config generation for both STDIO and HTTP server types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: kingpanther13 <25392815+kingpanther13@users.noreply.github.com>
1 parent e0fce36 commit 35c4587

3 files changed

Lines changed: 111 additions & 0 deletions

File tree

site/public/logos/copilot-cli.svg

Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Copilot CLI
3+
company: GitHub
4+
logo: /logos/copilot-cli.svg
5+
transports: ['stdio', 'sse', 'streamable-http']
6+
configFormat: ui
7+
configLocation: ~/.copilot/mcp-config.json
8+
accuracy: 5
9+
order: 6
10+
---
11+
12+
## Configuration
13+
14+
Copilot CLI supports MCP servers via the interactive `/mcp add` command. Supports Local, STDIO, HTTP, and SSE server types.
15+
16+
### Adding an MCP Server
17+
18+
1. Start Copilot CLI: `copilot`
19+
2. Use the `/mcp add` slash command
20+
3. Fill in the form fields using **Tab** to navigate between them
21+
4. Press **Ctrl+S** to save, or **Esc** to cancel
22+
23+
### stdio Configuration (Local)
24+
25+
Use these values in the `/mcp add` form:
26+
27+
| Field | Value |
28+
|-------|-------|
29+
| Server Name | `home-assistant` |
30+
| Server Type | Press **2** for STDIO |
31+
| Command | `uvx ha-mcp@latest` |
32+
| Environment Variables | `HOMEASSISTANT_URL=http://homeassistant.local:8123 HOMEASSISTANT_TOKEN=your_token` |
33+
| Tools | `*` |
34+
35+
### HTTP Configuration (Network/Remote)
36+
37+
Use these values in the `/mcp add` form:
38+
39+
| Field | Value |
40+
|-------|-------|
41+
| Server Name | `home-assistant` |
42+
| Server Type | Press **3** for HTTP |
43+
| URL | `{{MCP_SERVER_URL}}` |
44+
| Tools | `*` |
45+
46+
### SSE Configuration (Network/Remote)
47+
48+
| Field | Value |
49+
|-------|-------|
50+
| Server Name | `home-assistant` |
51+
| Server Type | Press **4** for SSE |
52+
| URL | `{{MCP_SERVER_URL}}` |
53+
| Tools | `*` |
54+
55+
## Useful Commands
56+
57+
```bash
58+
# Check MCP server status in an interactive session
59+
/mcp
60+
61+
# Start Copilot CLI
62+
copilot
63+
```
64+
65+
## Notes
66+
67+
- Server Type options: 1 = Local, 2 = STDIO, 3 = HTTP, 4 = SSE
68+
- Environment variables format: `KEY=VALUE` pairs separated by spaces
69+
- Tools field: use `*` for all tools, or a comma-separated list
70+
- MCP server config stored in `~/.copilot/mcp-config.json`
71+
- Set `COPILOT_HOME` env var to change config directory
72+
- GitHub MCP server is included by default

site/src/pages/setup.astro

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,41 @@ mcpServers:
14981498
<li>Click <strong>Save</strong></li>
14991499
</ol>
15001500
</div>`;
1501+
} else if (state.client.id === 'copilot-cli') {
1502+
if (isStdio) {
1503+
uiSteps = `<div class="instruction-block">
1504+
<h4 class="instruction-title">⚙️ Copilot CLI Configuration (STDIO)</h4>
1505+
<ol class="text-sm text-slate-300 space-y-2 list-decimal list-inside">
1506+
<li>Start Copilot CLI: <code class="bg-slate-800 px-1 rounded">copilot</code></li>
1507+
<li>Run the <code class="bg-slate-800 px-1 rounded">/mcp add</code> slash command</li>
1508+
<li>Fill in the form (use <strong>Tab</strong> to navigate, <strong>Ctrl+S</strong> to save):
1509+
<ul class="ml-6 mt-1 text-slate-400 list-disc list-inside space-y-1">
1510+
<li>Server Name: <code class="bg-slate-800 px-1 rounded">home-assistant</code></li>
1511+
<li>Server Type: Press <strong>2</strong> for STDIO</li>
1512+
<li>Command: <code class="bg-slate-800 px-1 rounded">uvx ha-mcp@latest</code></li>
1513+
<li>Environment Variables: <code class="bg-slate-800 px-1 rounded">HOMEASSISTANT_URL={{HOMEASSISTANT_URL}} HOMEASSISTANT_TOKEN={{HOMEASSISTANT_TOKEN}}</code></li>
1514+
<li>Tools: <code class="bg-slate-800 px-1 rounded">*</code></li>
1515+
</ul>
1516+
</li>
1517+
</ol>
1518+
</div>`;
1519+
} else {
1520+
uiSteps = `<div class="instruction-block">
1521+
<h4 class="instruction-title">⚙️ Copilot CLI Configuration (HTTP)</h4>
1522+
<ol class="text-sm text-slate-300 space-y-2 list-decimal list-inside">
1523+
<li>Start Copilot CLI: <code class="bg-slate-800 px-1 rounded">copilot</code></li>
1524+
<li>Run the <code class="bg-slate-800 px-1 rounded">/mcp add</code> slash command</li>
1525+
<li>Fill in the form (use <strong>Tab</strong> to navigate, <strong>Ctrl+S</strong> to save):
1526+
<ul class="ml-6 mt-1 text-slate-400 list-disc list-inside space-y-1">
1527+
<li>Server Name: <code class="bg-slate-800 px-1 rounded">home-assistant</code></li>
1528+
<li>Server Type: Press <strong>3</strong> for HTTP</li>
1529+
<li>URL: <code class="bg-slate-800 px-1 rounded">{{MCP_SERVER_URL}}</code></li>
1530+
<li>Tools: <code class="bg-slate-800 px-1 rounded">*</code></li>
1531+
</ul>
1532+
</li>
1533+
</ol>
1534+
</div>`;
1535+
}
15011536
}
15021537
instructions.push(uiSteps);
15031538
}

0 commit comments

Comments
 (0)