AutoDocs – An Open-Source Code Documentation Automation Tool with Built-In MCP Server
What is AutoDocs?
AutoDocs is an open-source code documentation automation tool developed by TrySita, designed to help developers efficiently generate and maintain codebase documentation. By deeply analyzing the abstract syntax tree (AST) and constructing dependency graphs, it produces accurate, dependency-aware documentation and summaries. AutoDocs supports multiple programming languages, including TypeScript, JavaScript, and Python, with plans to expand to additional languages. The tool includes a FastAPI backend for data ingestion and search, and a Next.js web UI for browsing and exploring documentation. It also comes with a built-in MCP server, allowing intelligent tools to perform deep searches via HTTP.
Key Features of AutoDocs
-
Deep codebase analysis: Parses code using Tree-sitter and SCIP, builds dependency graphs, and generates documentation in dependency order.
-
Multi-language support: Supports TypeScript, JavaScript, and Python, with upcoming support for Go, Kotlin, Java, and Rust.
-
Automated documentation generation and updates: Creates repository-level, dependency-aware documentation and summaries, automatically updating when code changes.
-
Built-in MCP server: Provides an HTTP interface for intelligent tools to perform deep searches.
-
Web UI exploration: Next.js web interface for easy browsing and exploration of generated documentation.
-
Flexible integration: Supports fast deployment via Docker, enabling easy integration into existing projects.
Technical Principles
-
AST parsing: Uses Tree-sitter to extract code structure and semantic information.
-
Symbol Information Protocol (SCIP): Parses symbols in code to build dependency graphs.
-
Dependency graph construction: Creates a graph of files, definitions, calls, and imports based on AST and SCIP data.
-
Documentation generation: Produces accurate, repository-level, dependency-aware documentation and summaries.
-
FastAPI backend: Supports data ingestion, search, and dynamic documentation queries.
-
Next.js Web UI: Provides a user-friendly interface for browsing generated documentation.
-
MCP server: Allows intelligent tools to perform deep HTTP-based searches.
-
Docker deployment: Enables quick local setup using Docker and Docker Compose.
Project Resources
-
GitHub repository: https://github.com/TrySita/AutoDocs
Application Scenarios
-
Agile development teams: Automates documentation generation and updates in fast-iterating environments, reducing manual maintenance and keeping docs in sync with code.
-
Large enterprise applications: Produces high-quality documentation for multi-team projects, facilitating collaboration and understanding across teams.
-
Continuous integration pipelines: Integrates with CI workflows to update documentation automatically on each code commit, ensuring documentation always reflects the latest project state.
-
Project showcase and maintenance: Automatically generates README files and other documentation for open-source or public code repositories, enhancing readability and appeal.