VS Code (GitHub Copilot)
Configure GitLab MCP for VS Code with GitHub Copilot's MCP support.
Auto-Setup
bash
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
VS Code uses per-project MCP configuration. Create the config in each project's .vscode/ directory.
Configuration
Create or edit .vscode/mcp.json in your project root:
json
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@structured-world/gitlab-mcp"],
"env": {
"GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
"GITLAB_API_URL": "https://gitlab.com"
}
}
}
}Remote Server
Connect to a running GitLab MCP HTTP server:
json
{
"mcpServers": {
"gitlab": {
"type": "streamable-http",
"url": "http://localhost:3333/mcp"
}
}
}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") - Per-project vs global: VS Code MCP is per-project; ensure
.vscode/mcp.jsonis in your workspace root - Copilot required: MCP support requires GitHub Copilot extension
