gitlab-mcp-server copilot-instructions.md

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

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/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/jmrplens/gitlab-mcp-server

Made for: GitHub Copilot.

Per session 4,856 This file is loaded in full into every session.
When invoked 4,856 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.04856 $0.04856
Opus 5 $0.02428 $0.02428
Sonnet 5 $0.00971 $0.00971
Haiku 4.5 $0.00486 $0.00486

Measured 3d ago against content hash e5fd8475ea7e, 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 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 3d 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.

.github/copilot-instructions.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 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.0
  • MCP SDK: github.com/modelcontextprotocol/go-sdk/mcp v1.7.0
  • GitLab Client: gitlab.com/gitlab-org/api/client-go/v2 v2.42.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/                    # 20 dev utility binaries — see docs/development/cmd-utilities.md for the full reference
│   ├── server/             # MCP server entry point (+ --shutdown flag)
│   ├── audit_1to1/         # 1:1 SDK↔API parity audit (-scope structs|actions|metadata; -validate-docs)
│   ├── audit_catalog_first/        # Catalog-first registration invariants (ADR-0004)
│   ├── audit_discovery_completeness/ # Discovery-metadata quality audit (META-001)
│   ├── audit_doc_coverage/ # docs/tools/*.md vs catalog coverage gaps (DOC-002)
│   ├── audit_dynamic_aliases/ # Dynamic-toolset alias governance
│   ├── audit_edition_tier/ # Doc-grounded licensing tier vs binary gating
│   ├── audit_surface_quality/ # MCP surface metadata + output quality (-view; was audit_tools + audit_output)
│   ├── audit_tokens/       # Token overhead; -footprint, --compare-schemas (was audit_meta_schema); cl100k_base tokenizer (tokens.go)
│   ├── audit_metrics/      # MCP tool/resource/prompt metrics
│   ├── audit_test_goroutines/ # Off-goroutine testing.T abort audit (--check gate)
│   ├── audit_test_names/   # Test naming convention (+ -apply/-dry-run)
│   ├── audit_string_dupes/ # Duplicated string literals missing constants
│   ├── godoc_tool/         # Godoc auditor + fixer (audit/fix; was audit_godocs + add_docs)
│   ├── format_md_tables/   # Markdown pipe-table normalizer
│   ├── gen_action_catalog_manifest/ # ActionSpec group-builder manifest
│   ├── gen_docker_tools/   # Docker MCP Registry tools.json
│   ├── gen_llms/           # llms.txt / llms-full.txt
│   ├── gen_stats/          # README repository-statistics section (was inside gen_readme)
│   ├── gen_testing_docs/   # docs/development/testing/testing.md test-metrics block
│   └── eval_mcp_surfaces/  # Model-behavior evaluation across MCP surfaces
├── internal/
│   ├── config/             # Configuration loading (.env, flags)
│   ├── gitlab/             # GitLab API client wrapper
│   ├── serverpool/         # HTTP mode: per-token+URL server pool & LRU cache
│   ├── toolutil/           # Shared tool utilities (errors, pagination, markdown, logging)
│   ├── testutil/           # Shared test helpers (NewTestClient, RespondJSON)
│   ├── tools/              # Tool orchestration layer + 176 internal/tools packages
│   │   ├── register.go     # RegisterAll() — projects individual tools from the canonical action catalog
│   │   ├── register_meta.go # RegisterAllMeta() — registers catalog-backed meta groups and standalone surfaces
│   │   ├── dynamic/        # Low-token dynamic find/execute surface
│   │   ├── branches/       # Branch & protected branch tools
│   │   ├── commits/        # Commit tools
│   │   ├── issues/         # Issue CRUD tools
│   │   ├── mergerequests/  # Merge request CRUD tools
│   │   ├── projects/       # Project CRUD tools
│   │   └── ...             # 176 internal/tools packages total
│   ├── resources/          # MCP resource implementations
│   └── prompts/            # MCP prompt implementations
├── docs/                   # Documentation, ADRs, specs
│   ├── adr/
│   ├── spec/
│   ├── oauth-app-setup.md  # Creating GitLab OAuth applications for MCP clients
│   └── ide-configuration.md # Per-IDE MCP JSON configuration (stdio, HTTP legacy, OAuth)
├── plan/                   # Implementation plans
├── .github/                # Copilot agents, skills, instructions
├── .env                    # Local dev secrets (gitignored)
├── .gitignore
├── go.mod
├── go.sum
├── Makefile
└── README.md

Read the full file on GitHub · 286 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. 3d ago First seen · 286 lines · 4,856 tokens per session scan A e5fd8475ea7e

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 (31 stars, last pushed 3d ago), licensed MIT. It adds 4,856 tokens to every session, about $0.0243 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.