Skip to content

gitlab-mcp install

Detect and install GitLab MCP configuration to MCP clients. Can run interactively (wizard) or non-interactively with flags.

Usage

bash
gitlab-mcp install [options]

Options

FlagDescription
--claude-desktopInstall to Claude Desktop
--claude-codeInstall to Claude Code
--cursorInstall to Cursor
--vscodeInstall to VS Code (GitHub Copilot)
--clineInstall to Cline
--roo-codeInstall to Roo Code
--windsurfInstall to Windsurf
--allInstall to all detected clients
--showPreview configuration without writing
--forceOverwrite existing configurations

Interactive Mode

Without any client flags, the command runs an interactive wizard:

  1. Detects all installed MCP clients
  2. Shows detection results (installed, configured, etc.)
  3. Presents multi-select for target clients
  4. Confirms overwrite if already configured
  5. Installs and shows results
bash
npx @structured-world/gitlab-mcp install

Non-Interactive Mode

Specify clients directly with flags:

bash
# Install to specific clients
npx @structured-world/gitlab-mcp install --claude-desktop --cursor

# Install to all detected clients
npx @structured-world/gitlab-mcp install --all

# Force overwrite existing config
npx @structured-world/gitlab-mcp install --claude-desktop --force

Preview Configuration

View the generated configuration without writing any files:

bash
# Preview Claude Desktop config
npx @structured-world/gitlab-mcp install --show --claude-desktop

# Preview Cursor config
npx @structured-world/gitlab-mcp install --show --cursor

Environment Variables

The install command reads from the current environment to build the server configuration:

VariablePurposeDefault
GITLAB_TOKENToken to embed in config
GITLAB_URLGitLab instance URLhttps://gitlab.com
GITLAB_MCP_PRESETPreset to apply

Backup Behavior

When overwriting an existing configuration, the installer creates a backup:

~/.cursor/mcp.json → ~/.cursor/mcp.json.backup-2025-01-24T12-00-00

Supported Clients

ClientDetectionConfig Location (macOS)
Claude DesktopApp bundle~/Library/Application Support/Claude/claude_desktop_config.json
Claude CodeCLI command~/.claude.json
CursorConfig dir~/.cursor/mcp.json
VS CodeConfig dir.vscode/mcp.json
WindsurfConfig dir~/.codeium/windsurf/mcp_config.json
ClineExtension storage~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Roo CodeConfig dir~/.roo/mcp.json

See Clients for paths on all platforms.

See Also

Released under the Apache 2.0 License.