gitlab-mcp setup
Interactive setup wizard that guides you through configuring GitLab MCP. Detects your environment, walks through GitLab authentication, and installs configuration to your MCP clients or Docker.
Usage
bash
gitlab-mcp setup [--mode=<mode>]Options
| Flag | Description | Values |
|---|---|---|
--mode | Skip mode selection | local, server, configure-existing |
Modes
Local (stdio)
Configures GitLab MCP for local AI IDE clients. The wizard:
- Prompts for GitLab instance URL
- Guides through token creation/entry
- Tests the connection
- Configures tool selection (preset/manual/advanced)
- Advanced mode includes: feature flags, read-only mode, cross-reference hints (
GITLAB_CROSS_REFS), scope restrictions, and log level
- Advanced mode includes: feature flags, read-only mode, cross-reference hints (
- Detects and installs to selected MCP clients
bash
gitlab-mcp setup --mode=local
# or use the alias:
gitlab-mcp initServer (HTTP/SSE)
Sets up GitLab MCP as a Docker-based HTTP server. The wizard:
- Verifies Docker and Docker Compose
- Selects deployment type (standalone, external-db, compose-bundle)
- Configures port and optional OAuth
- Generates docker-compose.yml and .env
- Optionally starts the container
bash
gitlab-mcp setup --mode=server
# or use the alias:
gitlab-mcp docker initConfigure Existing
Modifies an existing GitLab MCP installation:
- Detects configured clients and running containers
- Lets you choose what to modify
- Updates token, URL, tool groups, or preset
bash
gitlab-mcp setup --mode=configure-existingDiscovery Phase
Before mode selection, the wizard runs automatic discovery:
| Detection | Method |
|---|---|
| Claude Desktop | macOS app bundle (com.anthropic.claudefordesktop) |
| Claude Code | CLI command (claude) |
| Cursor | Config directory (~/.cursor/) |
| VS Code | Config directory (.vscode/) |
| Windsurf | Config directory (~/.codeium/windsurf/) |
| Cline | VS Code extension storage |
| Roo Code | Config directory (~/.roo/) |
| Docker | docker and docker compose commands |
Examples
bash
# Full interactive wizard
npx @structured-world/gitlab-mcp setup
# Direct to local setup
npx @structured-world/gitlab-mcp setup --mode=local
# Direct to server setup
npx @structured-world/gitlab-mcp setup --mode=server
# Modify existing configuration
npx @structured-world/gitlab-mcp setup --mode=configure-existingExit Codes
| Code | Meaning |
|---|---|
0 | Setup completed successfully |
1 | Setup failed or was cancelled |
See Also
- Setup Wizard walkthrough
gitlab-mcp init— alias for local setupgitlab-mcp install— client installation onlygitlab-mcp docker— Docker management
