npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mseep/claude-auto-documenter

v2.0.0

Published

Production-ready MCP server for automatic documentation generation with Claude Code integration

Readme

🎭 Claude Auto-Documenter

MCP Server Node.js Version Python Version License: MIT

An MCP (Model Context Protocol) server that provides automatic documentation generation for Claude Code. Integrates with your development workflow to capture and document project implementations.

🌟 Features

🎯 Core Capabilities

  • 🔮 Automatic Documentation Generation: Captures project implementations automatically
  • 🎪 Simulation Capabilities: Test documentation triggers with simulation tools
  • 🌊 File System Watching: Real-time documentation updates on file changes
  • 🌍 Multi-Project Support: Manages documentation for multiple projects simultaneously
  • 🎨 Intelligent Context Extraction: Automatically detects project type and technologies
  • ⚖️ Queue Management: Robust queuing system for documentation tasks

🚀 Integrations

  • ⚡ Claude Code Integration: Native MCP server for seamless Claude Code workflows
  • 🔬 Technology Detection: Supports Node.js, Python, Rust, Go, and general projects
  • 💎 Configurable Storage: Flexible documentation storage with environment variables
  • 🏆 Open Source: MIT licensed for community use and collaboration

📋 Prerequisites

  • 🟢 Node.js: ≥18.0.0
  • 🐍 Python: ≥3.8 (for monitoring scripts)
  • 🎯 Claude Code: Latest version with MCP support

🛠️ Installation

🚀 Option 1: Quick Install (Recommended)

# Clone the repository
git clone https://github.com/Puneet8800/claude-auto-documenter-v2.git
cd claude-auto-documenter-v2

# Run the installation script
chmod +x scripts/install.sh
./scripts/install.sh

🔧 Option 2: Manual Installation

# Install Node.js dependencies
npm install

# Install Python dependencies
pip install -r requirements.txt

# Make scripts executable
chmod +x scripts/*.sh

⚙️ Configuration

🌍 Environment Variables

Create a .env file in the project root:

# Documentation storage path (default: ~/auto-docs)
AUTO_DOC_DOCS_PATH=/path/to/your/documentation

# Additional configuration options (optional)
# AUTO_DOC_MAX_RETRIES=3
# AUTO_DOC_RETRY_DELAY=1000

# Claude agents directory (default: ~/.claude/agents)
CLAUDE_AGENTS_PATH=/path/to/claude/agents

# Retry configuration
AUTO_DOC_MAX_RETRIES=3
AUTO_DOC_RETRY_DELAY=1000

# File watching patterns (comma-separated)
AUTO_DOC_WATCH_PATTERNS="**/*.js,**/*.ts,**/*.py,**/*.md,**/*.json"
AUTO_DOC_IGNORE_PATTERNS="node_modules/**,.git/**,dist/**,build/**"

🎯 Claude Code Integration

Add to your Claude Code MCP configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "auto-documenter": {
      "command": "node",
      "args": ["/path/to/auto-documenter/src/index.js"],
      "env": {
        "AUTO_DOC_DOCS_PATH": "/your/documentation/path"
      }
    }
  }
}

🎯 Usage

🧰 MCP Tools Available

Once configured, these tools are available in Claude Code:

🎬 trigger-auto-documentation

Manually trigger documentation generation for a project.

// Example usage in Claude Code
{
  "projectName": "my-project",
  "action": "document", // or "update", "init", "agent-completion", "command-completion"
  "workingDir": "/path/to/project"
}

📈 get-documentation-status

Get current status of the documentation system.

{
  "projectName": "my-project" // optional - get status for specific project
}

👀 setup-file-watching

Enable or disable file system watching for automatic documentation.

{
  "workingDir": "/path/to/project",
  "enable": true
}

🎭 simulate-agent-completion

Test automatic documentation with simulated agent completion.

{
  "agentName": "test-agent",
  "taskDescription": "Implemented new feature",
  "workingDir": "/path/to/project"
}

simulate-command-completion

Test automatic documentation with simulated command completion.

{
  "command": "npm test",
  "output": "All tests passed",
  "workingDir": "/path/to/project"
}

🎣 Documentation Triggers

The system can generate documentation through:

  1. 📂 File Changes: When monitored files are modified (if file watching is enabled)
  2. 🎤 Manual Triggers: Using MCP tools to generate documentation
  3. 🧪 Simulation Tools: Test agent and command completion scenarios

💻 Using the MCP Tools

Once configured in Claude Code, you can use the available MCP tools:

  • trigger-auto-documentation: Manually trigger documentation generation
  • get-documentation-status: Check the current status
  • setup-file-watching: Enable/disable file monitoring
  • simulate-agent-completion: Test agent completion scenarios
  • simulate-command-completion: Test command completion scenarios

🏗️ Architecture

graph TD
    A[Claude Code] --> B[Auto-Documenter MCP Server]
    B --> C[Task Completion Detector]
    B --> D[File System Watcher]
    B --> E[Documentation Pipeline]
    
    C --> F[Queue Manager]
    D --> F
    E --> F
    
    F --> G[Project Context Extractor]
    G --> H[Documentation Generator]
    H --> I[Storage Manager]
    
    I --> J[Project Documentation Files]
    
    subgraph "Triggers"
        K[Agent Completion]
        L[Command Execution]
        M[File Changes]
    end
    
    K --> C
    L --> C
    M --> D

🔧 Key Components

  • 🎯 MCP Server (src/index.js): Main server handling Claude Code integration
  • 🕵️ Task Completion Detector (src/task_completion_detector.py): Monitors for task completion events
  • 📝 Documentation Pipeline (src/documentation_pipeline.py): Processes and generates documentation
  • 👁️ File System Watcher: Real-time monitoring of project files
  • ⚖️ Queue Manager: Robust queuing system for documentation tasks

🧪 Testing

🏃‍♂️ Run Tests

# Run JavaScript tests
npm test

# Run Python end-to-end tests
npm run test:e2e

# Run all tests
npm run test && npm run test:e2e

🔗 Integration Testing

# Test with Claude Code
# 1. Start the MCP server
npm start

# 2. In Claude Code, use any of the MCP tools to test integration
# 3. Check documentation output in your configured path

📊 Performance

The system is designed for efficient operation with:

  • 📁 File Watching: Monitors project files for changes
  • ⚖️ Queue Processing: Asynchronous task processing
  • 💾 Storage: Organized markdown documentation files
  • 🔄 Real-time Updates: Responds to file system events

🛡️ Security

🔒 Security Features

  • 🛡️ Path Sanitization: All file paths are validated and sanitized
  • 🔐 Process Isolation: Subprocess execution with limited permissions
  • ✅ Input Validation: All user inputs are validated and escaped
  • ⚠️ Error Handling: Comprehensive error handling prevents crashes
  • 📏 Resource Limits: Memory and CPU usage limits prevent abuse

🎯 Best Practices

  • Run with minimal required permissions
  • Use dedicated user account for production deployments
  • Monitor resource usage and set appropriate limits
  • Regularly update dependencies for security patches

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

🛠️ Development Setup

# Clone and setup
git clone https://github.com/Puneet8800/claude-auto-documenter-v2.git
cd claude-auto-documenter-v2
npm install
pip install -r requirements.txt

# Start development server
npm run dev

# Run tests
npm test

📏 Code Standards

  • 🟢 JavaScript: ES2022+ with Node.js modules
  • 🐍 Python: PEP 8 compliance with type hints
  • 📚 Documentation: JSDoc and docstrings where applicable
  • 🧪 Testing: Basic test coverage included

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • 🎯 Anthropic: For Claude and the Model Context Protocol
  • ⚡ Claude Code Team: For the excellent development environment
  • 🌐 MCP Community: For standards and best practices
  • 👥 Contributors: See CONTRIBUTORS.md for the full list

📞 Support


Made with ❤️ by the Claude Mechanics Master

Empowering developers with AI-assisted documentation automation