Research Roadmap: GitLab MCP Support & Agent Skills
Project: Investigate GitLab integration possibilities with MCP (Model Context Protocol) and design a set of agent skills for AI‑driven GitLab automation.
Goal: Enable AI agents to manage repositories, issues, merge requests, CI/CD pipelines, and more via MCP tools, either by wrapping GitLab’s REST/GraphQL APIs or leveraging existing integrations.
---
Phase 1: GitLab API Landscape
- [ ] Survey GitLab’s official APIs:
- REST API (v4) – comprehensive, covers all resources.
- GraphQL API – flexible, reduces over‑fetching.
- Webhooks – for event‑driven automation (push, MR, pipeline).
- [ ] Identify authentication methods:
- Personal Access Token (PAT)
- OAuth 2.0 (for user‑level consent)
- CI_JOB_TOKEN (for CI jobs)
- Deploy keys (read‑only repo access)
- [ ] Evaluate capabilities: repo CRUD, issue boards, merge requests, CI/CD, snippets, users, groups.
Phase 2: Existing MCP Servers & Skills
- [ ] Search for open‑source MCP servers that integrate with GitLab (e.g., GitHub MCP servers exist; see if any support GitLab).
- [ ] Check the MCP registry (if any) for GitLab‑related servers.
- [ ] Look for community projects: `gitlab-mcp`, `mcp-gitlab`, etc.
- [ ] If no ready‑made server exists, consider building one.
Phase 3: Design Agent Skills
- [ ] Define a comprehensive tool set:
- Repository: list, create, delete, protect branches, set variables.
- Issues: list, create, update, close, assign, label.
- Merge Requests: list, create, approve, merge, rebase, cherry‑pick.
- CI/CD: list pipelines, trigger pipeline, cancel, view jobs, artifacts.
- Files: read, write, commit (like GitHub's `create_or_update_file`).
- Users/Groups: search, add to group.
- [ ] Prioritize MVP set: repos, issues, MRs, pipelines, file ops.
- [ ] Consider idempotency and safety (e.g., destructive operations should require confirmation or dry‑run flag).
Phase 4: Architecture & Transport
- [ ] Decide implementation language: Go (consistent) or TypeScript (many MCP servers in TS).
- [ ] Transport: stdio (primary) and optional web/HTTP.
- [ ] Configuration: env vars for GitLab URL and token.
- [ ] caching: optional in‑memory cache for project lookups.
Phase 5: Implementation Plan
- [ ] If building: outline tasks for client wrapper, MCP server, tool registration, error handling, tests.
- [ ] If existing: document installation, configuration, tool list, gaps.
Phase 6: Reporting
- Write Report 1: GitLab API & MCP Landscape
- Write Report 2: Agent Skill Specification
- Write Report 3: Implementation Plan (build or adopt)
---
This roadmap will evolve as we discover existing solutions.