Skip to content

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 init

Manual 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     │
                                   └─────────────────┘
  1. MCP client starts gitlab-mcp as a child process
  2. Communication happens via stdin/stdout (JSON-RPC)
  3. The server connects to the GitLab API using the configured token

Configuration Options

All configuration is via environment variables in the env object:

VariableRequiredDescription
GITLAB_TOKENYesPersonal Access Token
GITLAB_API_URLNoGitLab instance URL (default: https://gitlab.com)
GITLAB_PROJECT_IDNoDefault project context
GITLAB_READ_ONLY_MODENoRestrict 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:

See Also

Released under the Apache 2.0 License.