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.
npx agentmods add instructions/dmitriyot/mcp-codebase/agents-mdgit clone --depth 1 https://github.com/DmitriyOT/mcp-codebaseWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02770 | $0.02770 |
| Opus 5 | $0.01385 | $0.01385 |
| Sonnet 5 | $0.00554 | $0.00554 |
| Haiku 4.5 | $0.00277 | $0.00277 |
Grade A, and why
mcp-codebase 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 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.
How it starts
The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for AI coding agents working in this repository. Assumes no prior knowledge of the project.
Documentation workflow (required)
Detailed project documentation lives in docs/ as Markdown files (start from docs/README.md).
For every task, follow this workflow:
- Read the docs first. Before starting a task, read the parts of
docs/related to the task, and only then do the work. - Docs must match the code. If you find a discrepancy between the documentation and the actual code, update the documentation to reflect the code.
- Keep docs current. After any code change, update the affected documentation in
docs/as part of the same change — a task is not done until the documentation is updated. - Commit and push. When the task is complete (code + docs), commit with a clear message and push to the remote repository.
Project overview
mcp-codebase is an MCP (Model Context Protocol) server that gives an AI agent semantic
navigation over a codebase. It crawls a target project, parses source files into symbols,
imports, and exports, stores them in PostgreSQL, and exposes six high-level MCP tools
over stdio:
search_symbols— find symbols by name with wildcards (*,?), OR (|), and fuzzy trigram matching; filter by kind, language, file path.get_symbol_details— source code, signature, docstring, file imports, sibling symbols.explore_module— directory overview: file counts, key symbols, subdirectories, top imports.find_usages— grep-style reference search for a symbol name across the project.get_module_dependencies— what a file imports, what it exports, which files import it.reindex— full or incremental reindex of the target project.
Note: this server indexes an external codebase (pointed at by PROJECT_ROOT), not itself.
Tech stack and requirements
- Node.js 18+, TypeScript (ES2022 target,
NodeNextmodules, strict mode), pure ESM ("type": "module"in package.json). - PostgreSQL 14+ with the
pg_trgmextension (created automatically) for fuzzy symbol search. - Key dependencies:
@modelcontextprotocol/sdk(stdio transport),pg(connection pool),typescript(TS/JS parsing via the Compiler API),chokidar(watch mode),ignore(.gitignore handling),zod(tool input validation).
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.
- yesterday First seen · 211 lines · 2,770 tokens per session scan A caa4e49f7aa8
mcp-codebase AGENTS.md is an instructions file published in the GitHub repository DmitriyOT/mcp-codebase (0 stars, last pushed 1mo ago), licensed MIT. It adds 2,770 tokens to every session, about $0.0138 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-31.
Other instructions, from other repositories
arbor CLAUDE.md
Claude Code instructions for getArbor-dev/arbor, covering claude.md, commands, build, test all crates and test single crate.
arbor copilot-instructions.md
Copilot instructions for getArbor-dev/arbor: Ensure that the previous step has been marked as completed. Call project setup tool with projectType parameter. Run scaffolding command to create project files and folders. Use '.' as the working directory. If no appropriate projectType is available, search documentation…
codeweave-mcp CLAUDE.md
Instructions for semihkayan/codeweave-mcp, covering claude.md, what this project is, build & run, architecture and layers.
pfsense-mcp-server AGENTS.md
Instructions for night4me/pfsense-mcp-server, covering pfsense mcp server, architecture and security, development workflow, long-running validation and test parallelism.
ScalaSemantic AGENTS.md
Instructions for MercurieVV/ScalaSemantic, covering agents.md instructions and quick start.
navegador CLAUDE.md
Instructions for ConflictHQ/navegador, covering navegador — claude context, what it is, stack, package layout and falkordb connection.