Readme-builder-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Readme-builder-mcp为我的Express项目生成README"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
README.md(中文,更新版)
Readme-builder-mcp
一个基于 Model Context Protocol (MCP) 的“README 生成器”服务器:
提供可在 Trae 等 MCP 客户端中调用的工具;
支持自动扫描项目目录、提取路由与环境变量、汇总脚本与依赖;
一键生成GitHub 风格的 README(中文),并在显式确认后写入磁盘。
⚠️ 默认只读安全:所有写入磁盘的操作都要求
confirm: true才会执行。
目录
Related MCP server: wechat-miniapp-engineering-mcp
功能特性
🧠 Pro 版 README 生成:
generateReadmePro会:递归扫描目录(忽略
node_modules/dist等),生成简洁的项目结构树;基于源码静态匹配提取API 端点(如
app.get('/api')/router.post(...));搜集
.env.example与源码中的process.env.*,罗列环境变量清单;汇总
npm scripts与依赖清单,自动推断特性(Express/Mongoose/JWT 等);可选徽章与目录,输出完整中文 README。
🔒 默认只读: 所有写文件操作必须传入
confirm: true,避免误写入。🧩 MCP 标准: 通过 STDIO 运行,适配支持 MCP 的 IDE / 客户端(如 Trae)。
🧪 Zod 输入参数校验: 工具输入参数全部通过 Zod 校验,类型安全、错误可控。
环境要求
Node.js ≥ 18
推荐包管理器:npm / pnpm / bun(示例以 npm 为主)
快速开始
# 1) 安装依赖
npm i
# 2) 构建 TypeScript
npm run build
# 3) 本地启动(STDIO 模式,不会主动打印界面)
node dist/server.js这是一个 STDIO 服务器:它会在标准输入/输出上等待 MCP 客户端连接。 直接运行看到“没有反应”是正常的——请通过 Trae 等 MCP 客户端来调用它的工具。
在 Trae(或其它 MCP 客户端)中使用
在 Trae 的 MCP 配置中注册该服务器(指向 编译后的 JS):
{ "mcpServers": { "readme-builder": { "command": "node", "args": [ "C\\\\path\\\\to\\\\readme-mcp\\\\dist\\\\server.js" ] } } }Windows 路径建议用双反斜杠;或改用正斜杠。
修改配置后重启 Trae,以加载新 MCP 服务器。
在 Trae 的“工具(Tools)”里选择
readme-builder,即可看到工具列表:detectRepo、generateReadme、generateReadmePro、writeFile。
工具 API
1) detectRepo
读取指定目录的 package.json 并返回关键信息(名称、描述、scripts、dependencies 等)。
输入参数
{ "dir": "C\\\\path\\\\to\\\\your-project" }dir:目标仓库绝对路径(省略则取当前工作目录)。
返回
content[0].text:包含项目信息的 JSON 字符串。
2) generateReadme
基础版 README 生成(标题 + 简介 + 特性),只读返回 Markdown。
输入参数
{
"name": "your-project",
"description": "一句话简介。",
"features": ["要点1", "要点2"]
}返回
content[0].text:Markdown 文本。
3) generateReadmePro
推荐。扫描目录,自动生成GitHub 风格完整 README(中文)。
输入参数(建议最少传 dir 与 description)
{
"dir": "C\\\\path\\\\to\\\\your-project",
"description": "示例 Node.js/Express 项目结构与实践。",
"addBadges": true,
"includeTOC": true,
"maxTreeDepth": 2,
"language": "zh",
"extraFeatures": ["额外功能点(可选)"]
}做的事
读取
package.json(名称、scripts、dependencies、engines、license 等);扫描目录,生成结构树(深度由
maxTreeDepth控制);匹配
app.get/post/.../router.get/post/...识别端点(最多列出 20 条);汇总
.env.example与源码中的process.env.*作为“环境变量”章节;从依赖推断功能点(Express/Mongoose/JWT/bcrypt/morgan 等);
选择性添加徽章/目录,输出完整中文 README。
返回
content[0].text:Markdown 文本。
4) writeFile
写入文件(需要显式确认 confirm: true)。
输入参数
{
"filePath": "C\\\\path\\\\to\\\\your-project\\\\README.md",
"content": "# your-project\n...完整 Markdown...",
"confirm": true
}返回
成功:
已写入:<绝对路径>(<字节数> bytes)若未设置
confirm: true:仅返回预览,不落盘
典型工作流
探测仓库
{ "tool": "detectRepo", "server": "readme-builder", "args": { "dir": "C\\\\path\\\\to\\\\your-project" } }生成 README(Pro 版)
{ "tool": "generateReadmePro", "server": "readme-builder", "args": { "dir": "C\\\\path\\\\to\\\\your-project", "description": "你的项目一句话或一段简介。", "addBadges": true, "includeTOC": true, "maxTreeDepth": 2, "language": "zh" } }写入 README.md(显式确认)
{ "tool": "writeFile", "server": "readme-builder", "args": { "filePath": "C\\\\path\\\\to\\\\your-project\\\\README.md", "content": "<把上一步返回的 Markdown 原文粘这里>", "confirm": true } }
🔐 安全提醒:只有当你明确传
confirm: true时才会真正写入磁盘。
命令行自测(可选)
未接入 Trae 前,你也可以用 MCP 的命令行客户端(选其一)快速验证:
# 列出工具
npx @modelcontextprotocol/client-cli tools list \
--command node \
--args "C:\\path\\to\\readme-mcp\\dist\\server.js"
# 调用 generateReadmePro
npx @modelcontextprotocol/client-cli tools call generateReadmePro \
--input "{\"dir\":\"C\\\\\\\\path\\\\\\\\to\\\\\\\\your-project\",\"description\":\"示例项目。\",\"addBadges\":true,\"includeTOC\":true,\"language\":\"zh\"}" \
--command node \
--args "C:\\path\\to\\readme-mcp\\dist\\server.js"项目结构
src/
server.ts # MCP 服务器入口(含 detectRepo / generateReadme / generateReadmePro / writeFile)
dist/
server.js # 构建后的运行文件(Trae 指向的就是它)
package.json
package-lock.json
tsconfig.json
.gitignore
README.md常见问题
运行
node dist/server.js没反应? 正常。它是 STDIO 服务端,不会主动输出。请用 Trae 或命令行客户端与之通信。Trae 里看不到工具?
确认 MCP 配置指向 dist/server.js(不是
src/server.ts)。重启 Trae。
node -v能在系统 PATH 中执行。
写入失败?
检查是否传了
confirm: true;检查
filePath目录是否存在(本项目会自动mkdir -p);Windows 路径建议用双反斜杠。
API 端点识别不全? 正则仅覆盖常见
app./router.调用,且默认最多展示 20 条。复杂路由(动态加载、框架封装)可能无法静态识别。
贡献
欢迎提 Issue / PR:
新增更多框架的路由识别(如 Koa、Hono、Nest)
扫描更丰富的配置文件(Docker、Compose、CI 等)
生成英文或双语 README
许可证
该项目根据MIT 许可证
Available Tools
4 toolsdetectRepo检测仓库A
读取指定目录的 package.json 并返回关键信息
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently states that the tool reads and returns information, but it omits details about error handling, what 'key information' includes, and whether there are any side effects. This is sufficient for a simple read operation but leaves gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the action and resource. It is concise and contains no extraneous information, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema, so the description should have explained the return values. Saying 'return key information' is vague and does not specify what that information includes (e.g., name, version, scripts). It also lacks details on prerequisites or error behavior. For a tool with only one parameter, more completeness is expected.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate. It clarifies that the 'dir' parameter is the directory whose package.json should be read, giving meaning to an otherwise bare string parameter. This adds significant value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: reading the package.json in a specified directory and returning key information. The verb '读取' (read) and resource 'package.json' make the purpose explicit, and it is clearly distinct from sibling tools like generateReadme or writeFile, which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus the alternatives. It is implied that this tool would be used to gather repo information before generating a README, but no explicit context or exclusions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generateReadme生成 README(只读)C
根据项目信息生成 README Markdown(只读返回)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| features | No | ||
| description | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavior. It highlights that the tool is 'read-only' (只读), meaning it doesn't write files, which is a key safety trait. However, it doesn't describe what the output looks like, whether it analyzes the repository, or any limitations. The description adds some value but lacks rich behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that communicates the core purpose and behavior without extraneous information. It is front-loaded and easy to parse, making it efficient for an AI agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description should provide more context. It does mention read-only return, which hints at the output, but it doesn't explain the role of each parameter or the expected result. The tool is relatively simple, so the description is minimally adequate but leaves gaps in understanding the full behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate by explaining the parameters. It does not. The parameter names (name, features, description) are self-explanatory, but the description adds no meaning beyond the schema itself, providing no guidance on expected formats or how the parameters relate to the generated README.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: generating README Markdown from project information. It uses a specific verb ('generate') and resource ('README Markdown'). However, it doesn't differentiate from sibling tools like generateReadmePro, which might be a more advanced variant, so it loses one point.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as generateReadmePro or writeFile. The read-only hint in the title is helpful but doesn't explicitly state when to prefer this tool or what exclusions apply.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generateReadmePro生成 README(Pro)B
扫描指定目录并生成完整的 GitHub 风格 README(徽章、目录、脚本、结构、路由、环境变量、技术栈等)
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | ||
| name | No | ||
| language | No | ||
| addBadges | No | ||
| includeTOC | No | ||
| description | No | ||
| maxTreeDepth | No | ||
| extraFeatures | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It only lists output content and omits side effects (e.g., whether files are written), required directory access, output format, or error behavior—critical gaps for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundancy, efficiently conveying the tool's core function and key outputs. Every phrase earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 8-parameter tool with no output schema and no annotations, this description is incomplete. It lacks parameter explanations, return value information, usage context, and behavioral details, making it insufficient for reliable invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It indirectly maps some parameters (addBadges, includeTOC) by listing generated sections, but ignores other parameters like dir, name, language, description, maxTreeDepth, and extraFeatures, leaving many unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('扫描' scan) and resource ('指定目录' specified directory) and explicitly lists the generated README sections (badges, TOC, scripts, etc.), clearly distinguishing it from the basic generateReadme sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like generateReadme or writeFile. It does not mention prerequisites, suitability, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
writeFile写文件(需确认)A
confirm=true 才会写入磁盘;否则只返回预览
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| content | Yes | ||
| filePath | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full transparency burden. It discloses the critical behavior that confirm=true is required for disk writes, and that otherwise a preview is returned. This adds significant safety context. It does not detail return values on success or failure, but the key behavioral trait is covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that front-loads the most important information (the confirm gate). No wasted words; every part earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with only three parameters and no output schema. The description clarifies the preview/write behavior, which is the main nuance. It does not state what is returned when confirm=true, but given the simplicity, this is a minor gap. Overall sufficiently complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains the semantics of the confirm parameter, which is the least obvious one (boolean controlling write vs preview). filePath and content are self-explanatory from their names, but the description does not elaborate on them. Partial compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The title '写文件(需确认)' clearly states the tool writes files, and the description specifies the conditional behavior (confirm=true writes to disk, otherwise preview). This distinguishes it from sibling tools like detectRepo and generateReadme, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: set confirm=true to write, otherwise preview. However, it does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or prerequisites. The purpose is clear, but guidance is only implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
detectRepo - First observed
generateReadme - First observed
generateReadmePro - First observed
writeFile
TDQS
There is some overlap between generateReadme and generateReadmePro as both produce README markdown, though one uses provided project info and the other scans the directory. The descriptions help distinguish them, but agents may still be uncertain which to choose. detectRepo and writeFile are clearly distinct.
All tools follow a consistent verb_noun pattern: detectRepo, generateReadme, writeFile, and generateReadmePro. The 'Pro' suffix is a minor variant but does not disrupt the overall naming scheme, making the set predictable and readable.
With 4 tools, the server is well-scoped for its purpose. Each tool covers a necessary step in the README building workflow: analyzing a project, generating a basic or comprehensive README, and writing the output to disk. This is a reasonable and focused set.
The core lifecycle of README generation is covered: detect project info, generate a README, and write it. Minor gaps exist, such as no ability to update an existing README or customize sections further, but these are not essential for the primary goal of generating a README from scratch.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for generating rough-draft project plans from natural-language prompts.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that automatically generates documentation, test plans, and code reviews for code repositories by analyzing directory structures and code files using AI models via OpenRouter API.6Creative Commons Zero v1.0 Universal
- AlicenseBqualityBmaintenanceA Chinese-friendly, locally running MCP server for WeChat Mini Program engineering, helping developers break down ideas into actionable tasks, inspect projects, generate blueprints, and perform security scans.25101MIT
- AlicenseNot gradedqualityDmaintenanceAn open-source MCP server that automates project customization by analyzing your codebase and generating AI-ready configuration files based on industry best practices.21MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that analyzes GitHub repositories and automatically generates README.md files. Supports multiple AI providers and offers web, MCP tool, and n8n workflow modes.1Creative Commons Zero v1.0 Universal
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mingzhu3377/Readme-builder-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server