Skip to content

gitlab-mcp docker

Manage the GitLab MCP Docker container and GitLab instances.

Usage

bash
gitlab-mcp docker <subcommand> [options]

Subcommands

CommandDescription
statusShow container and instance status
initInitialize Docker configuration (alias for setup --mode=server)
startStart the container
stopStop the container
restartRestart the container
upgradePull latest image and restart
logsShow container logs
add-instanceAdd a GitLab instance
remove-instanceRemove a GitLab instance

status

Display Docker environment, container state, and configured instances:

bash
gitlab-mcp docker status

Output includes:

  • Docker installation and daemon status
  • Container name, status, image, ports
  • Configured GitLab instances with OAuth and preset info
  • Config directory path

init

Interactive setup for Docker deployment. Equivalent to gitlab-mcp setup --mode=server:

bash
gitlab-mcp docker init

Walks through:

  1. Docker and Compose prerequisites check
  2. Port configuration
  3. OAuth enablement (optional)
  4. docker-compose.yml generation
  5. Optional container start

start

Start the gitlab-mcp container:

bash
gitlab-mcp docker start

stop

Stop the running container:

bash
gitlab-mcp docker stop

restart

Restart the container:

bash
gitlab-mcp docker restart

upgrade

Pull the latest image and restart:

bash
gitlab-mcp docker upgrade

logs

Show container logs:

bash
# Last 100 lines
gitlab-mcp docker logs

# Follow logs in real-time
gitlab-mcp docker logs -f

# Custom line count
gitlab-mcp docker logs --lines=500
FlagDescriptionDefault
-f, --followTail logs in real-timefalse
--lines=NNumber of lines to show100

add-instance

Add a GitLab instance to the Docker configuration:

bash
# Interactive
gitlab-mcp docker add-instance

# With host specified
gitlab-mcp docker add-instance gitlab.company.com

The wizard prompts for:

  • GitLab host (if not provided)
  • Display name
  • OAuth configuration (optional: Application ID, secret env var)
  • Default preset (developer, senior-dev, full-access, devops, code-reviewer, readonly)

remove-instance

Remove a configured GitLab instance:

bash
gitlab-mcp docker remove-instance gitlab.company.com

Restart the container after removing an instance for changes to take effect.

Configuration Directory

Docker configuration is stored in ~/.config/gitlab-mcp/:

~/.config/gitlab-mcp/
├── docker-compose.yml
├── .env
└── instances/
    └── <host>.json

Examples

bash
# Full Docker lifecycle
gitlab-mcp docker init          # Initial setup
gitlab-mcp docker start         # Start container
gitlab-mcp docker status        # Check status
gitlab-mcp docker logs -f       # Monitor logs
gitlab-mcp docker upgrade       # Update to latest
gitlab-mcp docker stop          # Stop container

# Multi-instance management
gitlab-mcp docker add-instance gitlab.com
gitlab-mcp docker add-instance gitlab.company.com
gitlab-mcp docker status
gitlab-mcp docker remove-instance gitlab.com

See Also

Released under the Apache 2.0 License.