MCP ExplorerExplorer

Mcp Server Project Documenter

@michaelwybraniecon 13 days ago
1 MIT
FreeCommunity
AI Systems
A project documenter MCP Server

Overview

What is Mcp Server Project Documenter

mcp-server-project-documenter is an MCP server designed to automatically generate documentation for software projects, particularly focusing on creating detailed README.md files.

Use cases

Use cases include generating documentation for new software projects, updating existing README.md files, assessing the quality of documentation, and automating the documentation process in CI/CD pipelines.

How to use

To use mcp-server-project-documenter, clone the repository, install the dependencies using npm, and follow the provided instructions to generate project documentation.

Key features

Key features include automated generation of project.md files, comprehensive README.md creation, README quality assessment tools, flexible updates for existing README.md content, and smart Git integration that respects .gitignore rules.

Where to use

mcp-server-project-documenter can be used in software development environments where documentation is crucial, such as open-source projects, team collaborations, and individual software development.

Content

ProjectDocumenter

Description

ProjectDocumenter is an MCP (Model Context Protocol) server designed to automatically generate documentation, specifically focusing on creating detailed README.md files for software projects. It works by first creating a project.md file that summarizes the codebase, and then uses this summary to generate a comprehensive README.md.

Features

  • Automated project.md Generation: Automatically creates a project.md file summarizing all relevant code files in a project, respecting .gitignore rules.
  • Comprehensive README.md Creation: Generates a detailed and well-structured README.md based on the project’s codebase, following modern documentation standards.
  • README Quality Assessment: Provides tools to assess the quality of existing README.md files against best practices.
  • Flexible Updates: Allows for updating existing README.md content programmatically.
  • Git Integration: Smartly ignores files and directories specified in .gitignore to ensure only relevant code is documented.

Owner and Maintainer

Michael Wybraniec (ONE-FRONT)

Technologies Used

  • Node.js: The runtime environment for the server.
  • TypeScript: The primary language for the server code.
  • @modelcontextprotocol/sdk: The SDK used to build the MCP server.
  • Zod: A TypeScript-first schema declaration and validation library.
  • Express: A web application framework for Node.js (used by the SDK internally).
  • Other dependencies (as listed in package.json and package-lock.json for various functionalities like file handling, process execution, etc.)

Installation

To set up ProjectDocumenter locally, follow these steps:

  1. Clone the repository (assuming you have the source code):
    git clone <repository_url>
    cd mcp-server-project-documenter
    
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    

Usage

ProjectDocumenter provides tools to help document your projects. The primary way to use it is via the document-project tool through the mcp command or an MCP Inspector.

Documenting a Project

To document a project, use the document-project tool, providing the absolute path to the project directory. This will generate or update project.md and create/update a README.md.

mcp run ProjectDocumenter document-project --projectPath /path/to/your/project

Replace /path/to/your/project with the actual absolute path to the project you want to document.

Generating project.md

You can also generate just the project.md file using the generate-project-md tool:

mcp run ProjectDocumenter generate-project-md --projectPath /path/to/your/project

Updating README.md

If you have existing content for your README or want to manually update it, you can use the update-readme tool:

mcp run ProjectDocumenter update-readme --projectPath /path/to/your/project --content "Your README content here"

Assessing README.md Quality

To get an assessment of your README’s quality based on documentation standards, use the assess-readme-quality tool:

mcp run ProjectDocumenter assess-readme-quality --projectPath /path/to/your/project

Running the Server (for development/testing)

For development or testing, you can start the MCP server directly:

npm start

Or in development mode with automatic recompilation:

npm run dev

Project Structure Overview

  • package.json: Project metadata and dependencies.
  • package-lock.json: Records the exact versions of dependencies.
  • tsconfig.json: TypeScript configuration.
  • src/index.ts: The main server file defining MCP tools, resources, and prompts.
  • project.md: (Generated) A summary of the project’s code.
  • README.md: (Generated/Updated) The project’s documentation file.
  • test-server.sh: A script for building and testing the server using a temporary directory and sample files.

API Documentation

The ProjectDocumenter exposes several tools and resources via the Model Context Protocol:

  • Tools:
    • generate-project-md: Creates or updates project.md.
    • document-project: Generates project.md and a comprehensive README.md.
    • update-readme: Updates or creates README.md with provided content.
    • assess-readme-quality: Reviews the quality of README.md.
  • Resources:
    • project-md: Accesses the content of the project.md file.
    • readme: Accesses the content of the README.md file.
  • Prompts:
    • generate-readme: A prompt definition for generating a README.
    • assess-readme: A prompt definition for assessing a README.

Detailed usage and schema for these tools can be found by inspecting the server using an MCP Inspector tool or referring to the src/index.ts source code.

License

This project is licensed under the MIT License. See the LICENSE file (if present, otherwise inferred from package.json) for details.

Contributing

We welcome contributions to ProjectDocumenter! If you’d like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/your-feature-name or git checkout -b bugfix/issue-description.
  3. Make your changes and ensure your code adheres to the project’s coding standards.
  4. Write clear commit messages.
  5. Test your changes thoroughly.
  6. Submit a Pull Request to the main branch with a clear description of your changes.

Reporting Issues

If you find any bugs or have feature requests, please open an issue on the GitHub repository.

THANK YOU TO THE OPEN SOURCE COMMUNITY

Tools

No tools

Comments