Skip to content

CLI Reference

GitLab MCP provides several CLI commands for setup, installation, and management.

Commands

CommandDescriptionGuide
gitlab-mcp setupInteractive setup wizardFull environment detection and configuration
gitlab-mcp initQuick local setupAlias for setup --mode=local
gitlab-mcp installInstall to MCP clientsDetect and configure AI coding assistants
gitlab-mcp dockerDocker managementContainer lifecycle and instance management
gitlab-mcp list-toolsTool documentationBrowse 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-mcp

Global Flags

FlagDescription
--show-project-configDisplay project configuration and exit
--autoAuto-discover profile from git remote
--profile <name>Select a specific authentication profile

Next Steps

Released under the Apache 2.0 License.