Analyzes codebases with tree-sitter and generates AGENTS.md files for AI coding agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by AGENTS.md Generator.
generate_agents_mdMain entry point. Runs the pipeline internally, embeds writing rules into the payload, and returns chunked read instructions. Use this to create or update `AGENTS.md`.
scan_codebaseStandalone context tool. Analyzes the codebase and returns a pure data payload with no `AGENTS.md` mandate. Use this when you need architectural context for any other task.
read_payload_chunkStreams the payload written by either tool in chunks until `has_more` is false.
MCP server that analyzes codebases with tree-sitter and generates AGENTS.md files.
Python Β· C# Β· TypeScript Β· JavaScript Β· Go
Installation Β· Usage Β· Configuration Β· How It Works Β· Contributing
Compatible with any MCP-capable client: Claude Code, Gemini CLI, Cursor, Windsurf, Codex CLI, and others.
The server exposes three tools with a clear separation of concerns:
generate_agents_md β main entry point. Runs the analysis pipeline internally, embeds writing rules into the payload, and returns chunked read instructions to your client.scan_codebase β standalone context tool for when you want deep codebase understanding without generating any file.read_payload_chunk β streams the payload back in chunks regardless of which tool produced it.No large data travels over the MCP wire.
Requirements: Python 3.11+, Git, and any MCP-compatible client.
See INSTALLATION.md for the full guide including prerequisites and troubleshooting.
The setup wizard detects your installed clients, asks whether to configure globally or per-project, and patches the config files automatically. Supports Claude Code, Gemini CLI, Cursor, Windsurf, and Codex CLI.
If you have uv installed, uvx runs the package without a prior install step. Add the entry manually to your client's MCP config:
For Claude Code specifically:
claude mcp adddefaults to--scope local(current project only). Add-s userto register it for all projects.
Once registered, ask your AI client:
"Generate the AGENTS.md for this project"
The client will call generate_agents_md automatically. To scan a different directory:
"Generate the AGENTS.md for the project at /path/to/project"
| Tool | Purpose |
|---|---|
generate_agents_md | Main entry point. Runs the pipeline internally, embeds writing rules into the payload, and returns chunked read instructions. Use this to create or update AGENTS.md. |
scan_codebase | Standalone context tool. Analyzes the codebase and returns a pure data payload with no AGENTS.md mandate. Use this when you need architectural context for any other task. |
read_payload_chunk | Streams the payload written by either tool in chunks until has_more is false. |
generate_agents_md| Parameter | Type | Default | Description |
|---|---|---|---|
project_path | string | "." | Path to the project root |
scan_codebase| Parameter | Type | Default | Description |
|---|---|---|---|
project_path | string | "." | Path to the project root |
force_full_scan | boolean | true | Ignore cache and rescan everything. Defaults to true β direct calls always perform a full scan. |
read_payload_chunk| Parameter | Type | Default | Description |
|---|---|---|---|
project_path | string | "." | Must match the path used in the preceding tool call |
chunk_index | integer | β | Zero-based chunk index. Increment until has_more is false |
The generated AGENTS.md follows the agents.md open standard. It is written as a README for AI agents, not as documentation for humans. Sections include:
| Section | Contents |
|---|---|
| Project Overview | Tech stack and top-level architecture shape |
| Architecture & Data Flow | Detected layers or domains with data flow direction |
| Conventions & Patterns | Naming rules, export contracts, import rules, how to add new entities end-to-end |
| Environment Variables | Variables detected in source files and .env.example |
| Setup Commands | Exact install and run commands from package.json, Makefile, etc. |
| Development Workflow | Build, watch, and dev server commands |
| Testing Instructions | Test commands and framework info (if detected) |
| Code Style | Lint/format commands (if config files detected) |
| Build and Deployment | CI pipeline info (if detected) |
Sections with no detected data are omitted entirely.
AGENTS.md content anywayAGENTS.mdFor large codebases the analysis payload can be too big to return inline over the MCP wire. The server handles this transparently through read_payload_chunk.
generate_agents_md flowgenerate_agents_md runs the pipeline internally, writes the payload to disk (including AGENTS.md writing rules), and returns total_chunks with read instructionsread_payload_chunk(project_path, chunk_index=0), then increments chunk_index until has_more is falsedata fields β the payload contains the rules and analysis data needed to write AGENTS.mdscan_codebase flow (pure context, no AGENTS.md mandate)scan_codebase runs the analysis and writes a pure data payload to diskread_payload_chunkThis flow is pure MCP β no filesystem access required from the client side. Any MCP-compatible client can follow it.
All runtime artifacts are stored outside your project, in the user cache directory:
The <project-hash> is a SHA-256 of the project's absolute path β unique per project. Nothing is written to your repository.
Note: The server also writes a temporary
payload.jsonto this directory during analysis, but it is managed entirely by theread_payload_chunktool and deleted automatically after the last chunk is read. You never need to access it directly.
Create .agents-config.json at your project root to customize behavior. This file is optional β all fields have defaults, and you can commit it to share settings with your team.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agents-md-generator)<a href="https://allmcps.com/mcp/agents-md-generator"><img src="https://allmcps.com/api/badge/agents-md-generator?style=directory" alt="AGENTS.md Generator on AllMCPs" /></a>