git-mcp-server: Instructions file for GitHub Copilot

.github/copilot-instructions.md

git-mcp-server copilot-instructions.md is an instructions file for GitHub Copilot from surajfale/git-mcp-server. It costs 1,125 tokens per session, scanned A, original, MIT.

Repository-specific instructions for an MCP server that automates conventional Git commits. MCP is a standard way for AI agents to call tools provided by a server.

In plain words
What is it for?
Working on commit generation, Git operations, changelog updates, OpenAI-compatible API settings, and server entry points.
Why use it?
They help agents find the server’s main components and preserve its rules for change tracking, commit messages, changelogs, and pushing code.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/surajfale/git-mcp-server/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/surajfale/git-mcp-server/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,125 This file is loaded in full into every session.
When invoked 1,125 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.01125 $0.01125
Opus 5.5 $0.00450 $0.00450
Sonnet 5.5 $0.00225 $0.00225
Haiku 4.5 $0.00112 $0.00112

Measured 2mo ago against content hash 4cb6bf784997, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-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 2mo 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 · 64 lines

How it starts

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

Copilot / AI agent instructions — git-commit-mcp-server

Overview

  • This project is an MCP server that automates conventional Git commits. The runtime entry points live in src/git_commit_mcp/server.py and src/git_commit_mcp/__main__.py.
  • High-level components:
    • server.py: MCP tool definitions and orchestration (uses FastMCP). Key functions: git_commit_and_push and generate_commit_message.
    • change_tracker.py: Detects added/modified/deleted/renamed files with GitPython.
    • message_generator.py: Heuristics-based Conventional Commit generator (types, scope, bullets). Look at TYPE_PATTERNS and COMMIT_TYPE_PRIORITY for rules.
    • ai_client.py: Thin OpenAI wrapper; reads OPENAI_API_KEY from the environment and supports ai_base_url for OpenAI-compatible endpoints.
    • git_operations.py: Stages, commits, and pushes using GitPython; follow its error handling for expected failure modes.
    • changelog_manager.py: Writes a CHANGELOG.md entry before the commit (placeholder hash) then replaces it after commit (amend flow).

Important conventions & behaviors (do not change without updating callers)

  • Configuration is read from environment variables via ServerConfig.from_env() (see src/git_commit_mcp/config.py). Examples: ENABLE_AI, OPENAI_API_KEY, AI_PROVIDER, AI_MODEL, WORKSPACE_DIR, FORCE_SSH_ONLY.
  • AI usage:
    • If ENABLE_AI=true the code will instantiate AIClient which requires OPENAI_API_KEY in the process environment. If the key is missing, AI calls raise a clear error and the code falls back to the heuristic generator.
    • To test AI locally, export $env:OPENAI_API_KEY = "sk-..." in PowerShell before launching the server/process.
  • Remote repo handling: remote URLs must use SSH by default when FORCE_SSH_ONLY is true. When working with remote repos, RepositoryManager clones into WORKSPACE_DIR.
  • Changelog update flow: the server writes a placeholder entry, stages CHANGELOG.md, creates the commit, replaces the placeholder with the real hash, then amends the commit to include the updated CHANGELOG. Changelog errors are non-fatal; commits still succeed.

Developer workflows (commands you can run)

  • Run tests: pytest (project uses standard pytest tests under tests/).
  • Run the server locally (stdio MCP transport):
    • Development: uv run python -m git_commit_mcp.server (or python -m git_commit_mcp.__main__)
    • Production (uvx): uvx git-commit-mcp-server
  • Quick environment setup (PowerShell):
    # temporary for current shell
    $env:OPENAI_API_KEY = 'sk-REPLACE'
    # run server in same shell so it inherits env
    uvx git-commit-mcp-server
    

Patterns & heuristics to preserve

  • Commit type detection: see CommitMessageGenerator._detect_commit_type — it uses TYPE_PATTERNS, file extension and path heuristics, and counts to prioritize types. When adding new file categories, update TYPE_PATTERNS and unit tests.
  • Scope extraction: the scope is inferred from first-level directories but skips common prefixes like src/ or lib/. Keep this behaviour if you change message structure.
  • Message generation fallback: AI is preferred but any AI failure must gracefully fall back to CommitMessageGenerator.

Integration points & dependencies

  • FastMCP: MCP server framework; tools are declared with @mcp.tool() in server.py.
  • GitPython: used across change detection and Git operations. Use Repo objects passed around — do not re-instantiate unexpectedly.
  • OpenAI SDK: optional; code expects the openai package and environment key. The config supports ai_base_url for alternate endpoints.

Where to look for examples and tests

  • End-to-end behavior: tests/test_integration.py.
  • Message logic: tests/test_message_generator.py and src/git_commit_mcp/message_generator.py.
  • Change detection: tests/test_change_tracker.py and src/git_commit_mcp/change_tracker.py.

Read the full file on GitHub · 64 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. 2mo ago First seen · 64 lines · 1,125 tokens per session scan A 4cb6bf784997

Subscribe to this mod's changes

git-mcp-server copilot-instructions.md is an instructions file published in the GitHub repository surajfale/git-mcp-server (2 stars, last pushed 11mo ago), licensed MIT. It adds 1,125 tokens to every session, about $0.0045 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

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

git-mcp-server copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-mcp-server copilot-instructions.mdsurajfale/git-mcp-serverInstructions file211mo agoMITA1,125GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode