VS Code Integration Guide
Configure GitLab MCP for VS Code with GitHub Copilot's MCP support.
Auto-Setup
npx @structured-world/gitlab-mcp install --vscodeOne-Click Install
Install directly from VS Code:
Detection
| Method | Details |
|---|---|
| Type | Config directory |
| Path | .vscode/ (per-project) |
| Auto-detected | Yes (when .vscode/ directory exists) |
Config File Location
| OS | Path |
|---|---|
| All | .vscode/mcp.json (per-project) |
TIP
Use .vscode/mcp.json for workspace configuration. VS Code also supports user-level MCP configuration through its MCP configuration commands.
Configuration
Create or edit .vscode/mcp.json in your project root:
{
"inputs": [
{
"type": "promptString",
"id": "gitlab-token",
"description": "GitLab access token",
"password": true
}
],
"servers": {
"gitlab": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@structured-world/gitlab-mcp"],
"env": {
"GITLAB_TOKEN": "${input:gitlab-token}",
"GITLAB_API_URL": "https://gitlab.com"
}
}
}
}VS Code prompts for the token without writing its value into this workspace file. Do not replace the input reference with a literal token in a committed configuration.
Remote Server
Connect to a running GitLab MCP HTTP server:
{
"servers": {
"gitlab": {
"type": "http",
"url": "http://localhost:3333/mcp"
}
}
}These examples use the VS Code .vscode/mcp.json format with a servers root. Portable Copilot configurations use mcpServers instead; do not interchange the formats when selecting a different configuration destination. See Microsoft's MCP server guide.
Verification
- Open the project in VS Code
- Open GitHub Copilot chat
- Check available MCP tools via the tools picker
- GitLab tools should be listed
Troubleshooting
- Tools not appearing: Reload the VS Code window (
Cmd+Shift+P> "Reload Window") - Configuration scope: Check whether the server is registered for your workspace or user profile
- Copilot required: MCP support requires GitHub Copilot extension
