gitlab-mcp AGENTS.md

gitlab-mcp AGENTS.md is an instructions file for Codex, OpenCode from vinihcrosa/gitlab-mcp. It costs 5,411 tokens per session, scanned A, original, MIT.

Instructions for coding agents working on gitlab-mcp, a local server that connects agents to a self-hosted GitLab installation. It covers the product, repository structure, available commands, and rules derived from the source code.

In plain words
What is it for?
It helps agents work on GitLab merge-request browsing, inline review, and CI status through the server.
Why use it?
It gives agents the project context and fixed rules they need before changing the repository.

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/vinihcrosa/gitlab-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/vinihcrosa/gitlab-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gitlab-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vinihcrosa/gitlab-mcp/agents-md.svg)](https://agentmods.dev/instructions/vinihcrosa/gitlab-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/vinihcrosa/gitlab-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/vinihcrosa/gitlab-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,411 This file is loaded in full into every session.
When invoked 5,411 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.05411 $0.05411
Opus 5 $0.02705 $0.02705
Sonnet 5 $0.01082 $0.01082
Haiku 4.5 $0.00541 $0.00541

Measured 2d ago against content hash 7674f04d64e3, 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 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 · 188 lines

How it starts

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

AGENTS.md — Guia de Orientação para Agentes de Código

Este documento existe para orientar qualquer agente de código (humano ou LLM) que precise trabalhar neste repositório. Ele descreve o que o produto faz, como o repositório está organizado, quais comandos existem de verdade, quais invariantes de domínio o código-fonte estabelece, e quais ações um agente não deve executar. Leia este arquivo inteiro antes de fazer qualquer alteração, pois várias regras aqui descritas são invariantes rígidos derivados diretamente do código, e violá-las quebra o servidor de formas silenciosas e difíceis de depurar.

1. O que este produto faz

O gitlab-mcp é um servidor MCP (Model Context Protocol) que roda sobre stdio e funciona como um proxy fino sobre a REST API v4 de uma instância GitLab CE self-hosted. O escopo é deliberadamente pequeno (é um MVP com um objetivo só): navegar merge requests e deixar review inline sem abrir o browser. Ler o estado da CI entra nesse objetivo — a medição de uso real (157 de 632 chamadas gh) mostrou que o fluxo trava exatamente quando a pipeline quebra; ver docs/adr/2026-08-12-pipelines-re-enter-scope-on-measured-usage.md. Escrever em CI não entra: nada dispara, cancela ou re-roda pipeline, e nada lê variável ou secret. Fora de escopo também — issues, criação/merge de MR, aprovações, ou recursos Premium/Ultimate.

O servidor expõe exatamente 13 tools MCP, registradas em ordem em src/tools/index.ts:

  1. whoami — identidade do token (src/tools/whoami.ts).
  2. list_my_projects — projetos onde o usuário é membro (src/tools/projects.ts).
  3. list_my_authored_mrs — MRs criados pelo usuário (src/tools/mrs.ts).
  4. list_mrs_awaiting_my_review — MRs abertos onde o usuário é reviewer (src/tools/mrs.ts).
  5. get_mr — detalhe completo de um MR (src/tools/mrs.ts).
  6. get_mr_diff — diff em texto com numeração explícita old=/new= (src/tools/diff.ts).
  7. list_mr_discussions — threads de comentário de um MR (src/tools/discussions.ts).
  8. comment_on_mr — comentário geral no MR (escrita, src/tools/write.ts).
  9. comment_on_mr_line — thread de review ancorada em linha do diff (escrita, src/tools/write.ts).
  10. reply_to_mr_discussion — resposta em thread existente (escrita, src/tools/write.ts).
  11. get_mr_pipeline — pipeline mais recente do MR e seus jobs (leitura, src/tools/pipelines.ts).
  12. get_job_log — log do job, limpo e cortado pela cauda (leitura, src/tools/pipelines.ts).
  13. list_pipelines — pipelines do projeto, filtradas na API (leitura, src/tools/pipelines.ts).

Read the full file on GitHub · 188 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 · 188 lines · 5,411 tokens per session scan A 7674f04d64e3

Subscribe to this mod's changes

gitlab-mcp AGENTS.md is an instructions file published in the GitHub repository vinihcrosa/gitlab-mcp (0 stars, last pushed 3d ago), licensed MIT. It adds 5,411 tokens to every session, about $0.0271 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.