I've been studying AI for a while and finally decided to build something real.



The problem I wanted to solve: AGENTS.md always goes stale.



If you use AI coding agents — Cursor, Claude Code, Windsurf — you know what I mean. You change code, and the file that gives the agent context about your project is already out of date. The agent makes bad decisions because it's working with information that's no longer true.



So I built an MCP server that analyzes project changes and updates AGENTS.md automatically: `agents-md-generator`.



It doesn't compare text line by line. It analyzes code semantically using AST — detects if a public function changed its signature, if a new endpoint was added, or if a class was removed. It ignores internal noise (renamed variables, moved code) and only acts when changes actually matter.



The first run analyzes the entire project. Every run after that compares SHA-256 hashes per file — if the hash didn't change, it skips the file. On large projects, the difference is significant.



Each detected change gets an impact level: high (endpoints, removed classes, removed public methods), medium (public API signature changes), or low (everything else). There's a configurable threshold per project — if changes don't exceed it, the AGENTS.md isn't touched. No unnecessary noise.



All the analysis is written to a structured payload that the agent reads to update only the affected sections of AGENTS.md, leaving the rest intact.



Supports Python, TypeScript, JavaScript, C#, and Go out of the box. And nothing is written to your repo — the cache lives in ~/.cache/, completely outside your project.



One more thing: running /init on a large project sends the entire codebase to the agent every time. This tool extracts only what matters — symbols, signatures, metadata — into a structured payload. The agent never reads your files directly. Cheaper from day one, and even cheaper on every subsequent run thanks to the cache.



Works with any MCP-compatible client: Claude Code, Cursor, Windsurf, and so on.



This is a brand new project; it probably has bugs and cases I haven't covered yet. If you try it and something doesn't work, or you have an idea for improvement, open an issue or send a PR. Any help is welcome.



🔗 github.com/nushey/agents-md-generator



#AI #MCP #OpenSource #DevTools #AIAgents
