GitHub Copilot Setup Guide
July 16, 2026 ยท View on GitHub
This guide explains how to use @zereight/mcp-gitlab with GitHub Copilot in VS Code.
Important note
GitHub Copilot in VS Code uses the same VS Code MCP server configuration model.
That means you configure the server in:
.vscode/mcp.jsonfor workspace scope, or- your user-profile
mcp.jsonfor global scope
Install the server once:
brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp
brew install zereight/gitlab-mcp/zereight-mcp-gitlab
Or with npm:
npm install -g @zereight/mcp-gitlab
If VS Code cannot find zereight-mcp-gitlab, use the absolute path from which zereight-mcp-gitlab.
PAT setup
Recommended secure example:
{
"inputs": [
{
"type": "promptString",
"id": "gitlab-token",
"description": "GitLab Personal Access Token",
"password": true
}
],
"servers": {
"gitlab": {
"type": "stdio",
"command": "zereight-mcp-gitlab",
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab-token}",
"GITLAB_API_URL": "https://gitlab.com/api/v4",
"GITLAB_READ_ONLY_MODE": "false"
}
}
}
}
OAuth setup
{
"inputs": [
{
"type": "promptString",
"id": "gitlab-oauth-client-id",
"description": "GitLab OAuth Client ID"
}
],
"servers": {
"gitlab": {
"type": "stdio",
"command": "zereight-mcp-gitlab",
"env": {
"GITLAB_USE_OAUTH": "true",
"GITLAB_OAUTH_CLIENT_ID": "${input:gitlab-oauth-client-id}",
"GITLAB_OAUTH_REDIRECT_URI": "http://127.0.0.1:8888/callback",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}
How to verify it loaded
After adding the server:
- Reload VS Code if needed
- Open Chat
- Use MCP or chat customization commands to confirm the server is present
- Ask a simple prompt such as:
List my GitLab projects.
Troubleshooting
1. The server does not appear in chat
Check the MCP server list and output logs in VS Code.
2. The server exists but tools are missing
Make sure the server actually started and that trust was granted.
3. ${input:...} does not resolve
Add the matching inputs entry with the exact same id.
4. OAuth does not open correctly
Check:
- client ID
- redirect URI
- whether the app is confidential and needs a secret
- API URL format
5. PAT works in GitLab but not here
Verify the token scope and make sure you used the API URL with /api/v4.
Recommended first prompt
Show me my GitLab projects and recent merge requests.