Skip to content

VS Code Integration Guide ​

Configure GitLab MCP for VS Code with GitHub Copilot's MCP support.

Auto-Setup ​

bash
npx @structured-world/gitlab-mcp install --vscode

One-Click Install ​

Install directly from VS Code:

Install in VS Code

Detection ​

MethodDetails
TypeConfig directory
Path.vscode/ (per-project)
Auto-detectedYes (when .vscode/ directory exists)

Config File Location ​

OSPath
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:

json
{
  "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:

json
{
  "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 ​

  1. Open the project in VS Code
  2. Open GitHub Copilot chat
  3. Check available MCP tools via the tools picker
  4. 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

See Also ​

Released under the Apache 2.0 License.