mcp-gitlab: Instructions file for Codex

AGENTS.md

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

A project guide for mcp-gitlab, a server that lets AI assistants use tools to work with GitLab, a platform for hosting code and managing software projects. It documents the server's structure, tool rules, errors, permissions, and tests.

In plain words
What is it for?
Use it when developing or reviewing GitLab API tools, resources, prompts, configuration, error handling, or unit tests in this project.
Why use it?
It helps contributors add or change GitLab operations consistently while respecting read-only settings and the server's response and testing conventions.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is vish288/mcp-gitlab's own configuration. It tells Codex and OpenCode how to work on mcp-gitlab itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-gitlab configures →

Reuse

Borrowing it

Nothing to install: this file belongs to vish288/mcp-gitlab. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vish288/mcp-gitlab/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/vish288/mcp-gitlab

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 mcp-gitlab AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vish288/mcp-gitlab/agents-md/github.svg)](https://agentmods.dev/instructions/vish288/mcp-gitlab/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/vish288/mcp-gitlab/agents-md"><img src="https://agentmods.dev/badge/instructions/vish288/mcp-gitlab/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-gitlab AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/vish288/mcp-gitlab/agents-md"><img src="https://agentmods.dev/badge/instructions/vish288/mcp-gitlab/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,703 This file is loaded in full into every session.
When invoked 5,703 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.05703 $0.05703
Opus 5.5 $0.02281 $0.02281
Sonnet 5.5 $0.01141 $0.01141
Haiku 4.5 $0.00570 $0.00570

Measured 7d ago against content hash c7b07c5b7cec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 7d 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 · 274 lines

How it starts

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

mcp-gitlab — Agent Context

MCP server exposing 91 tools, 7 resources, and 6 prompts over the GitLab REST API v4. Covers the full project lifecycle: code, reviews, CI/CD, releases, and issue tracking. Works against GitLab.com and self-hosted instances.

Protocol Support

Supports the MCP 2026-07-28 specification (MCP 2.0) and stays compatible with 2025-11-25 clients. Built on FastMCP 4.x and the MCP Python SDK 2.x. Verified over stdio and streamable-http.

Transports: stdio (default), streamable-http (recommended for remote), and sse. The 2026-07-28 specification deprecates sse, so the server prints a warning when you use it. The server uses no roots, sampling, logging, elicitation, or resource subscriptions, so the 2026-07-28 deprecations do not affect it.

Authorization: with --auth oauth (streamable-http only) the server is an MCP 2026-07-28 resource server and OAuth proxy in front of GitLab (RFC 9728 PRM, RFC 8414 AS metadata, PKCE S256, per-user GitLab tokens). The auth MUSTs are covered by in-process HTTP tests in tests/unit/test_oauth_http.py, not by a CI conformance job: the MCP conformance suite has no server-side auth scenarios (auth/* are client scenarios), so a conformance job cannot prove them.

Architecture

  • Entry point: src/mcp_gitlab/__init__.py — click CLI, loads .env via python-dotenv, runs the FastMCP server
  • Client: src/mcp_gitlab/client.py — async httpx client with all GitLab API methods. Transport (R2): a per-phase httpx.Timeout with the connect phase capped at 10s and AsyncHTTPTransport(retries=2) for connection errors; _send adds GET-only status retries (502/503/504 with jitter, 429 when Retry-After ≤ 5s, max 2 attempts, writes never retried — kept separate from the refresh-on-401 retry) and splits a timeout (GitLabTimeoutError) from an unreachable host (GitLabConnectionError; a ConnectTimeout counts as unreachable); an unresolved 429 surfaces retry_after via GitLabRateLimitError. Worst-case latency against a hard-down host is roughly 2 × (3 × connect-cap + timeout) + jitter (connect cap 10s; the two outer attempts each wrap httpx's three connect tries)
  • Tools: src/mcp_gitlab/servers/gitlab.py — all 91 FastMCP tool registrations
  • Resources: src/mcp_gitlab/servers/resources.py — 7 MCP resources (4 resource://rules/*, 3 resource://guides/*), content in src/mcp_gitlab/resources/*.md
  • Prompts: src/mcp_gitlab/servers/prompts.py — 6 MCP prompts (multi-tool workflows)
  • Helpers: src/mcp_gitlab/servers/_helpers.py — cached file loader with path-traversal guard, plus GitLab URL parsers. Most tools accept a project ID, a path, or a full GitLab URL for project_id; MR and pipeline URLs also yield the iid/id
  • Config: src/mcp_gitlab/config.py — GitLabConfig dataclass built from env vars; GITLAB_TIMEOUT is validated with a named error, and the CLI validates config before run_async (exit 2, one line) for token mode too, not just oauth
  • Local sign-in: src/mcp_gitlab/local_auth.py — device and PKCE flows, credentials file, refresh under lock; used when no env token is set
  • OAuth: src/mcp_gitlab/oauth.py — GitLabProvider (a fastmcp OAuthProxy in front of GitLab) and GitLabTokenVerifier (validates a GitLab OAuth token via GET /oauth/token/info). Only used when --auth oauth
  • Exceptions: src/mcp_gitlab/exceptions.py — GitLabError base; GitLabApiError, GitLabAuthError, GitLabNotFoundError, GitLabRateLimitError (with retry_after), GitLabTimeoutError, GitLabConnectionError, GitLabWriteDisabledError
  • Tests: tests/ — unit/test_tools.py (143 tool-level tests via the FastMCP in-memory client), plus test_client.py, test_config.py, test_local_auth.py, test_exceptions.py, test_prompts.py, test_resources.py, and tests/test_links.py. Shared fixtures (config, client, mock_api via respx) live in tests/conftest.py

Read the full file on GitHub · 274 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. 7d ago Changed · +242 tokens per session c7b07c5b7cec
  2. 8d ago Changed · +19 lines · +413 tokens per session bba6a1cde3a2
  3. 12d ago Changed · +78 tokens per session ba0646e21b5a
  4. 13d ago Changed · +12 tokens per session 513a86cee4dd
  5. 15d ago Changed · +45 tokens per session 99411a0b8fbf
  6. 16d ago Changed · +26 lines · +664 tokens per session 847156825be6
  7. 17d ago Changed · +90 tokens per session 23225b2b40d7
  8. 18d ago Changed · +8 lines · +367 tokens per session e0ef936b547b
  9. 23d ago Changed · +3 lines · +183 tokens per session d76ee6bef148
  10. 24d ago First seen · 218 lines · 3,609 tokens per session scan A 77f3023505c2

Subscribe to this mod's changes

mcp-gitlab AGENTS.md is an instructions file published in the GitHub repository vish288/mcp-gitlab (6 stars, last pushed 4d ago), licensed MIT. It adds 5,703 tokens to every session, about $0.0228 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens