gitlab-mcp-server: Instructions file for GitHub Copilot

.github/copilot-instructions.md

gitlab-mcp-server copilot-instructions.md is an instructions file for GitHub Copilot from jmrplens/gitlab-mcp-server. It costs 8,133 tokens per session, scanned A, original, MIT.

Project guidance for a Go server that lets coding agents perform GitLab operations through the Model Context Protocol (MCP), a standard way for AI tools to call external services.

In plain words
What is it for?
Use it when developing, testing, or reviewing the GitLab MCP server and its REST or GraphQL integrations.
Why use it?
It gives agents the project structure, architecture, development rules, and GitLab API conventions they need to make consistent changes.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions CLAUDE.md.

This is jmrplens/gitlab-mcp-server's own configuration. It tells GitHub Copilot how to work on gitlab-mcp-server 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 gitlab-mcp-server configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is │ ├── audit_graphql_documents/ # Every raw GraphQL document under ./internal/... is one the pinned GitLab schema accepts (make check-graphql-documents); the d.

Reuse

Borrowing it

Nothing to install: this file belongs to jmrplens/gitlab-mcp-server. 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/jmrplens/gitlab-mcp-server/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/jmrplens/gitlab-mcp-server

Made for: GitHub Copilot.

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-server copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jmrplens/gitlab-mcp-server/copilot-instructions/github.svg)](https://agentmods.dev/instructions/jmrplens/gitlab-mcp-server/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/jmrplens/gitlab-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/jmrplens/gitlab-mcp-server/copilot-instructions/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 gitlab-mcp-server copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jmrplens/gitlab-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/jmrplens/gitlab-mcp-server/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,133 This file is loaded in full into every session.
When invoked 8,133 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.08133 $0.08133
Opus 5.5 $0.03253 $0.03253
Sonnet 5.5 $0.01627 $0.01627
Haiku 4.5 $0.00813 $0.00813

Measured today against content hash 67bec39422ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

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.

.github/copilot-instructions.md · 330 lines

How it starts

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

gitlab-mcp-server — GitLab MCP Server in Go

Project Overview

This project implements a Model Context Protocol (MCP) server that exposes GitLab operations as MCP tools. It is written in Go using the official github.com/modelcontextprotocol/go-sdk package and communicates with the GitLab REST API v4 (primary) and GraphQL API (for domains without REST coverage — see ADR-0006).

Architecture

  • Language: Go 1.27.3
  • MCP SDK: github.com/modelcontextprotocol/go-sdk/mcp v1.8.0
  • GitLab Client: gitlab.com/gitlab-org/api/client-go/v3 v3.30.0 (official client, migrated from deprecated xanzy/go-gitlab)
  • Transport: stdio (primary), HTTP (optional)
  • Cross-platform: Windows, Linux & macOS, amd64 & arm64

Project Structure

gitlab-mcp-server/
├── cmd/                    # server + 44 dev utility binaries; see docs/development/cmd-utilities.md for the full reference
│   ├── server/             # MCP server entry point (+ --shutdown, --probe flags)
│   ├── audit_1to1/         # 1:1 SDK↔API parity audit (-scope structs|actions|metadata|enums|sdk|paths|grants; -validate-docs); grants is R-GRANT, the fine-grained table held to the live GitLab record
│   ├── audit_catalog_first/        # Catalog-first registration invariants (ADR-0004)
│   ├── audit_discovery_completeness/ # Discovery-metadata quality audit (META-001)
│   ├── audit_doc_tool_names/ # Every `gitlab_*` name the docs mention exists on the surface it claims (make check-doc-tool-names)
│   ├── audit_dynamic_aliases/ # Dynamic-toolset alias governance
│   ├── audit_e2e_coverage/ # What the e2e suite dispatched, and the catalog actions it never reached (make audit-e2e-coverage, make check-e2e-static)
│   ├── audit_edition_tier/ # Doc-grounded licensing tier vs binary gating
│   ├── audit_gateway_chars/ # Served descriptions/titles vs strict gateway validators (make check-gateway-chars)
│   ├── audit_install_buttons/ # One-click install payloads decode to one configuration per command
│   ├── audit_binary_vulns/ # Every release binary against the vulnerability database at module grain (make check-binary-vulns)
│   ├── audit_surface_quality/ # MCP surface metadata + output quality (-view; was audit_tools + audit_output)
│   ├── audit_supply_chain/ # Release-configuration invariants (SHA-pinned uses:, Dependabot cooldowns, SECURITY.md, installers)
│   ├── audit_tokens/       # Token overhead; -footprint, --compare-schemas (was audit_meta_schema); cl100k_base tokenizer (tokens.go)
│   ├── audit_metrics/      # MCP tool/resource/prompt metrics
│   ├── audit_readonly_graphql/ # No ReadOnly action may reach a GraphQL mutation (make check-readonly-graphql)
│   ├── audit_sdk_context/  # Every client-go call in internal/ and cmd/ passes gl.WithContext(ctx); test files are its blind spot (make check-sdk-context)
│   ├── audit_tenancy/      # Holds the tenant policy register (internal/tenancy) to the code: sites, values, refusals, charges, reasons, and nothing shaped like a limit, in a shape its tripwire reads, outside a row or an exemption (docs/development/cmd-utilities.md lists what it cannot see); -compare-binaries proves a move changed no code (make check-tenancy)
│   ├── audit_graphql_documents/ # Every raw GraphQL document under ./internal/... is one the pinned GitLab schema accepts (make check-graphql-documents); the documents client-go builds are judged by the test transport alone
│   ├── gen_graphql_schema/ # Pins the GitLab GraphQL schema from a live introspection (make gen-graphql-schema; --check gates it)
│   ├── gen_action_grants/  # Derives each action's requests from its handlers and joins them to what GitLab declares a fine-grained token needs: action-requests.json, the compiled table and the site's reference/fine-grained-permissions.mdx with its Spanish twin (make gen-action-grants; check-action-grants and check-action-grants-derivation gate it)
│   ├── audit_test_goroutines/ # Off-goroutine testing.T abort audit (--check gate)
│   ├── audit_test_names/   # Test naming convention (+ -apply/-dry-run; -check-files gates test-file naming)
│   ├── audit_test_subtests/ # Case loops that assert without a t.Run subtest (-fix rewrites the unambiguous ones)
│   ├── audit_test_closed_servers/ # httptest servers closed while their address is still used later in the function (make check-closed-servers)
│   ├── bench_resources/    # What the server costs to run, and the charts the docs publish
│   ├── godoc_tool/         # Godoc auditor + fixer (audit/fix; was audit_godocs + add_docs; make check-godocs)
│   ├── format_md_tables/   # Markdown pipe-table normalizer
│   ├── measure_conditions/ # Plan and job summary of the on-demand condition coverage workflow (conditions.yml, dispatched by hand)
│   ├── gen_action_catalog_manifest/ # ActionSpec group-builder manifest
│   ├── gen_brand/          # Every vector brand asset from one parametric geometry
│   ├── gen_icon_webp/      # Light/dark WebP icon fallbacks from icons.go
│   ├── gen_lhm_manifest/   # Capability arrays in lhm.plugin.json (LobeHub)
│   ├── gen_llms/           # llms.txt / llms-full.txt
│   ├── gen_testing_docs/   # docs/development/testing/testing.md test-metrics block
│   ├── gen_tool_reference/ # The site's per-domain tool reference, one page per catalog group in English and Spanish, from the catalog and domains.json (make gen-tool-reference; check-tool-reference gates it)
│   ├── gen_third_party_notices/ # THIRD_PARTY_NOTICES from the release binaries' build information, the packages they link and the module cache (GoReleaser's sboms, the Dockerfile, make mcpb)
│   ├── gen_model_corpus/   # Model evaluation corpus breadth ledger
│   ├── gen_model_results/  # Folds a model evaluation run's shards into the published record
│   └── internal/           # Helpers shared by the commands (actionrequests, apidocs, auditshared, docgen, mcpsurface, sdkroutes)
├── internal/
│   ├── config/             # Configuration loading (dotenv files, flags, env vars, HTTP env overlay)
│   ├── edition/            # Licensing tier model (Free/Premium/Ultimate)
│   ├── finegrained/        # What a fine-grained token needs per action: the table types, the phase A and B authority, the withheld words (issue 952, ADR-0024)
│   ├── gitlab/             # GitLab API client wrapper
│   ├── oauth/              # OAuth HTTP mode: token cache, GitLab verifier, RFC 9728 metadata
│   ├── serverpool/         # HTTP mode: per-token+URL server pool & LRU cache
│   ├── subscriptions/      # resources/subscribe: polled watchers, leases (ADR-0015)
│   ├── tenancy/            # Tenant policy register (ADR-0023): keys and mint costs, one row per decision, values, Validate; decides, never enforces
│   ├── telemetry/, mcpotel/ # OpenTelemetry export and MCP instrumentation
│   ├── clientcompat/, gatewaycompat/, cachehints/, capguard/ # Per-client and gateway compatibility, cache hints, capability guard
│   ├── toolutil/           # Shared tool utilities (errors, pagination, markdown, logging)
│   ├── graphqlschema/      # Pinned GitLab GraphQL schema (SDL embedded as text + provenance) and Validate()
│   ├── testutil/           # Shared test helpers (NewTestClient, RespondJSON); NewTestClient validates every GraphQL document against the pinned schema; netfixture/ is the dead endpoint and the stoppable server a test uses instead of a closed httptest server
│   ├── tools/              # Tool orchestration layer + 180 sub-packages
│   │   ├── action_catalog.go # Canonical action catalog built from domain ActionSpecs
│   │   ├── actiongrants/   # The generated fine-grained table (table_gen.go, never edited) the catalog reads each action's requirement from
│   │   ├── register.go     # RegisterAll() — projects individual tools from the canonical action catalog
│   │   ├── register_meta.go # RegisterMetaStandaloneTools(): the standalone utilities (gitlab_discover_project, the gitlab_interactive_* flows) on the meta and individual surfaces; the catalog groups are registered by RegisterMetaCatalog (meta_catalog.go)
│   │   ├── dynamic/        # Low-token dynamic find/execute surface
│   │   ├── dynamiccatalog/ # Build(): the dynamic catalog assembled the way the server assembles it
│   │   ├── toolvisibility/ # Apply(): the post-registration pass over the tools outside the catalog, shared by cmd/server and the evaluator
│   │   ├── branches/       # Branch & protected branch tools
│   │   ├── commits/        # Commit tools
│   │   ├── issues/         # Issue CRUD tools
│   │   ├── mergerequests/  # Merge request CRUD tools
│   │   ├── projects/       # Project CRUD tools
│   │   └── ...             # 180 sub-packages (181 packages with the root)
│   ├── resources/          # MCP resource implementations
│   ├── prompts/            # MCP prompt implementations
│   ├── completions/        # Argument completion handler
│   ├── progress/           # MCP progress notifications
│   └── elicitation/        # MCP elicitation capability
├── docs/                   # Contributor documentation only: development/ and a README pointing users at the site (ADR-0025)
│   └── development/        # adr/ (Architectural Decision Records), testing/ (generated), static analysis, cmd utilities, tool surfaces, and the internal architecture, error handling, GraphQL integration, capability APIs and distribution pages (architecture.md, error-handling.md, graphql.md, capabilities.md, distribution.md)
├── site/                   # The user documentation: an Astro Starlight site, published at https://docs.jmrp.io/gitlab-mcp-server/
│   ├── src/content/docs/   # One .mdx page per slug, its Spanish twin under es/; reference/tools/ (make gen-tool-reference) and reference/fine-grained-permissions.mdx (make gen-action-grants) are generated
│   ├── src/data/           # Generated figures the pages read: stats.json (audit_metrics), token-footprint.json (audit_tokens), resource-benchmark.json (bench_resources); home.ts, the landing data, is hand-written
│   └── scripts/            # The site's own checks (i18n:check, facts:check, chips:check, llms:check and version:check among them) and its llms.txt generator
├── plan/                   # Untracked working area: ignored by git, never committed
├── .github/                # Copilot agents, skills, instructions
├── .gitignore
├── go.mod
├── go.sum
├── Makefile
└── README.md

Read the full file on GitHub · 330 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. today Changed · +1 lines · +62 tokens per session 67bec39422ac
  2. yesterday Changed · -4 tokens per session 88c50f256435
  3. 2d ago Changed d1cc3f5ef2e1
  4. 6d ago Changed · +1 lines · +122 tokens per session a9a7037a1768
  5. 7d ago Changed 4ea81381d1da
  6. 11d ago Changed · +37 tokens per session aa8ab96b5ca9
  7. 12d ago Changed · +11 tokens per session af8ced4b0c98
  8. 15d ago Changed · +1 lines · +28 tokens per session 27dbcac568e9
  9. 16d ago Changed · +6 lines · +519 tokens per session bc55929394b3
  10. 17d ago First seen · 321 lines · 7,358 tokens per session scan A 1794e24658d5

Subscribe to this mod's changes

gitlab-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository jmrplens/gitlab-mcp-server (46 stars, last pushed today), licensed MIT. It adds 8,133 tokens to every session, about $0.0325 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-30.

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,649 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,384 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,731 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