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 9,128 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, and every document the server sends,.

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 9,128 This file is loaded in full into every session.
When invoked 9,128 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.09128 $0.09128
Opus 5.5 $0.03651 $0.03651
Sonnet 5.5 $0.01826 $0.01826
Haiku 4.5 $0.00913 $0.00913

Measured yesterday against content hash e2a2badc749a, 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 yesterday.

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 · 348 lines

How it starts

The opening of the file, as written. The whole thing — 348 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.4
  • MCP SDK: github.com/modelcontextprotocol/go-sdk/mcp v1.9.0
  • GitLab Client: gitlab.com/gitlab-org/api/client-go/v3 v3.60.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|enums|sdk|paths|grants|required|params|routes; -validate-docs); grants is R-GRANT, the fine-grained table held to the live GitLab record; params is R-PARAM and routes R-ROUTE, every param a reached route declares and every route the record mounts held to what sends it or a declaration
│   ├── 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_doc_links/ # Local links and site links of the documentation resolve, anchors included (make check-doc-links)
│   ├── audit_pr_text/ # Em dashes a branch adds; what a pull request description may not carry (make check-em-dash, make check-pr-description)
│   ├── crash_aware_tests/ # The cross-platform unit suite: a Go runtime crash told from a failing test and rerun once
│   ├── 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_image_vulns/ # The image's Alpine packages against Trivy's vulnerability database before the push (make check-image-vulns)
│   ├── reproduce_release/ # Release binaries rebuilt from the tag and compared byte for byte (make check-reproducible, make check-repeatable)
│   ├── release_checks/ # The release's preflight order, checked before anything publishes, and the Linux binaries' ELF loader (make release)
│   ├── release_packages/ # The .mcpb bundles, their per-OS manifests, and the packages server.json declares (make mcpb, make check-server-json-packages)
│   ├── audit_plugin_manifests/ # Plugin manifests against the schemas they declare (make check-openplugin)
│   ├── audit_site_headers/ # The documentation site's security headers, judged after each deploy (make check-site-headers)
│   ├── audit_dco/          # Every commit of a pull request signed off by its author, the Developer Certificate of Origin (make check-dco)
│   ├── audit_file_headers/ # Every source file opens with the copyright and license header; -fix writes it (make check-file-headers, make fix-file-headers)
│   ├── 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, and every document the server sends, client-go's included, is one the release pin accepts (make check-graphql-documents)
│   ├── gen_graphql_schema/ # Pins the GitLab GraphQL schema from a live introspection (make gen-graphql-schema) and the REST record's release's from GitLab's CI dump (make gen-graphql-release-schema); --check gates both
│   ├── 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
│   ├── coverage_recipes/   # gobco and gremlins over one package, and the gate over action specs (make coverage-conditions, coverage-mutants, check-spec-conditions)
│   ├── measure_conditions/ # Plan, measuring loop and job summary of the on-demand condition and branch coverage workflow (conditions.yml, dispatched by hand), and the whole-tree figures (make coverage-conditions-tree)
│   ├── sonar_scan/         # The SonarCloud analysis run locally and its quality gate (make sonar, sonar-status)
│   ├── fuzz_targets/       # The fuzz targets the weekly fuzzing workflow (fuzz.yml) runs with go test -fuzz
│   ├── merge_coverage/     # The e2e support packages' offline profile merged with the complete runs', their committed record and gate (make e2e-support-coverage, check-e2e-support-coverage)
│   ├── 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, committext, docgen, docwalk, 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 schemas, gitlab.com's and the release's (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; docblocks/ reads a block a site page prints by its e2e=<case> fence key
│   ├── tools/              # Tool orchestration layer + 182 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
│   │   └── ...             # 182 sub-packages (183 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 · 348 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. yesterday Changed e2a2badc749a
  2. 2d ago Changed a87dafeb7782
  3. 11d ago Changed · +2 lines · +70 tokens per session 3a1f4fdda0f6
  4. 13d ago Changed · +27 tokens per session 2f006d65d3be
  5. 19d ago Changed 730d3e8dacce
  6. 21d ago Changed c92350da1959
  7. 23d ago Changed · +3 lines · +102 tokens per session 38b7a0f015f2
  8. 24d ago Changed 734bb913db22
  9. 26d ago Changed · +21 tokens per session 382ddb509233
  10. 27d ago First seen · 343 lines · 8,908 tokens per session scan A 4ff12f473007

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 (58 stars, last pushed today), licensed MIT. It adds 9,128 tokens to every session, about $0.0365 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

gitlab-mcp-server copilot-instructions.md compared with instructions from other repositories

gitlab-mcp-server copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gitlab-mcp-server copilot-instructions.mdjmrplens/gitlab-mcp-serverInstructions file58todayMITA9,128GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,951Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file291kyesterdayMITA4,396Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,303GitHub Copilot