Skip to content

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

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

  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")
  • Per-project vs global: VS Code MCP is per-project; ensure .vscode/mcp.json is in your workspace root
  • Copilot required: MCP support requires GitHub Copilot extension

See Also

Released under the Apache 2.0 License.