This guide explains how to use @zereight/mcp-gitlab with GitHub Copilot in VS Code.
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
Recommended secure example:
{
"inputs": [
{
"type": "promptString",
"id": "gitlab-token",
"description": "GitLab Personal Access Token",
"password": true
}
],
"servers": {
"gitlab": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@zereight/mcp-gitlab"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab-token}",
"GITLAB_API_URL": "https://gitlab.com/api/v4",
"GITLAB_READ_ONLY_MODE": "false"
}
}
}
}{
"inputs": [
{
"type": "promptString",
"id": "gitlab-oauth-client-id",
"description": "GitLab OAuth Client ID"
}
],
"servers": {
"gitlab": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@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"
}
}
}
}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.
Check the MCP server list and output logs in VS Code.
Make sure the server actually started and that trust was granted.
Add the matching inputs entry with the exact same id.
Check:
- client ID
- redirect URI
- whether the app is confidential and needs a secret
- API URL format
Verify the token scope and make sure you used the API URL with /api/v4.
Show me my GitLab projects and recent merge requests.