Cursor
Configure GitLab MCP for Cursor.
Auto-Setup
bash
npx @structured-world/gitlab-mcp install --cursorDetection
| Method | Details |
|---|---|
| Type | Config directory |
| Path | ~/.cursor/ |
| Auto-detected | Yes (when config directory exists) |
Config File Location
| OS | Path |
|---|---|
| macOS | ~/.cursor/mcp.json |
| Windows | %USERPROFILE%\.cursor\mcp.json |
| Linux | ~/.cursor/mcp.json |
Configuration
Add to your ~/.cursor/mcp.json:
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
- Open Cursor
- Go to Settings > MCP
- Verify "gitlab" appears in the server list
- Check that tools are available in the AI chat
Troubleshooting
- Server not appearing: Restart Cursor after editing
mcp.json - Config not recognized: Ensure the file is valid JSON (no trailing commas)
- "npx not found": Set the full path to npx in the
commandfield
