gitlab-mcp-server AGENTS.md

Quick-reference instructions for a Go MCP server that exposes GitLab REST and GraphQL operations as tools, resources, and prompts.

In plain words
What is it for?
Use it when developing or reviewing the server, especially changes involving tool registration, runtime surfaces, agents, skills, or build procedures.
Why use it?
It identifies the documents to read first and the architectural rules behind its catalog-first registration system.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/jmrplens/gitlab-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/jmrplens/gitlab-mcp-server

Made for: Codex, OpenCode.

Per session 2,932 This file is loaded in full into every session.
When invoked 2,932 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.02932 $0.02932
Opus 5 $0.01466 $0.01466
Sonnet 5 $0.00586 $0.00586
Haiku 4.5 $0.00293 $0.00293

Measured 2d ago against content hash d4f7312b3839, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gitlab-mcp-server 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.

AGENTS.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gitlab-mcp-server — Agent Quick Reference

MCP server in Go that exposes GitLab REST + GraphQL as MCP tools, resources, and prompts. Communicates via stdio (default) or HTTP. Catalog-first tool registration: 176 sub-packages under internal/tools/, with three runtime surfaces (dynamic default, meta, individual).

Read first

Where Why
CLAUDE.md Full project context, env vars, ADR list, agents/skills catalog
.github/copilot-instructions.md Auto-loaded by VS Code Copilot; has the language policy, env var table, E2E recipes
.github/instructions/*.md Auto-applied coding standards (go, MCP, OWASP, comments, code review)
docs/development/tool-surfaces-and-action-core.md Surface ownership and catalog projection rules
docs/development/adr Architectural Decision Records (catalog-first is ADR-0004)

OpenCode-specific wiring (this file's agents, skills, paths) lives in opencode.json + .opencode/agent/. The canonical agents and skills also exist under .github/agents/ and .claude/skills/ for Copilot/Claude; the opencode mirror is a thin frontmatter shim so they show up in the OpenCode CLI.

Hard invariants

  • Catalog-first registration. For ordinary GitLab API actions, add or update domain-local ActionSpecs and handlers. Do not add package-local RegisterTools functions or ad hoc mcp.AddTool calls. The catalog in internal/tools/action_catalog.go projects everything into meta, dynamic, gitlab://tools, audits, LLM files, and individual tool surfaces. (ADR-0004.)
  • English-only artifacts. Every file committed to this repo must be in English, including doc comments, ADRs, branches, commits, and MCP tool descriptions. Chat with the developer in any language you want.
  • Conventional commits. feat:, fix:, docs:, test:, refactor:, chore:. Use the git-commit skill (.claude/skills/git-commit/) for auto-detected type/scope.
  • Coverage target: maximum possible, 100% when feasible. CI enforces an 80% floor; in practice the team pushes per-package coverage to 100% unless there is a hard blocker (generated code, third-party interfaces). When you cannot reach 100% on a function, add a documented reason at the call site and prefer table-driven tests that exercise both happy and error paths.

Read the full file on GitHub · 216 lines

Changes

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.

  1. 2d ago First seen · 216 lines · 2,932 tokens per session scan A d4f7312b3839

Subscribe to this mod's changes

gitlab-mcp-server AGENTS.md is an instructions file published in the GitHub repository jmrplens/gitlab-mcp-server (31 stars, last pushed 3d ago), licensed MIT. It adds 2,932 tokens to every session, about $0.0147 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-30.