CLI Reference
GitLab MCP provides several CLI commands for setup, installation, and management.
Commands
| Command | Description | Guide |
|---|---|---|
gitlab-mcp setup | Interactive setup wizard | Full environment detection and configuration |
gitlab-mcp init | Quick local setup | Alias for setup --mode=local |
gitlab-mcp install | Install to MCP clients | Detect and configure AI coding assistants |
gitlab-mcp docker | Docker management | Container lifecycle and instance management |
gitlab-mcp list-tools | Tool documentation | Browse and export available tools |
Usage
All commands can be run via npx:
bash
npx @structured-world/gitlab-mcp <command> [options]Or if installed globally:
bash
gitlab-mcp <command> [options]Server Mode
Without any command argument, gitlab-mcp starts the MCP server:
bash
# stdio mode (default)
npx @structured-world/gitlab-mcp
# Force stdio mode
npx @structured-world/gitlab-mcp stdio
# HTTP mode (when PORT is set)
PORT=3333 npx @structured-world/gitlab-mcpGlobal Flags
| Flag | Description |
|---|---|
--show-project-config | Display project configuration and exit |
--auto | Auto-discover profile from git remote |
--profile <name> | Select a specific authentication profile |
