This guide explains how to use @zereight/mcp-gitlab with Cursor.
Note: this guide is based on common community MCP configuration patterns for Cursor. The exact Cursor MCP wrapper schema and settings surface can vary by version or distribution, so treat the examples below as best-effort patterns rather than repository-verified official Cursor documentation.
Use a common Cursor MCP config file pattern such as:
.cursor/mcp.json
If your team shares the setup, keep the config in version control when appropriate.
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@zereight/mcp-gitlab"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-your-token",
"GITLAB_API_URL": "https://gitlab.com/api/v4",
"GITLAB_READ_ONLY_MODE": "false"
}
}
}
}{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@zereight/mcp-gitlab"],
"env": {
"GITLAB_USE_OAUTH": "true",
"GITLAB_OAUTH_CLIENT_ID": "your-client-id",
"GITLAB_OAUTH_REDIRECT_URI": "http://127.0.0.1:8888/callback",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}If your GitLab OAuth app is confidential, add GITLAB_OAUTH_CLIENT_SECRET.
List my GitLab projects.
Always use the API URL, not the web root.
The redirect URI in GitLab must exactly match your config.
Read-only flows usually need read_api. Write flows need api.
If Cursor cannot spawn the process, verify Node.js and npx are available to the environment Cursor uses.
Cursor MCP config commonly uses an mcpServers map for local stdio servers. If your Cursor version or plugin presents a settings UI instead of a raw file, use the same inner server fields:
commandargsenv