Local stdio Deployment
Run GitLab MCP locally via standard I/O. The MCP client spawns the server process directly — no network, no ports, no containers.
When to Use
- Personal use with a single AI IDE client
- Simplest possible setup
- No Docker required
- No network exposure
Setup
Via Setup Wizard
bash
npx @structured-world/gitlab-mcp initManual Configuration
Add to your MCP client config:
json
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@structured-world/gitlab-mcp"],
"env": {
"GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
"GITLAB_API_URL": "https://gitlab.com"
}
}
}
}How It Works
┌─────────────────┐ stdio ┌─────────────────┐
│ MCP Client │ ◄────────────► │ gitlab-mcp │
│ (Claude, etc.) │ stdin/stdout │ (child process) │
└─────────────────┘ └─────────────────┘
│
│ HTTPS
▼
┌─────────────────┐
│ GitLab API │
└─────────────────┘- MCP client starts
gitlab-mcpas a child process - Communication happens via stdin/stdout (JSON-RPC)
- The server connects to the GitLab API using the configured token
Configuration Options
All configuration is via environment variables in the env object:
| Variable | Required | Description |
|---|---|---|
GITLAB_TOKEN | Yes | Personal Access Token |
GITLAB_API_URL | No | GitLab instance URL (default: https://gitlab.com) |
GITLAB_PROJECT_ID | No | Default project context |
GITLAB_READ_ONLY_MODE | No | Restrict to read-only tools |
See Configuration reference for all options.
Limitations
- One instance per MCP client
- No shared access between users
- No OAuth support (token-based only)
- Process lifecycle tied to the MCP client
Alternatives
If you need multi-user access or OAuth, consider:
- Docker standalone — HTTP access without persistence
- Docker Compose — Full production setup
