GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者による説明(英語の原文)
Token-efficient GitLab MCP: 167 tools via 3 meta-tools, field projection, keyset pagination
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_URL「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"efficient-gitlab": {
"command": "npx",
"args": [
"-y",
"efficient-gitlab-mcp-server"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your-value",
"GITLAB_API_URL": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add efficient-gitlab --env GITLAB_PERSONAL_ACCESS_TOKEN=your-value --env GITLAB_API_URL=your-value -- npx -y efficient-gitlab-mcp-server動かす前に、空欄の値を入力してください。
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"efficient-gitlab": {
"command": "npx",
"args": [
"-y",
"efficient-gitlab-mcp-server"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your-value",
"GITLAB_API_URL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"efficient-gitlab": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"efficient-gitlab-mcp-server"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your-value",
"GITLAB_API_URL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
GITLAB_API_URL envこの設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント detailobsessed で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
入力が必要なもの:GITLAB_PERSONAL_ACCESS_TOKEN
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(2.33.0)がレジストリに届いたのは6 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
同じカテゴリには:GitHub, Desktop Commander, Cloudflare MCP
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
[!CAUTION]
This repository is archived (2026-05-22).
Upstream
zereight/gitlab-mcpv2.1+ has independently implemented progressive disclosure and schema slimming (commit44983ec). The differentiators that justified this fork no longer apply — please use upstream instead.
Token-efficient GitLab MCP server. A fork of zereight/gitlab-mcp re-architected for agent context budgets: 167 tools delivered through 3 meta-tools, with field projection on every list endpoint, server-side file trimming, and keyset pagination on large directories.
If your agent's first turn against an MCP server costs ~20K tokens of tool definitions before you've asked anything, this fork is for you.
api scope (or read_api for read-only). Create one →npx) or Bun 1.0+ (for bunx)Add this to your MCP client config — Claude Desktop, Cursor, Claude Code, IDE extensions, etc.:
{
"mcpServers": { "gitlab": { "command": "npx", "args": ["efficient-gitlab-mcp-server@latest"], "env": { "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx", "GITLAB_API_URL": "https://gitlab.com" } } } }
Restart your client. The server is live with 3 meta-tools (list_categories, activate_tools, deactivate_tools). Your agent discovers GitLab tools by activating categories on demand — see How It Works for a worked example.
Prefer
bun? Replace"command": "npx"with"command": "bunx".
Self-hosted GitLab — point at your instance's base URL (the server appends /api/v4 itself):
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx", "GITLAB_API_URL": "https://gitlab.your-company.com" }
Pinned to a single project — agents don't need to repeat project_id; it's used as a default:
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx", "GITLAB_API_URL": "https://gitlab.com", "GITLAB_PROJECT_ID": "12345" }
Restricted to multiple projects — every call must specify a project_id from the allow-list:
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx", "GITLAB_API_URL": "https://gitlab.com", "GITLAB_ALLOWED_PROJECT_IDS": "12345,67890,123" }
Read-only (auto-detected) — use a PAT with only read_api scope; the server detects the limited scope at startup and only exposes the 93 read tools. No extra config needed.
Read-only (forced) — keep your api-scope PAT but force read-only mode at the server level:
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx", "GITLAB_API_URL": "https://gitlab.com", "GITLAB_READ_ONLY_MODE": "true" }
Claude Code CLI (one-liner add):
claude mcp add -s user gitlab \
-e GITLAB_PERSONAL_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx \ -e GITLAB_API_URL=https://gitlab.com \ -- npx efficient-gitlab-mcp-server@latest
GitLab CI runner — CI_JOB_TOKEN is auto-detected if no PAT is set. Use GITLAB_PROJECT_ID: $CI_PROJECT_ID to scope to the running project. No extra setup.
From source (development):
git clone https://github.com/detailobsessed/efficient-gitlab-mcp.git
cd efficient-gitlab-mcp bun install bun run build bun start
Hit a snag? See Troubleshooting. Need to tune more env vars? See full Configuration reference.
GitLab's API surface is huge, and the upstream MCP server reflects that — every tool is exposed at startup, all the time. For an agent on a context budget, that's wasteful in three places:
This fork addresses all three: progressive disclosure for tool definitions, field projection for list responses, and trimming + keyset pagination for content.
Instead of exposing 167 individual tools, the server exposes 3 meta-tools:
| Meta-Tool | Purpose |
|---|---|
list_categories | Discover available tool categories and their activation status |
activate_tools | Enable all tools in one or more categories |
deactivate_tools | Disable a category once you're done — frees the tokens back |
| Approach | Tools Exposed | Approximate Token Cost |
|---|---|---|
| Traditional | 167 tools | ~20,000+ tokens |
| Progressive Disclosure | 3 meta-tools | ~1,500 tokens |
~90% reduction in tool-definition tokens at startup. Tools are registered with the MCP SDK but kept disabled (tool.disable()) until the LLM activates a category — activation triggers a tools/list_changed notification so the client picks them up live.
List endpoints — and a growing set of singular get_* endpoints — return a curated, allow-listed default set of fields per resource. Callers can opt into the full payload with fields: "all" or pick their own list with fields: ["id", "name"].
Currently applied to:
list_projects, list_group_projects, get_projectlist_issues, my_issues, get_issuelist_merge_requests, get_merge_requestlist_pipelines, get_pipelinelist_releaseslist_commits, get_commitget_current_user, get_user, get_users, search_usersA spike measurement against list_projects with 5 owned projects went from ~32 KB → ~3 KB by switching to the compact default. Because it's allow-list based, the compact output stays compact when GitLab adds new fields upstream.
Example — fetch a merge request with the compact default vs. the full GitLab payload:
// Default: ~17 fields (iid, title, state, draft, labels, branches, author, …)
{ "name": "get_merge_request", "arguments": { "merge_request_iid": 42 } }
// Opt out: the raw GitLab response { "name": "get_merge_request", "arguments": { "merge_request_iid": 42, "fields": "all" } }
// Custom pick { "name": "get_merge_request", "arguments": { "merge_request_iid": 42, "fields": ["iid", "title", "state"] } }
The slim defaults are derived from the same Zod response schemas that validate GitLab API responses (see src/schemas/), so they stay in sync with the type-level shape and there's a single source of truth per resource.
get_file_contents accepts trim parameters so agents don't have to pull whole files into context just to read a function:
| Parameter | Purpose |
|---|---|
head: N | Return only the first N lines |
tail: N | Return only the last N lines |
range: "start-end" | Return a specific line range |
max_bytes: N | Hard byte cap (composes with line-based trims) |
Truncated responses include a note like Showing lines 100-200 of 5234, so a follow-up call can target a different range without re-fetching to count lines first.
get_repository_tree supports keyset pagination (pagination=keyset) and returns an envelope:
{
"items": [...], "pagination_note": "Next page available — call again with pagination=keyset&page_token=..." }
Large monorepos no longer dump 10K entries into a single response. The server reads the cursor from X-Next-Page-Token (or falls back to X-Next-Page on older GitLab instances) and surfaces it inline.
This fork builds on zereight/gitlab-mcp with a redesigned architecture focused on token efficiency and maintainability. We regularly review upstream commits and selectively port new features and bugfixes — we don't blindly rebase, since the codebases have structurally diverged.
| Area | Upstream | This Fork |
|---|---|---|
| Architecture | Single index.ts (~10K lines) | Modular src/ with 16 tool modules |
| Tool Discovery | All 140+ tools exposed at once | SDK-native progressive disclosure (3 meta-tools) |
| List Responses | Full GitLab payload (100+ fields/row) | Field projection: compact default + opt-in fields |
| File Contents | Whole-file fetch | Server-side head / tail / range / max_bytes trimming |
| Tree Listing | Offset pagination only | Offset + keyset (pagination=keyset) with cursor envelope |
| Tool Annotations | Partial | Complete: readOnlyHint / destructiveHint / idempotentHint / openWorldHint on every tool |
| Configuration | Flat individual exports | Typed ServerConfig interface with loadConfig() |
| Logging | console.log | Structu
冒頭だけを表示しています。続きはリポジトリで読めます