UNPKG

project-docs-mcp

Version:

MCP (Model Context Protocol) for generating detailed project documentation with Cursor

133 lines (98 loc) 3.73 kB
# project-docs-mcp MCP (Model Context Protocol) for generating automatic and detailed project documentation directly with AI, including code-level analysis. ## Description This project implements an MCP (Model Context Protocol) that defines a communication protocol for AI models like Claude to generate complete and technically detailed project documentation. The model uses this protocol directly when asked to document a project, analyzing both the overall structure and code-level details. ## Installation To install this MCP globally: ```bash npm install -g project-docs-mcp ``` ## Cursor Configuration To configure Cursor, edit the `~/.cursor/mcp.json` file and add: ```json "project-docs": { "command": "npx", "args": ["project-docs-mcp-server"], "runtime": "node" } ``` ## How to Use this MCP Once configured, simply ask the AI in Cursor to use the MCP with a command like: ``` Use the MCP project-docs to generate documentation for this project ``` Or more specifically: ``` Generate complete documentation for this project following the MCP project-docs ``` ## Usage Examples ### Basic Usage ``` Use the MCP project-docs to generate documentation for this project ``` ### Intermediate Usage ``` Use the MCP project-docs to generate documentation with specific focus on the API and component structure ``` ### Advanced Usage ``` Use the MCP project-docs to analyze this Node.js project and generate comprehensive documentation that includes detailed API reference, architectural diagrams, data flow explanations, and code examples for each main function ``` ### Expert Usage ``` Use the MCP project-docs to create detailed technical documentation for this project with emphasis on the authentication flow, database schema relationships, API endpoints with request/response examples, error handling strategies, and performance optimization techniques. Include sequence diagrams for critical processes and document all environment configuration options ``` ### Language-Specific Usage ``` Use the MCP project-docs with parameters --lang=es to generate documentation in Spanish with detailed explanations of the project architecture ``` ### Focused Documentation ``` Use the MCP project-docs to generate documentation focusing exclusively on the authentication module, including all functions, variables, security measures, and integration points with other parts of the application ``` ## Supported Languages The MCP currently supports the following languages: - Spanish (es) - Default - English (en) - French (fr) - Portuguese (pt) - German (de) To specify a language: ```json "project-docs": { "command": "npx", "args": ["project-docs-mcp-server", "--lang=en"], "runtime": "node" } ``` ## How the MCP Works The MCP guides the model through a systematic documentation process: 1. Analyze project structure 2. Identify components 3. Analyze execution and data flows 4. Document functions and methods 5. Document variables and data structures 6. Identify design patterns 7. Generate architecture diagrams 8. Document installation process 9. Document usage instructions 10. Document testing strategies 11. Compile all information into a cohesive document ## Output Format The documentation includes these sections: - Project title and description - Architectural overview - Main components - Detailed code documentation - Data and execution flows - Installation instructions - Usage guide - Project structure - Diagrams - API documentation (if applicable) - Testing information - License details ## For Developers To modify this MCP, edit the `project-docs-mcp.json` file to customize the protocol steps, prompts, and output format. ## License This project is under the MIT License.