mcp-multi-root-git: Instructions file for Codex

AGENTS.md

mcp-multi-root-git AGENTS.md is an instructions file for Codex, OpenCode from Rethunk-AI/mcp-multi-root-git. It costs 3,775 tokens per session, scanned A, original, MIT.

Repository instructions for developing and onboarding contributors to the mcp-multi-root-git project. The project is an MCP server that provides Git tools for repositories with multiple roots, meaning multiple project directories.

In plain words
What is it for?
Use it to understand the project structure, change its interfaces safely, follow development and commit conventions, and run validation or CI checks.
Why use it?
It points developers to the canonical documentation and explains where implementation, contracts, validation, and publishing details are defined.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

This is Rethunk-AI/mcp-multi-root-git's own configuration. It tells Codex and OpenCode how to work on mcp-multi-root-git 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 mcp-multi-root-git configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Rethunk-AI/mcp-multi-root-git. 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/Rethunk-AI/mcp-multi-root-git/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Rethunk-AI/mcp-multi-root-git

Made for: Codex, OpenCode.

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 mcp-multi-root-git AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/rethunk-ai/mcp-multi-root-git/agents-md"><img src="https://agentmods.dev/badge/instructions/rethunk-ai/mcp-multi-root-git/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,775 This file is loaded in full into every session.
When invoked 3,775 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.03775 $0.03775
Opus 5.5 $0.01510 $0.01510
Sonnet 5.5 $0.00755 $0.00755
Haiku 4.5 $0.00378 $0.00378

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

Security

Grade A, and why

mcp-multi-root-git AGENTS.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.

AGENTS.md · 95 lines

How it starts

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

AGENTS.md — LLM + dev onboarding

IDEs injecting this as context: do not re-link from rules.

Package: @rethunk/mcp-multi-root-git. MCP stdio server. Entry src/server.ts → FastMCP + registerRethunkGitTools. Build output dist/server.js (publish ships full dist/).

Canonical docs — do not duplicate:

Implementation map

