README Generator MCP Server
π Description
A Model Context Protocol (MCP) server that enables LLMs to automatically analyze project structures and generate comprehensive, well-formatted README files. This server provides intelligent project analysis, technology detection, and README generation capabilities that help developers quickly create professional documentation.
π οΈ Technologies Used
Node.js
TypeScript
MCP SDK (@modelcontextprotocol/sdk)
β¨ Features
Automatic Technology Detection: Identifies Node.js, TypeScript, Python, Rust, Go, Java, Docker, and more
Smart Project Analysis: Extracts metadata from package.json, dependencies, scripts, and configuration files
Directory Structure Scanning: Recursive traversal with configurable depth and intelligent ignore patterns
Rich README Generation: Creates professional READMEs with badges, emojis, proper sections, and code blocks
Flexible Template System: Predefined structure with required and optional sections
Multi-language Support: Works with various programming languages and frameworks
π¦ Installation
π§ Setup
1. Build the server
2. Configure Claude Desktop
Add this server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
3. Restart Claude Desktop
After adding the configuration, restart Claude Desktop to load the MCP server.
Claude Code CLI
To add this MCP server to Claude Code CLI:
Replace <path-to-project> with the absolute path to this MCP server.
Scope options:
--scope user: Available in all your projects (recommended)--scope project: Shared with everyone in the project via.mcp.json--scope local: Only for the current project
Useful commands:
Gemini CLI
To add this MCP server to Gemini CLI, edit the configuration file:
File location: ~/.config/gemini/settings.json
Add the server configuration:
Replace <path-to-project> with the absolute path to this MCP server.
Alternative with TypeScript (development mode):
π Usage
Available Scripts
Compiles TypeScript and makes the output executable
Watches for changes and recompiles automatically
Runs build automatically before npm publish
Available MCP Tools
The server provides four tools for LLMs:
1. read_project_structure
Reads the directory structure of a project and returns a tree-like structure.
Example:
2. read_file
Reads the contents of a specific file.
Example:
3. analyze_project
Analyzes a project directory and returns structured data including detected technologies, dependencies, scripts, and directory structure.
Example:
4. generate_readme
Automatically generates a complete, professional README.md file for a project.
Example:
π‘ Usage Examples
Quick README Generation
Once the MCP server is configured in Claude Desktop, simply ask:
The server will:
Analyze the project directory
Detect technologies (Node.js, Python, Rust, etc.)
Extract metadata from configuration files
Generate a professional README with appropriate sections
Detailed Project Analysis
For more control over the process:
Review the analysis, then request:
Step-by-Step Workflow
For complex projects requiring customization:
Explore the structure:
"Read the project structure of /home/user/my-app with depth 4"Review specific files:
"Read the package.json and show me the available scripts"Get comprehensive analysis:
"Analyze the entire project and tell me what technologies you detected"Generate customized README:
"Create a README with extra focus on the testing and contribution guidelines"
Real-World Example
The generated README will automatically include:
Proper badges for TypeScript, Node.js, etc.
Installation instructions based on package.json
All available npm scripts with descriptions
Project structure visualization
Dependencies and dev dependencies
API usage examples (if detected)
Docker deployment instructions (if Dockerfile exists)
π Project Structure
π¨ Customization
Modify the README Template
Edit the README_TEMPLATE in src/index.ts:12-66 to customize sections:
Add Technology Detection
Extend the analyzeProject function in src/index.ts:126-214 to detect additional frameworks:
After making changes, rebuild:
π Dependencies
@modelcontextprotocol/sdk
π§ Dev Dependencies
@types/node
typescript
π How It Works
Project Scanning: Recursively reads the project directory (ignoring node_modules, .git, dist, build)
Technology Detection: Identifies technologies based on config files (package.json, tsconfig.json, Cargo.toml, etc.)
Metadata Extraction: Pulls information from package.json including scripts, dependencies, author, license
Template Application: Uses a predefined template structure with required and optional sections
README Generation: Creates a formatted README with badges, proper sections, code blocks, and professional styling
π€ Contributing
Contributions are welcome! To contribute:
Fork the repository
Create a feature branch:
git checkout -b feature/my-featureMake your changes and test them
Commit your changes:
git commit -m 'Add my feature'Push to the branch:
git push origin feature/my-featureSubmit a pull request
π License
This project is licensed under the ISC License.
This README was generated using the README Generator MCP Server itself! π
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables LLMs to automatically analyze project structures, detect technologies, and generate comprehensive, professional README documentation files with proper formatting, badges, and sections.