microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
hve-core-v3.2.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.vscode/README.md

114lines · modecode

1---
2title: VS Code MCP Server Configuration
3description: Configuration guide for GitHub MCP server integration with VS Code Copilot
4author: Microsoft
5ms.date: 2025-06-13
6ms.topic: reference
7keywords:
8 - mcp
9 - github copilot
10 - vscode
11 - configuration
12estimated_reading_time: 3
13---
14
15## Overview
16
17This workspace uses the GitHub MCP server for enhanced Copilot capabilities.
18
19## Configuration
20
21The MCP server is configured in `.vscode/mcp.json` to use a custom endpoint (`https://github.com/mcp`).
22
23> **Note:** If you want to use the recommended GitHub MCP server setup, run `npx @modelcontextprotocol/server-github` and update your `.vscode/mcp.json` accordingly. See the [GitHub MCP Server Documentation](https://github.com/github/github-mcp-server) for details.
24
25### Authentication
26
27#### Option 1: OAuth (Recommended)
28
29* Uses VS Code's built-in GitHub authentication
30* No manual token management required
31* Managed via: VS Code → Accounts menu → Manage Trusted MCP Servers
32
33#### Option 2: Personal Access Token
34
35* Required for GitHub Enterprise Server
36* Set environment variable: `GITHUB_PERSONAL_ACCESS_TOKEN`
37* Generate at: <https://github.com/settings/personal-access-tokens/new>
38
39### Enterprise Configuration
40
41For GitHub Enterprise Server:
42
431. Update `.vscode/mcp.json` with your enterprise URL:
44
45 ```json
46 {
47 "servers": {
48 "github": {
49 "url": "https://your-github-enterprise.com/mcp"
50 }
51 }
52 }
53 ```
54
552. Set your PAT as an environment variable:
56
57 ```powershell
58 # PowerShell
59 $env:GITHUB_PERSONAL_ACCESS_TOKEN = "your_token_here"
60 ```
61
62 ```bash
63 # Bash/Linux/macOS
64 export GITHUB_PERSONAL_ACCESS_TOKEN="your_token_here"
65 ```
66
67### Required Token Scopes
68
69If using PAT authentication, your token needs:
70
71* `repo` - Full control of private repositories
72* `read:org` - Read org and team membership
73* `user` - Read user profile data
74
75### Usage
76
77Once configured, the MCP server provides:
78
79* Repository operations (file management, search)
80* Branch management
81* Issue management
82* Pull request workflows
83* Code search capabilities
84
85### Security Notes
86
87* Never commit tokens to version control
88* Use OAuth when possible for automatic credential management
89* Rotate PATs regularly
90* Use fine-grained tokens with minimal required permissions
91
92### Troubleshooting
93
94**Server not connecting:**
95
96* Check VS Code version (1.101+ recommended for OAuth)
97* Verify GitHub authentication via Accounts menu
98* For PAT: Verify `GITHUB_PERSONAL_ACCESS_TOKEN` is set
99
100**Permission errors:**
101
102* Ensure token has required scopes
103* Check token hasn't expired
104* Verify repository access permissions
105
106### References
107
108* [VS Code MCP Extension Guide](https://code.visualstudio.com/api/extension-guides/ai/mcp)
109* [GitHub MCP Server Documentation](https://github.com/github/github-mcp-server)
110* [GitHub Personal Access Tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
111
112---
113
114*🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.*
115