File Symbols
src/server.ts FastMCP + roots: { enabled: true }; MCP_JSON_FORMAT_VERSION; registerRethunkGitTools
src/server/json.ts jsonRespond() (minified, no envelope), readMcpServerVersion(), spreadWhen, spreadDefined
src/server/git.ts gateGit, spawnGitAsync (optional { timeoutMs, signal, env }), asyncPool, GIT_SUBPROCESS_PARALLELISM, GIT_SUBPROCESS_TIMEOUT_MS, gitTopLevelAsync, gitRevParseGitDirAsync, gitRevParseHeadAsync, createTopLevelMemo, createRevParseHeadMemo, buildFilteredGitEnv, parseGitSubmodulePaths, hasGitMetadata, gitStatusSnapshotAsync, gitStatusShortBranchAsync, fetchAheadBehind, isSafeGitUpstreamToken, gitFailureDetail
src/server/roots.ts requireGitAndRootsAsync (fan-out root resolution: string / string[] / "*", bounded-pool toplevel resolution), requireSingleRepo (workspaceRoot), resolveRootPathListAsync, RootPickArgs — shared tool preludes; session root resolution
src/server/presets.ts PRESET_FILE_PATH, loadPresetsFromGitTop, presetLoadErrorPayload, applyPresetNestedRoots, applyPresetParityPairs; Zod schemas must match git-mcp-presets.schema.json
src/server/schemas.ts WorkspacePickSchema (single-repo: workspaceRoot), RootPickSchema (fan-out: polymorphic root), MAX_ROOT_PATHS (256)
src/server/inventory.ts InventoryEntryJson, MAX_INVENTORY_ROOTS_DEFAULT, MAX_BRANCH_STATUS_LINES_DEFAULT, makeSkipEntry, collectInventoryEntry
src/server/git-refs.ts isProtectedBranch, PROTECTED_BRANCH_NAMES_TEXT, isSafeGitRefToken, isSafeGitRangeToken, isSafeGitAncestorRef, isSafeGitCommitIsh; getCurrentBranch, getRefSha, resolveRef, isWorkingTreeClean, isFullyMergedInto, isContentEquivalentlyMergedInto, commitListBetween; listWorktrees, worktreeForBranch; inferRemoteFromUpstream; conflictPaths
src/server/error-codes.ts ERROR_CODES (centralised error-code registry — the exact error field strings on the wire)
src/server/tools.ts registerRethunkGitTools — dispatches to register* below; selectToolRegistrars(envValue, registrars) — pure parse/filter fn for RETHUNK_GIT_TOOLS (reads env inside registerRethunkGitTools, not at module scope); TOOL_REGISTRARS ordered array
src/server/git-status-tool.ts git_status
src/server/git-inventory-tool.ts git_inventory — optional compareRefs: { left, right } ahead/behind between arbitrary local refs
src/server/git-parity-tool.ts git_parity
src/server/list-presets-tool.ts list_presets
src/server/git-log-tool.ts git_log — v3 JSON shape: sha (full), workspaceRoot, no sha7/ageRelative, optional email; optional follow (exactly one paths entry)
src/server/git-grep-tool.ts git_grep — read-only fan-out pickaxe history search (git log -S/-G via required pickaxe, commits[] per root); content mode removed in v6
src/server/git-diff-summary-tool.ts git_diff_summary — structured token-efficient diff viewer; read-only
src/server/git-diff-tool.ts git_diff — raw scoped diff text; read-only
src/server/git-show-tool.ts git_show — inspect commit message + diff or file content at a ref; read-only
src/server/git-conflicts-tool.ts git_conflicts — inspect unresolved merge conflicts (state detection + per-file ours/theirs/base hunk parsing)
src/server/git-stash-tool.ts git_stash_apply, git_stash_push
src/server/git-blame-tool.ts git_blame — file authorship, run-length grouped by contiguous same-commit line runs; read-only
src/server/git-tag-tool.ts git_tag — create/delete annotated or lightweight tags
src/server/git-branch-tool.ts git_branch — create/delete/rename local branches; protected-name checks on every action
src/server/git-worktree-tool.ts git_worktree_add, git_worktree_remove
src/server/batch-commit-tool.ts batch_commit — sequential multi-commit; mutating; exports PushReport, runPushAfter
src/server/git-push-tool.ts git_push — standalone push with optional upstream tracking
src/server/git-merge-tool.ts git_merge — mutating
src/server/git-cherry-pick-tool.ts git_cherry_pick (onConflict?: "abort"|"pause"), git_cherry_pick_continue (action?: "continue"|"abort", resumes/aborts a paused cherry-pick) — both mutating
src/server/git-reset-soft-tool.ts git_reset_soft — soft-reset; mutating
src/server/git-revert-tool.ts git_revert — inverse-commit revert; mutating, non-history-rewriting
src/server/presets-resource.ts rethunk-git://presets resource
src/server/tool-parameter-schemas.ts buildToolParameterSchemaDocument, captureToolParameterSchemas; backs tool-parameters.schema.json and published schemas/*.json snapshots
src/server/coverage.ts parseAllFilesLineCoverage — parses bun test coverage output for coverage:check CI gate
src/repo-paths.ts resolvePathForRepo, assertRelativePathUnderTop, isStrictlyUnderGitTop, validateRepoPath (combines the first two; the shared path-confinement check)

Read the full file on GitHub · 95 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 · 95 lines · 3,775 tokens per session scan A b607e547b639

Subscribe to this mod's changes

mcp-multi-root-git AGENTS.md is an instructions file published in the GitHub repository Rethunk-AI/mcp-multi-root-git (0 stars, last pushed 2mo ago), licensed MIT. It adds 3,775 tokens to every session, about $0.0151 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-09-01.

Related

mcp-multi-root-git AGENTS.md compared with instructions from other repositories

mcp-multi-root-git AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-multi-root-git AGENTS.mdRethunk-AI/mcp-multi-root-gitInstructions file02mo agoMITA3,775Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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