How zereight/gitlab-mcp works
This repository provides a GitLab Model Context Protocol server: an MCP client invokes a selected tool, the server applies authentication and policy, performs GitLab API work, and returns a structured result. Its documented product surface includes project and collaboration management, CI/CD, wiki and release features, filtering/masking, multiple transports, and local or remote OAuth. The tree and sampled excerpts support the main entry, tool registry, OAuth proxy, masking and download subsystems; detailed links among unsampled feature handlers are intentionally omitted.
Main entry points: registry.ts Tool Registry · index.ts MCP Server · gitlab-client-pool.ts HTTP Client Pool · oauth-proxy.ts OAuth Proxy
Components 19
MCP Runtime
- MCP Server
index.ts - Tool Registry
tools/registry.ts - Runtime Config
config.ts - HTTP Transports
server/transport-mode.ts
Auth And Policy
- Auth Flows
oauth.ts - OAuth Proxy
oauth-proxy.ts - Stateless OAuth
stateless/index.ts - Response Masking
masking/engine.ts
GitLab Operations
- GitLab API
- HTTP Client Pool
gitlab-client-pool.ts
Product Capabilities
- Project And Issues
tools/registry.ts - Merge Requests
tools/registry.ts - CI/CD
tools/registry.ts - Wiki And Releases
tools/registry.ts - GraphQL Tools
tools/registry.ts - Download Proxy
downloads/proxy.ts
Runtime Services
- Metrics
server/metrics.ts
Other components
- MCP Client
- GitLab Instance
Connections 21
- MCP Client → MCP Server: invokes tools
- MCP Server → Tool Registry: registers tools
- MCP Server → Runtime Config: loads settings
- MCP Server → HTTP Transports: selects transport
- Tool Registry → Project And Issues: exposes tools
- Tool Registry → Merge Requests: exposes tools
- Tool Registry → CI/CD: exposes tools
- Tool Registry → Wiki And Releases: exposes tools
- Tool Registry → GraphQL Tools: exposes tools
- Tool Registry → Auth Flows: uses credentials
- Tool Registry → Response Masking: masks responses
- Tool Registry → HTTP Client Pool: uses clients
- HTTP Client Pool → GitLab Instance: dispatches requests
- GitLab Instance → HTTP Client Pool: returns responses
- Auth Flows → OAuth Proxy: enables proxy flow
- OAuth Proxy → Stateless OAuth: encodes tokens
- OAuth Proxy → GitLab Instance: exchanges tokens
- MCP Server → Download Proxy: registers endpoint
- Download Proxy → HTTP Client Pool: gets dispatcher
- Download Proxy → GitLab Instance: streams downloads
- MCP Server → Metrics: reports metrics