gitlab-mcp
Copilot instructions8 starsChanged 26 days agoApache-2.0View on GitHub
This is a GitLab MCP (Model Context Protocol) server that provides GitLab API access through standardized MCP tools. The project uses TypeScript, Yarn 4, and follows strict coding standards. ALL commits MUST follow Conventional Commits format: These patterns will FAIL CI validation: For complex changes, use body to explain what and why: - src/entities/ - Entity modules (labels, webhooks, etc.) - src/entities/*/schema.ts - Zod schemas for write operations - src/entities/*/schema-readonly.ts - Zod schemas for read operations -
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,349 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Type is REQUIRED: - Never omit the type prefix
- Very specific: line 79
ESM imports: - Do NOT use .js extensions in import paths (some legacy files still have .js — new code must use extensionless imports)
- Distinctive: line 80
Zod schemas: - All external data validated
- Distinctive: line 82
Jest tests: - All features must have tests
- Distinctive: line 110
All commits must pass conventional commits validation
- Distinctive: line 111
All tests must pass
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions for gitlab-mcp
Project Overview
This is a GitLab MCP (Model Context Protocol) server that provides GitLab API access through standardized MCP tools. The project uses TypeScript, Yarn 4, and follows strict coding standards.
Commit Message Rules (CRITICAL)
ALL commits MUST follow Conventional Commits format:
<type>(scope): <description>Required Commit Types
| Type | Description | Version Bump |
feat | New feature or capability | Minor |
fix | Bug fix | Patch |
docs | Documentation only | None |
style | Code style/formatting | None |
refactor | Code restructuring | Patch |
perf | Performance improvement | Patch |
test | Adding/fixing tests | None |
chore | Maintenance tasks | None |
ci | CI/CD changes | None |
build | Build system changes | None |
revert | Revert previous commit | Patch |
Commit Message Guidelines
- Type is REQUIRED - Never omit the type prefix
- Use imperative mood - "Add feature" not "Added feature"
- Keep subject under 72 characters
- Do NOT end with period
- Scope is optional but recommended - e.g.,
feat(webhooks):,fix(mrs):
FORBIDDEN Commit Messages
These patterns will FAIL CI validation:
Initial plan- Missing typeUpdate file.ts- Missing typeWIP- Usewip:type insteadFix stuff- Too vague, needs scope- Any message starting with emoji without type
Good Examples
feat(webhooks): add webhook management tools
fix(labels): resolve null pointer in label handler
test(integration): add CRUD lifecycle tests for webhooks
refactor(schemas): extract validation to shared utility
docs(readme): document webhook event types
chore(deps): update dependencies
ci(workflows): add conventional commits validationMulti-line Commit Messages
For complex changes, use body to explain what and why:
feat(webhooks): add webhook management entity
- Add list_webhooks and manage_webhook tools
- Support project and group scopes
- Include all GitLab webhook event types
- Add comprehensive unit tests
Closes #5Code Standards
- TypeScript strict mode - No
anytypes - ESM imports - Do NOT use
.jsextensions in import paths (some legacy files still have.js— new code must use extensionless imports) - Zod schemas - All external data validated
- CQRS pattern -
browse_*for queries,manage_*for commands - Jest tests - All features must have tests
Testing Conventions
- Jest mock hoisting is intentional -
jest.mock()calls are hoisted above imports by Jest's babel transform. Placingjest.mock('module')afterimport { thing } from 'module'is standard Jest usage, NOT a bug. Do NOT flag this as "import before mock" or "relies on hoisting" — it is the documented Jest API behavior used across all 148+ test suites in this project jest.fn()for partial Response mocks - Tests mockfetch/enhancedFetchreturn values with partial objects ({ ok: true, json: jest.fn() }) cast viaas jest.Mock. Do NOT flag missing Response properties — this is standard Jest mock patternundiciis mocked viajest.mock('undici')- The project usesundici.fetch()instead of globalfetch(). Test mocks replace the undici module, notglobal.fetch
Build and Test Commands
yarn build # Compile TypeScript
yarn lint # Run ESLint
yarn test # Run all tests
yarn test:cov # Run tests with coverageFile Organization
src/entities/- Entity modules (labels, webhooks, etc.)src/entities/*/schema.ts- Zod schemas for write operationssrc/entities/*/schema-readonly.ts- Zod schemas for read operationssrc/entities/*/registry.ts- Tool handlerstests/unit/- Unit teststests/integration/- Integration tests with real GitLab
Pull Request Guidelines
- All commits must pass conventional commits validation
- All tests must pass
- Coverage must not decrease
- Lint must pass with 0 errors
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

