# AGENTS.md Generator

Parses a codebase with tree-sitter and writes an AGENTS.md file that tells AI agents how the project works. Handy the first time an agent opens a repo.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: nushey
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nushey/agents-md-generator
- Updated: 2026-09-14
- HTML: https://affpapa.org/en/nevibecode/mcp/agentsmd-generator

## What it does

The server reads source files in Python, C#, TypeScript, JavaScript and Go, then produces AGENTS.md following the agents.md open standard. Think of it as a README addressed to an agent rather than a person: stack overview, layers and data flow direction, naming and import conventions, environment variables, install and run commands, test and lint commands. Sections with nothing detected are left out of the file.

Three tools sit behind it. `generate_agents_md` runs the pipeline and hands your client chunked read instructions; `scan_codebase` returns the same analysis without any mandate to write a file, which is what you want when you only need architectural context; `read_payload_chunk` streams the result until `has_more` turns false. Nothing large crosses the MCP wire.

Rescans lean on a cache: only files whose SHA-256 changed get parsed again, and from those just the affected public symbols are kept. Private symbols and test file internals never enter the cache or the payload. Python 3.11+, Git and an MCP-capable client are required, so the server will not start without them. Running it through `uvx` skips a separate install step, though `uv` itself has to be present.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add agents-md-generator -- uvx agents-md-generator
```
uvx runs the command named after the package; if the README names another one, use uvx --from agents-md-generator <command>

### Codex

**Platform CLI**
```bash
codex mcp add agentsmd-generator -- uvx agents-md-generator
```
uvx runs the command named after the package; if the README names another one, use uvx --from agents-md-generator <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agentsmd-generator": {
            "command": "uvx",
            "args": [
                "agents-md-generator"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from agents-md-generator <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agentsmd-generator": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "agents-md-generator"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from agents-md-generator <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add agentsmd-generator uvx agents-md-generator
```
uvx runs the command named after the package; if the README names another one, use uvx --from agents-md-generator <command>

## When to use it
- generate AGENTS.md for a repo the agent has never seen
- pull architectural context without writing any file
- refresh the project description after code changes
- extract build and test commands from package.json or Makefile
- list environment variables found in sources and .env.example

## Example prompts
- Generate the AGENTS.md for this project
- Scan the codebase and show me the architecture, don't create a file

## Similar
- [scan](https://affpapa.org/en/nevibecode/skills/scan.md) — skill · 4600 installs
- [understand](https://affpapa.org/en/nevibecode/skills/understand.md) — skill · 5200 installs
- [codebase-analyzer](https://affpapa.org/en/nevibecode/skills/codebase-analyzer.md) — skill · 862 installs
- [codebase-onboarding](https://affpapa.org/en/nevibecode/skills/codebase-onboarding.md) — skill · 698 installs
- [bmad-project-context](https://affpapa.org/en/nevibecode/skills/bmad-project-context.md) — skill · 11500 installs
- [agents-md](https://affpapa.org/en/nevibecode/skills/agents-md.md) — skill · 7100 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
