Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: modern LLMs now handle documentation generation more effectively using native file and code intelligence tools

AWS Labs Code Documentation Generation MCP Server

⚠️ DEPRECATION NOTICE

This MCP server is deprecated and will be archived. Modern LLMs now handle documentation generation more effectively using native file and code intelligence tools.

Migration: Simply prompt your AI assistant: "Generate comprehensive documentation for this project including README, deployment guide, and API docs." For reusable workflows, use Cline Rules, Claude Skills, or Kiro Powers.

See RFC #2004 for details.

smithery badge

A Model Context Protocol (MCP) server that automatically analyzes repository structure and generates comprehensive documentation for code projects. This server uses repomix to extract project structure and creates tailored documentation based on project type.

Architecture

How the Server Works

The code-doc-gen-mcp-server follows this workflow:

  1. prepare_repository:

    • Uses RepomixManager to analyze a project directory
    • Runs repomix to generate an XML representation of the repo
    • Extracts directory structure from this XML
    • Returns a ProjectAnalysis with the directory structure
  2. create_context:

    • Creates a DocumentationContext with the ProjectAnalysis
  3. plan_documentation:

    • Uses the directory structure from DocumentationContext
    • Creates a DocumentationPlan with document structure and sections
  4. generate_documentation:

    • Generates document templates based on the plan

Key Components

  1. RepomixManager: Manages the execution of repomix and parses its XML output to extract directory structure
  2. DocumentationContext: Central state container that tracks project info and documentation progress
  3. ProjectAnalysis: Data structure containing analyzed project metadata (languages, dependencies, etc.)
  4. DocumentationPlan: Structured plan for document generation with section outlines
  5. DocumentGenerator: Creates actual document templates based on the plan

Features

  • Project Structure Analysis: Uses repomix to analyze repository structure and extract key components
  • Content Organization: Creates appropriately structured documentation based on project type
  • Multiple Document Types: Supports README, API docs, backend docs, frontend docs, and more
  • Integration with Other MCP Servers: Works with AWS Diagram MCP server
  • Custom Document Templates: Templates for different document types with appropriate sections

Prerequisites

  1. Install uv from Astral or the GitHub README
  2. Install Python using uv python install 3.10
  3. Install repomix using pip install repomix>=0.2.6

Installation

Kiro Cursor VS Code
Add to Kiro Install MCP Server Install on VS Code

This MCP server can be added to your AWS AI assistants via the appropriate MCP configuration file:

{
  "mcpServers": {
    "awslabs.code-doc-gen-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.code-doc-gen-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Windows Installation

For Windows users, the MCP server configuration format is slightly different:

{
  "mcpServers": {
    "awslabs.code-doc-gen-mcp-server": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "awslabs.code-doc-gen-mcp-server@latest",
        "awslabs.code-doc-gen-mcp-server.exe"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "AWS_PROFILE": "your-aws-profile",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}

Core Concepts

DocumentationContext

The DocumentationContext class maintains the state of the documentation process throughout its lifecycle:

  • project_name: Name of the project being documented
  • working_dir: Working directory for the project (source code location)
  • repomix_path: Path where documentation files will be generated
  • status: Current status of the documentation process
  • current_step: Current step in the documentation workflow
  • analysis_result: Contains the ProjectAnalysis with project metadata

ProjectAnalysis

The ProjectAnalysis class contains detailed information about the project:

  • project_type: Type of project (e.g., "Web Application", "CLI Tool")
  • features: Key capabilities and functions of the project
  • file_structure: Project organization with directory structure
  • dependencies: Project dependencies with versions
  • primary_languages: Programming languages used in the project
  • apis (optional): API endpoint details
  • backend (optional): Backend implementation details
  • frontend (optional): Frontend implementation details

Tools

prepare_repository

async def prepare_repository(
    project_root: str = Field(..., description='Path to the code repository'),
    ctx: Context = None,
) -> ProjectAnalysis

This tool:

  1. Extracts directory structure from the repository using repomix
  2. Returns a ProjectAnalysis template for the MCP client to fill
  3. Provides directory structure in file_structure["directory_structure"]

The MCP client then:

  1. Reviews the directory structure
  2. Uses read_file to examine key files
  3. Fills out the ProjectAnalysis fields
  4. Sets has_infrastructure_as_code=True if CDK/Terraform code is detected

create_context

async def create_context(
    project_root: str = Field(..., description='Path to the code repository'),
    analysis: ProjectAnalysis = Field(..., description='Completed ProjectAnalysis'),
    ctx: Context = None,
) -> DocumentationContext

Creates a DocumentationContext from the completed ProjectAnalysis.

plan_documentation

async def plan_documentation(
    doc_context: DocumentationContext,
    ctx: Context,
) -> DocumentationPlan

Creates a documentation plan based on the project analysis, determining what document types are needed and creating appropriate document structures.

generate_documentation

async def generate_documentation(
    plan: DocumentationPlan,
    doc_context: DocumentationContext,
    ctx: Context,
) -> List[GeneratedDocument]

Generates document structures with sections for the MCP client to fill with content.

Integration with Other MCP Servers

This MCP server is designed to work with:

  • AWS Diagram MCP Server: For generating architecture diagrams
  • AWS CDK MCP Server: For documenting CDK infrastructure code

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

Release files for awslabs.code-doc-gen-mcp-server 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awslabs.code-doc-gen-mcp-server 1.0.10
File Size Uploaded
awslabs_code_doc_gen_mcp_server-1.0.10.tar.gz 118.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awslabs.code-doc-gen-mcp-server 1.0.10
File Interpreter ABI Platform
awslabs_code_doc_gen_mcp_server-1.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 148.6 kB

Release files / awslabs_code_doc_gen_mcp_server-1.0.10.tar.gz

Download URL awslabs_code_doc_gen_mcp_server-1.0.10.tar.gz
Size 118.6 kB
Tags Source
SHA-256 checksum
How to use checksums
19863b3799c34dad31e68bf8ea02eebdfdee6912dd7741d94c6d64790cd11c9b
BLAKE2b-256 checksum
How to use checksums
6eef6ebcf9acdf83a64cb29b322bab160691be99e15a4fde10d75bf98257c3af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.

Transparency log

Release files / awslabs_code_doc_gen_mcp_server-1.0.10-py3-none-any.whl

Download URL awslabs_code_doc_gen_mcp_server-1.0.10-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
458687034a662f6687eb3d484f8c1f555cc14f6d845979a2fb2e781c26d01e9c
BLAKE2b-256 checksum
How to use checksums
46af292fc7c5956cad389a548da0b9e178e8008f5f06242bc64bccfd3778f01a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.10 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page