Skip to content

Commit 193fbfb

Browse files
committed
Merge branch '001-spoke-home-assistant-integration' into main: enable MCP workspace configuration
2 parents cd7dde9 + a020de5 commit 193fbfb

File tree

4 files changed

+67
-5
lines changed

4 files changed

+67
-5
lines changed

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ obj/
77
*.suo
88
*.cache
99

10-
# IDE files
1110
.vscode/
11+
# Allow tracking a specific VS Code workspace file(s) used for sharing MCP server configuration
12+
!.vscode/mcp.json
13+
!.vscode/extensions.json
14+
!.vscode/README.md
1215
.idea/
1316

1417
# OS files
@@ -24,12 +27,12 @@ Thumbs.db
2427
.fake
2528

2629
# .NET SDK
27-
30+
.vscode/*
2831
# Node / JavaScript
2932
node_modules/
30-
dist/
31-
build/
32-
33+
!.vscode/mcp.json
34+
!.vscode/extensions.json
35+
!.vscode/README.md
3336
# Environment files
3437
.env
3538
.env.*

.vscode/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# MCP (Model Context Protocol) configuration for this workspace
2+
3+
This workspace includes an `mcp.json` (which configures MCP servers for GitHub Copilot and Microsoft Learn documentation) and recommends a few extensions to enable MCP features in VS Code.
4+
5+
## Recommended setup
6+
7+
1. Install the recommended extensions (copilot, copilot-labs, C#):
8+
- `github.copilot`
9+
- `github.copilot-labs`
10+
- `ms-dotnettools.csharp`
11+
12+
2. Sign into GitHub Copilot and (optionally) Copilot Labs in VS Code.
13+
14+
3. When prompted by the MCP client or the Copilot extension, provide a GitHub PAT or App token. This repository has an `mcp.json` that defines an input named `Authorization` that the extension will ask for.
15+
16+
4. After installing extensions and signing in, open `Command Palette (Ctrl+Shift+P)` and look for MCP or Copilot commands to connect to the ``io.github.github/github-mcp-server`` server and the ``microsoftdocs/mcp`` server.
17+
18+
## Privacy & security
19+
20+
- Do not commit secrets (PATs, tokens or credentials). The `mcp.json` file expects the token to be provided via the editor prompt and does not store it in the repository.
21+
22+
## Troubleshooting
23+
24+
- If you don't see the MCP options in Copilot, update Copilot and Copilot Labs to the latest version.
25+
- Ensure your GitHub token has appropriate scopes (usually `repo`, `read:org`, or other scopes Copilot/extension documents require).

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"github.copilot",
4+
"github.copilot-labs",
5+
"ms-dotnettools.csharp"
6+
]
7+
}

.vscode/mcp.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"servers": {
3+
"io.github.github/github-mcp-server": {
4+
"type": "http",
5+
"url": "https://api.githubcopilot.com/mcp/",
6+
"headers": {
7+
"Authorization": "${input:Authorization}"
8+
},
9+
"gallery": "https://api.mcp.github.com",
10+
"version": "0.23.0"
11+
},
12+
"microsoftdocs/mcp": {
13+
"type": "http",
14+
"url": "https://learn.microsoft.com/api/mcp",
15+
"gallery": "https://api.mcp.github.com",
16+
"version": "1.0.0"
17+
}
18+
},
19+
"inputs": [
20+
{
21+
"id": "Authorization",
22+
"type": "promptString",
23+
"description": "Authentication token (PAT or App token)",
24+
"password": true
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)