Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/vish288/mcp-gitlab/agents-mdgit clone --depth 1 https://github.com/vish288/mcp-gitlabWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01637 | $0.01637 |
| Opus 5 | $0.00818 | $0.00818 |
| Sonnet 5 | $0.00327 | $0.00327 |
| Haiku 4.5 | $0.00164 | $0.00164 |
Grade A, and why
mcp-gitlab AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mcp-gitlab — Agent Context
MCP server providing 83 tools for the GitLab REST API v4.
Architecture
- Entry point:
src/mcp_gitlab/__init__.py— click CLI, loads env, runs FastMCP server - Client:
src/mcp_gitlab/client.py— async httpx client with all GitLab API methods - Tools:
src/mcp_gitlab/servers/gitlab.py— all FastMCP tool registrations - Resources:
src/mcp_gitlab/servers/resources.py— 6 MCP resources (workflow guides) - Prompts:
src/mcp_gitlab/servers/prompts.py— 5 MCP prompts (multi-tool workflows) - Config:
src/mcp_gitlab/config.py—GitLabConfigdataclass from env vars - Exceptions:
src/mcp_gitlab/exceptions.py—GitLabApiError,GitLabAuthError, etc. - Tests:
tests/unit/test_tools.py— 120+ tool-level tests via FastMCP test client
Patterns
- All tools are
async defreturning JSON strings - Error handling: try/except wrapping every tool, returning
{"error": ...}JSON - Write access control:
_check_write(ctx)raisesGitLabWriteDisabledErrorwhenGITLAB_READ_ONLY=true - Tags: every tool tagged with
{"gitlab", "<category>", "read"|"write"} - Parameters use
Annotated[type, Field(description=...)] - Client uses httpx with
PRIVATE-TOKENheader auth - Project/group IDs can be numeric or URL-encoded paths
MCP Compliance Rules
Tool Annotations (MANDATORY)
Every tool MUST have annotations={} with at minimum readOnlyHint.
- Read tools:
annotations={"readOnlyHint": True, "idempotentHint": True} - Non-destructive write tools:
annotations={"readOnlyHint": False} - Destructive write tools:
annotations={"destructiveHint": True, "readOnlyHint": False} - Idempotent writes (PUT/update): add
idempotentHint: True
Tool Descriptions
- 1-2 sentences. Front-load what it does AND what it returns.
- Bad: "This tool gets a merge request."
- Good: "Get merge request details. Returns title, state, branches, author, diff_refs."
Error Handling
- Every tool MUST wrap in try/except and return
_err(e)— never raise. - Error text MUST be actionable: include what went wrong and suggest a fix.
- Never return concatenated JSON strings — always a single valid JSON object.
- Never expose stack traces, tokens, or internal paths.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 125 lines · 1,637 tokens per session scan A a34ad5149363
mcp-gitlab AGENTS.md is an instructions file published in the GitHub repository vish288/mcp-gitlab (6 stars, last pushed 10d ago), licensed MIT. It adds 1,637 tokens to every session, about $0.0082 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
gitlab-mcp-server go.instructions.md
Instructions for writing Go code following idiomatic Go practices and community standards.
gitlab-mcp-server copilot-instructions.md
Instructions for jmrplens/gitlab-mcp-server, covering gitlab-mcp-server — gitlab mcp server in go, project overview, architecture, project structure and development conventions.
gitlab-mcp-server go-mcp-server.instructions.md
Best practices and patterns for building Model Context Protocol (MCP) servers in Go using the official github.com/modelcontextprotocol/go-sdk package (v1.7.0+).
gitlab-mcp-server code-review-generic.instructions.md
Generic code review instructions that can be customized for any project using GitHub Copilot.
gitlab-mcp-server AGENTS.md
Instructions for jmrplens/gitlab-mcp-server, covering gitlab-mcp-server — agent quick reference, read first, hard invariants, common commands and build.
gitlab-mcp-server mcp-best-practices.instructions.md
MCP protocol-level best practices for tool design, annotations, response formats, pagination, and security. Applies to all Go MCP server code.