GitLab MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GITLAB_URL | Yes | GitLab 位址 | |
| GITLAB_TOKEN | Yes | Personal Access Token | |
| GITLAB_TIMEOUT | No | API 請求逾時(秒) | 30 |
| GITLAB_MCP_HOST | No | SSE 監聽位址 | 0.0.0.0 |
| GITLAB_MCP_PORT | No | SSE 監聽端口 | 8000 |
| GITLAB_MCP_LOG_LEVEL | No | 日誌等級 | INFO |
| GITLAB_MCP_TRANSPORT | No | 傳輸模式(stdio / sse) | stdio |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| server_infoB | 取得 GitLab MCP 服務器資訊和連線狀態 |
| health_checkB | 健康檢查,確認與 GitLab 伺服器的連線狀態 |
| list_projectsB | 列出可存取的 GitLab 專案 Args: search: 搜尋關鍵字(專案名稱) membership: 僅列出已加入的專案(預設 True) page: 頁碼(預設 1) per_page: 每頁筆數(預設 20,最大 100) |
| get_projectB | 取得 GitLab 專案詳細資訊 Args: project_id: 專案 ID(數字)或路徑(如 group/project) |
| list_project_membersC | 列出專案成員 Args: project_id: 專案 ID 或路徑 page: 頁碼 per_page: 每頁筆數 |
| list_merge_requestsB | 列出專案的 Merge Requests Args: project_id: 專案 ID 或路徑 state: 狀態篩選(opened, closed, merged, all) page: 頁碼 per_page: 每頁筆數 |
| get_merge_requestC | 取得 Merge Request 詳細資訊 Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID(專案內編號) |
| create_merge_requestB | 建立新的 Merge Request Args: project_id: 專案 ID 或路徑 source_branch: 來源分支 target_branch: 目標分支 title: MR 標題 description: MR 描述 assignee_id: 指派人 ID reviewer_ids: 審核者 ID 列表(逗號分隔,如 "1,2,3") |
| update_merge_requestB | 更新 Merge Request Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID title: 新標題 description: 新描述 state_event: 狀態變更(close 或 reopen) assignee_id: 新指派人 ID reviewer_ids: 審核者 ID 列表(逗號分隔) target_branch: 新目標分支 |
| merge_merge_requestC | 合併 Merge Request Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID merge_commit_message: 自訂合併 commit 訊息 should_remove_source_branch: 合併後是否刪除來源分支 |
| approve_merge_requestC | 核准 Merge Request Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID |
| get_merge_request_changesC | 取得 Merge Request 的檔案變更(diff) Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID |
| get_merge_request_commitsC | 取得 Merge Request 包含的 commits Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID |
| list_merge_request_notesC | 列出 Merge Request 的留言 Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID page: 頁碼 per_page: 每頁筆數 |
| create_merge_request_noteC | 新增 Merge Request 留言 Args: project_id: 專案 ID 或路徑 mr_iid: MR 的 IID body: 留言內容(支援 Markdown) |
| list_pipelinesB | 列出專案的 CI/CD Pipelines Args: project_id: 專案 ID 或路徑 status: 狀態篩選(running, pending, success, failed, canceled, skipped) ref: 分支或標籤名稱篩選 page: 頁碼 per_page: 每頁筆數 |
| get_pipelineC | 取得 Pipeline 詳細資訊 Args: project_id: 專案 ID 或路徑 pipeline_id: Pipeline ID |
| create_pipelineC | 觸發新的 CI/CD Pipeline Args: project_id: 專案 ID 或路徑 ref: 分支名稱或標籤 variables: Pipeline 變數(JSON 格式,如 '[{"key":"VAR1","value":"val1"}]') |
| retry_pipelineC | 重試 Pipeline Args: project_id: 專案 ID 或路徑 pipeline_id: Pipeline ID |
| cancel_pipelineD | 取消 Pipeline Args: project_id: 專案 ID 或路徑 pipeline_id: Pipeline ID |
| list_pipeline_jobsC | 列出 Pipeline 的所有 Jobs Args: project_id: 專案 ID 或路徑 pipeline_id: Pipeline ID page: 頁碼 per_page: 每頁筆數 |
| get_jobC | 取得 Job 詳細資訊 Args: project_id: 專案 ID 或路徑 job_id: Job ID |
| get_job_logB | 取得 Job 的執行日誌 Args: project_id: 專案 ID 或路徑 job_id: Job ID last_lines: 只顯示最後 N 行(0 表示全部,預設 0) |
| retry_jobC | 重試單一 Job Args: project_id: 專案 ID 或路徑 job_id: Job ID |
| list_branchesC | 列出專案的分支 Args: project_id: 專案 ID 或路徑 search: 搜尋關鍵字 page: 頁碼 per_page: 每頁筆數 |
| get_branchC | 取得分支詳細資訊 Args: project_id: 專案 ID 或路徑 branch_name: 分支名稱 |
| list_commitsC | 列出 Commits Args: project_id: 專案 ID 或路徑 ref_name: 分支或標籤名稱(預設為預設分支) path: 檔案路徑篩選 page: 頁碼 per_page: 每頁筆數 |
| get_commitC | 取得 Commit 詳細資訊 Args: project_id: 專案 ID 或路徑 sha: Commit SHA(完整或縮短) |
| compare_branchesC | 比較兩個分支或 commit 的差異 Args: project_id: 專案 ID 或路徑 from_ref: 起始分支/commit to_ref: 目標分支/commit |
| list_repository_treeC | 瀏覽 Repository 檔案結構 Args: project_id: 專案 ID 或路徑 path: 目錄路徑(預設為根目錄) ref: 分支或標籤(預設為預設分支) recursive: 是否遞迴列出子目錄 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 30 tools
Each tool has a clearly distinct purpose targeting specific GitLab resources and actions. For example, merge request operations (approve, create, get, update, merge), pipeline operations (create, cancel, retry), and branch/commit operations are all well-separated with no overlapping functionality.
All tools follow a consistent verb_noun pattern with snake_case throughout (e.g., create_merge_request, list_pipelines, get_branch). The naming convention is perfectly uniform across all 30 tools, making them easily predictable and readable.
With 30 tools, this is borderline heavy for an MCP server. While GitLab has extensive functionality, the tool count approaches the upper limit of what's typically manageable, potentially overwhelming agents despite good organization.
The tool surface provides comprehensive coverage of GitLab's core functionality including projects, branches, commits, merge requests, pipelines, and jobs. It offers complete CRUD/lifecycle operations for all major resources with no obvious gaps for agent workflows.