Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดA lightweight MCP (Model Context Protocol) server that lets AI assistants read and explore GitLab repository code. Inspired by how Claude Code reads local codebases with its Read/Grep/Glob/LSP tools — but for remote GitLab repos.
9 focused tools. Single Go binary. Zero bloat.
Existing GitLab MCP servers expose 100+ tools covering every GitLab API. That's great for full GitLab automation, but it floods the AI's context with tool descriptions and makes code reading inefficient.
This project takes a different approach: do one thing well. Just code reading. The tool descriptions fit in ~500 tokens instead of thousands, and every tool is optimized for how AI assistants actually explore code.
Borrowed from Claude Code's architecture:
gl_read_symbols returns function/class signatures instead of dumping the whole file.start_line/end_line to zoom in.instructions field teaches the AI when to use which tool.Option 1: Go install (recommended)
go install github.com/nanami7777777/gitlab-code-reader-mcp/cmd/server@latest
GITLAB_TOKEN=glpat-xxx gitlab-code-reader-mcp
Option 2: Build from source
git clone https://github.com/nanami7777777/gitlab-code-reader-mcp.git
cd gitlab-code-reader-mcp
go build -o server ./cmd/server/
GITLAB_TOKEN=glpat-xxx ./server
Option 3: Docker
docker run --rm -e GITLAB_TOKEN=glpat-xxx -e GITLAB_URL=https://gitlab.example.com \
ghcr.io/nanami7777777/gitlab-code-reader-mcp
Option 4: Download binary
Grab a pre-built binary from Releases.
Add to your MCP config (Kiro: .kiro/settings/mcp.json, Claude Code: .claude/settings.json, Cursor: .cursor/mcp.json):
{
"mcpServers": {
"gitlab-code-reader": {
"command": "/path/to/gitlab-code-reader-mcp/server",
"args": [],
"env": {
"GITLAB_TOKEN": "glpat-xxx",
"GITLAB_URL": "https://gitlab.example.com"
}
}
}
}
"Show me the directory structure of project mygroup/myproject" → gl_list_directory
"Find all Go files in the src directory" → gl_find_files
"Read the main entry point" → gl_read_file
"Search for where authentication is handled" → gl_search_code
"Show me what changed in MR !42" → gl_diff
"Who last modified the config file?" → gl_blame
gl_read_symbols uses regex-based extraction. Supported: TypeScript/JavaScript, Python, Go, Java/Kotlin, Rust. Files under 300 lines return full content instead.
40% less data transferred. 25% fewer tool calls. Measured, not estimated.
We benchmarked both MCP servers on the same task: "Understand how the Worker consumes MQ messages" in a real Go project (7 source files, ~1,500 lines total). The benchmark script calls the same GitLab API endpoints and measures the actual response sizes each MCP would return.
Task: Read 7 source files to understand MQ consumption architecture
────────────────────────────────────────────────────────────────────
New MCP Old MCP (@zereight)
Tool calls 6 8
Total response size 31.5 KB 52.3 KB
Response format plain text raw JSON + base64
Batch read support ✓ ✗
────────────────────────────────────────────────────────────────────
Savings 40% smaller baseline
2 fewer calls
Where the savings come from:
Run the benchmark yourself:
cd benchmark
GITLAB_TOKEN=glpat-xxx GITLAB_URL=https://gitlab.example.com go run main.go
Equivalent Tools
When to use which?
cmd/server/main.go # Entry point
internal/gitlab/ # API client + cache
internal/tools/ # 9 tool implementations
internal/symbols/ # Regex-based symbol extraction
See CONTRIBUTING.md. PRs welcome!
一个轻量级 MCP(Model Context Protocol)服务器,让 AI 助手能够读取和探索 GitLab 仓库代码。灵感来自 Claude Code 读取本地代码的方式(Read/Grep/Glob/LSP 工具)——但面向远程 GitLab 仓库。
9 个专注工具。单个 Go 二进制。零冗余。
现有的 GitLab MCP 服务器暴露了 100+ 个工具,覆盖所有 GitLab API。这对全功能自动化很好,但会用工具描述淹没 AI 的上下文窗口,让代码读取变得低效。
本项目只做一件事:代码读取。工具描述只占 ~1,000 tokens,每个工具都针对 AI 探索代码的方式优化。
方式一:Go install(推荐)
go install github.com/nanami7777777/gitlab-code-reader-mcp/cmd/server@latest
GITLAB_TOKEN=glpat-xxx gitlab-code-reader-mcp
方式二:从源码构建
git clone https://github.com/nanami7777777/gitlab-code-reader-mcp.git
cd gitlab-code-reader-mcp
go build -o server ./cmd/server/
GITLAB_TOKEN=glpat-xxx ./server
方式三:Docker
docker run --rm -e GITLAB_TOKEN=glpat-xxx -e GITLAB_URL=https://gitlab.example.com \
ghcr.io/nanami7777777/gitlab-code-reader-mcp
方式四:下载二进制
从 Releases 下载预编译二进制。
添加到 MCP 配置文件(Kiro: .kiro/settings/mcp.json,Claude Code: .claude/settings.json,Cursor: .cursor/mcp.json):
{
"mcpServers": {
"gitlab-code-reader": {
"command": "/path/to/gitlab-code-reader-mcp/server",
"args": [],
"env": {
"GITLAB_TOKEN": "glpat-xxx",
"GITLAB_URL": "https://gitlab.example.com"
}
}
}
}
"看一下 mygroup/myproject 的目录结构" → gl_list_directory
"找一下 src 下所有 Go 文件" → gl_find_files
"读一下主入口文件" → gl_read_file
"搜一下哪里处理了认证" → gl_search_code
"看看 MR !42 改了什么" → gl_diff
"这个文件最后谁改的?" → gl_blame
数据传输量减少 40%。工具调用减少 25%。实测数据,非估算。
我们用同一个任务对两个 MCP 做了基准测试:"理解 Worker 如何消费 MQ 消息",真实 Go 项目(7 个源文件,约 1,500 行)。Benchmark 脚本调用相同的 GitLab API,测量每个 MCP 实际返回的数据量。
任务:读取 7 个源文件,理解 MQ 消费架构
────────────────────────────────────────────────────────────────────
新 MCP 旧 MCP (@zereight)
工具调用次数 6 8
总响应大小 31.5 KB 52.3 KB
响应格式 纯文本 原始 JSON + base64
批量读取 ✓ ✗
────────────────────────────────────────────────────────────────────
节省 40% 更小 基准线
少 2 次调用
节省来自哪里:
自己运行 benchmark:
cd benchmark
GITLAB_TOKEN=glpat-xxx GITLAB_URL=https://gitlab.example.com go run main.go
等价工具
什么时候用哪个?
参见 CONTRIBUTING.md。欢迎 PR!
MCP server for reading GitLab repository code, inspired by Claude Code's Read/Grep/Glob/LSP tools. 9 focused tools for AI-powered code exploration.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Gitlab Code Reader ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 MCP server for reading GitLab repository code, inspired by Claude Code's Read/Grep/Glob/LSP tools. 9 focused tools for AI-powered code exploration.