Token导航 LogoToken导航TokenDH.com
AI Readme MCP logo
办公协作未说明官方级别未说明来源级核验

AI Readme MCP

MCP Server

AI_README MCP Server 是一个帮助AI助手理解项目规范的文档管理系统,自动发现、路由和管理AI_README.md文件,确保AI生成的代码符合团队标准。

工具数

6

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude开发工具Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Draco-Cheng

提供方

Draco-Cheng

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

AI_README MCP服务器

一个智能文档系统,帮助人工智能助手理解和遵循项目的惯例

![License: MIT](https://opensource.org/licenses/MIT) ![TypeScript](https://www.typescriptlang.org/) ](https://nodejs.org/)

📑 快速导航

- 克劳德代码 - 对于光标 - - 适用于克劳德桌面 - 对于OpenClaw - 替代安装方法

______________________________________________________________________

📋 概述

AI_README MCP服务器 是一个模型上下文协议(MCP)服务器,通过专用的 AI_README.md 指南文件。它会自动发现、路由和管理这些文件,因此AI可以生成符合团队标准的一致、高质量的代码。

适用于: GitHub Copilot(VSCode 1.102+)、Claude Code、Cursor、OpenClaw和其他兼容MCP的AI工具。

______________________________________________________________________

🎯 问题

在使用AI助手(如Claude、GPT或其他AI编码工具)时,您可能会遇到:

  • 代码风格不一致 -AI生成的代码不符合项目的约定
  • 重复指令 -你必须一遍又一遍地告诉人工智能同样的规则
  • 团队不一致 -不同的团队成员获得不同的AI输出,导致代码质量碎片化
  • 上下文丢失 -AI会忘记项目的具体模式和最佳实践
  • 没有单一的真相来源 -团队惯例存在于Slack消息、PR和人们的头脑中,而不是AI可以使用的格式

💡 解决方案

AI_README.md -专门为AI助手设计的专用指南文件。

把它想象成:

  • 📖 AI在编写代码之前阅读的“风格指南”
  • 🎓 一份“入职文件”,向人工智能传授项目的惯例
  • 🔧 代码库中AI行为的“配置文件”
  • 🤝 A. “团队合同” 确保每个开发人员的AI助手都遵循相同的标准

运作原理

  1. 创建 AI_README.md 项目中的文件(根目录或特定目录)
  2. 文件 您的约定:编码标准、架构模式、命名规则、测试要求
  3. 承诺使用git -与整个团队分享惯例
  4. AI自动读取 在做出改变之前,确保每个团队成员的AI都遵循相同的规则
  5. 保持同步 -AI可以随着项目的进展更新README

此MCP服务器的功能

此MCP(模型上下文协议)服务器自动化了整个工作流程:

  • 🔍 自动发现 项目中的所有AI_README.md文件
  • 🎯 路线背景 -AI获得了它正在编辑的代码的最相关的README
  • 🚀 引导式初始化 - init_ai_readme 扫描空文件并引导AI进行填充
  • ✏️ 自动更新 -AI可以在编码时添加新的约定
  • 验证质量 -确保自述文件简洁明了,并针对人工智能消费进行了优化

结果: 项目中的每个AI交互都遵循团队的标准,并生成一致的高质量代码。

______________________________________________________________________

✨ 特性

  • 🔍 自动发现 -扫描并索引项目中的所有AI_README.md文件
  • 🎯 智能上下文路由 -根据文件路径查找相关的README内容
  • 🤝 团队一致性 -每个团队成员的AI助手都从git中读取相同的约定,确保统一的代码质量
  • 🚀 引导式初始化 - init_ai_readme 该工具扫描空文件并引导AI完成填充
  • 🔄 更新和同步 -AI可以读取和更新AI_README文件
  • 验证和质量 -确保README与令牌限制和结构检查保持一致
  • 🗜️ 自动压缩 - compress_ai_readme 自动删除填充语言和冗长短语,在不丢失信息的情况下减少令牌占用空间
  • 🏗️ Monorepo支持 -将AI_README.md文件放置在不同的文件夹级别;该工具会自动查找并使用最相关的工具
  • 📦 易于集成 -与Cursor、Claude Code和其他MCP客户端无缝协作

______________________________________________________________________

🚀 安装和设置

克劳德代码(VSCode扩展)

💡 型号推荐: 为了获得最佳体验,请使用具有更强指令跟踪能力和更可靠触发MCP工具的较大型号(Sonnet或Opus)。像Haiku这样的小型模型可能不会在适当的时候一致地调用这些工具。

步骤1:添加MCP服务器

在项目目录中,运行:

claude mcp add --scope project ai-readme-manager npx -- ai-readme-mcp@latest

这创建了一个 .mcp.json 使用的文件 npx 运行该包-无需安装或路径配置!

步骤2:启用Project MCP服务器

创建或编辑 .claude/settings.local.json 在您的项目中:

{
  "enableAllProjectMcpServers": true
}

步骤3:自动批准MCP工具(可选但推荐)

为了避免每次出现“是/否”提示并启用“是,不再询问”选项,请将这些工具添加到您的允许列表中。

.claude/settings.local.json,添加:

{
  "permissions": {
    "allow": [
      "mcp__ai-readme-manager__discover_ai_readmes",
      "mcp__ai-readme-manager__get_context_for_file",
      "mcp__ai-readme-manager__update_ai_readme",
      "mcp__ai-readme-manager__validate_ai_readmes",
      "mcp__ai-readme-manager__init_ai_readme",
      "mcp__ai-readme-manager__compress_ai_readme"
    ]
  },
  "enableAllProjectMcpServers": true
}
注: 如果没有此配置,每次Claude使用这些工具时都会提示您批准,并且不会出现“不再询问”选项。

步骤4:验证安装

claude mcp get ai-readme-manager

你应该看看 Status: ✓ Connected

步骤5:添加 CLAUDE.md 说明

将以下内容添加到您的项目中 CLAUDE.md 确保Claude在执行每个代码任务之前始终调用MCP工具:

## MCP: ai-readme-manager
Before any code-related task, ALWAYS call `mcp__ai-readme-manager__get_context_for_file(projectRoot, path)` first.
If `get_context_for_file` reports empty or missing AI_README files, call `mcp__ai-readme-manager__init_ai_readme(projectRoot)` to initialize them.
If the user's request or your plan conflicts with AI_README conventions (including during planning), STOP and call `mcp__ai-readme-manager__update_ai_readme` to resolve the conflict before proceeding.
When establishing new conventions or making architectural decisions, call `mcp__ai-readme-manager__update_ai_readme` to record them.
If AI_README is missing a convention that is already used in 2+ files, call `mcp__ai-readme-manager__update_ai_readme` to record it.
NEVER edit AI_README.md files directly with Write/Edit/other file-editing tools — always use `mcp__ai-readme-manager__update_ai_readme`. Direct edits bypass validation, conflict detection, and quality scoring.
为什么这很重要: 没有 CLAUDE.md,Claude可能会跳过调用MCP工具,导致它生成忽略项目约定的代码。此步骤对于可靠的工具触发至关重要。

对于光标

添加到Cursor的MCP配置文件中:

  • 窗户: %APPDATA%\Cursor\User\mcp.json
  • macOS/Linux: ~/.cursor/mcp.json
{
  "mcpServers": {
    "ai-readme-manager": {
      "command": "npx",
      "args": ["ai-readme-mcp@latest"]
    }
  }
}

配置后,完全重新启动Cursor。

添加 AGENTS.md 说明

将以下内容添加到您的项目中 AGENTS.md 确保Cursor在执行每个代码任务之前始终使用MCP工具:

## MCP: ai-readme-manager
Before any code-related task, ALWAYS call `get_context_for_file(projectRoot, path)` first.
If `get_context_for_file` reports empty or missing AI_README files, call `init_ai_readme(projectRoot)` to initialize them.
If the user's request or your plan conflicts with AI_README conventions (including during planning), STOP and call `update_ai_readme` to resolve the conflict before proceeding.
When establishing new conventions or making architectural decisions, call `update_ai_readme` to record them.
If AI_README is missing a convention that is already used in 2+ files, call `update_ai_readme` to record it.
NEVER edit AI_README.md files directly with Write/Edit/other file-editing tools — always use `update_ai_readme`. Direct edits bypass validation, conflict detection, and quality scoring.

适用于GitHub Copilot(VSCode 1.102+)

要求:

  • VSCode 1.102或更高版本
  • 已安装GitHub Copilot和Copilot聊天扩展

选项1:使用VSCode设置UI

  1. 打开VSCode设置(Ctrl+,)
  2. 搜索“MCP”
  3. 点击“在settings.json中编辑”
  4. 添加MCP服务器配置

选项2:手动配置

添加到您的VSCode settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "ai-readme-manager": {
      "command": "npx",
      "args": ["ai-readme-mcp@latest"]
    }
  }
}

配置后,重新启动VSCode,您将在GitHub Copilot Chat中看到可用的MCP工具!

添加 .github/copilot-instructions.md 说明

创建 .github/copilot-instructions.md 在您的项目中,确保Copilot在执行每个代码任务之前始终使用MCP工具:

## MCP: ai-readme-manager
Before any code-related task, ALWAYS call `get_context_for_file(projectRoot, path)` first.
If `get_context_for_file` reports empty or missing AI_README files, call `init_ai_readme(projectRoot)` to initialize them.
If the user's request or your plan conflicts with AI_README conventions (including during planning), STOP and call `update_ai_readme` to resolve the conflict before proceeding.
When establishing new conventions or making architectural decisions, call `update_ai_readme` to record them.
If AI_README is missing a convention that is already used in 2+ files, call `update_ai_readme` to record it.
NEVER edit AI_README.md files directly with Write/Edit/other file-editing tools — always use `update_ai_readme`. Direct edits bypass validation, conflict detection, and quality scoring.

适用于Claude桌面应用程序

添加 claude_desktop_config.json:

  • 窗户: %APPDATA%\claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/config.json
  • Linux: ~/.config/claude/config.json
{
  "mcpServers": {
    "ai-readme-manager": {
      "command": "npx",
      "args": ["ai-readme-mcp@latest"]
    }
  }
}

添加 CLAUDE.md 说明

将以下内容添加到您的项目中 CLAUDE.md 确保Claude Desktop在执行每个代码任务之前始终使用MCP工具:

## MCP: ai-readme-manager
Before any code-related task, ALWAYS call `get_context_for_file(projectRoot, path)` first.
If `get_context_for_file` reports empty or missing AI_README files, call `init_ai_readme(projectRoot)` to initialize them.
If the user's request or your plan conflicts with AI_README conventions (including during planning), STOP and call `update_ai_readme` to resolve the conflict before proceeding.
When establishing new conventions or making architectural decisions, call `update_ai_readme` to record them.
If AI_README is missing a convention that is already used in 2+ files, call `update_ai_readme` to record it.
NEVER edit AI_README.md files directly with Write/Edit/other file-editing tools — always use `update_ai_readme`. Direct edits bypass validation, conflict detection, and quality scoring.

对于OpenClaw

非常适合vibe编码/迭代式AI开发 --OpenClaw用户经常在紧密的循环中运行AI代理来构建或重构代码。如果没有持久的上下文,每次迭代都有打破前几轮约定的风险。 ai-readme-mcp 为您的代理提供跨每个循环的项目规则的稳定内存。

选项1:CLI(推荐)

openclaw mcp set ai-readme-manager '{"command":"npx","args":["ai-readme-mcp@latest"]}'

选项2:直接编辑配置文件

添加 ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "ai-readme-manager": {
        "command": "npx",
        "args": ["ai-readme-mcp@latest"]
      }
    }
  }
}

配置后,重新启动OpenClaw以加载新的MCP服务器。通过以下方式进行验证:

openclaw mcp list

添加技能说明

为了确保OpenClaw的代理在每次代码更改之前始终阅读项目约定,请在您的技能或系统提示中添加以下内容:

## MCP: ai-readme-manager
Before any code-related task, ALWAYS call `get_context_for_file(projectRoot, path)` first.
If `get_context_for_file` reports empty or missing AI_README files, call `init_ai_readme(projectRoot)` to initialize them.
If the user's request or your plan conflicts with AI_README conventions (including during planning), STOP and call `update_ai_readme` to resolve the conflict before proceeding.
When establishing new conventions or making architectural decisions, call `update_ai_readme` to record them.
为什么这对迭代代理很重要: 在代理循环中,每次迭代都是一个新的上下文。没有 AI_README.md,代理对前几轮的决策没有记忆,导致风格漂移、模式冲突和回归。 ai-readme-mcp 充当持久内存层,使每个循环都以相同的约定为基础。

替代安装方法

上述方法使用 npx (推荐)。如果您喜欢其他方法,可以在MCP配置文件中使用这些配置:

  • 克劳德代码: .mcp.json (项目根)
  • 光标: %APPDATA%\Cursor\User\mcp.json (Windows)或 ~/.cursor/mcp.json (macOS/Linux)
  • 克劳德桌面: claude_desktop_config.json (见上文路径)

选项1:使用npx(推荐)

无需安装!只需通过npx配置和使用:

{
  "mcpServers": {
    "ai-readme-manager": {
      "command": "npx",
      "args": ["ai-readme-mcp@latest"]
    }
  }
}
-y flag自动接受npx提示。这 @latest 确保您始终获得最新版本。

选项2:全局安装

全局安装一次,随处使用:

npm install -g ai-readme-mcp@latest

然后配置:

{
  "mcpServers": {
    "ai-readme-manager": {
      "command": "ai-readme-mcp"
    }
  }
}
赞成的意见: 更快的启动(无npx下载)。 欺骗: 新版本发布时需要手动更新。
别忘了: 配置MCP服务器后,添加AI工具的说明文件——请参阅上面特定客户端的设置部分(CLAUDE.md, AGENTS.md,或 .github/copilot-instructions.md).

______________________________________________________________________

🚀 快速开始

使用 init_ai_readme 自动扫描和填充空AI_README文件的工具:

第一步: 在需要的地方创建空的AI_README.md文件

# Example: Create empty AI_READMEs in different directories
touch AI_README.md
touch apps/backend/AI_README.md
touch apps/frontend/AI_README.md

第二步: 触发初始化

在您的AI助手(Claude Code、Cursor等)中,只需说:

“请为此项目使用init_ai_reme MCP工具”

发生了什么:

  • 🔍 扫描项目中的空AI_README文件
  • 📝 如果不存在,则创建根级别AI_README
  • 📋 为每个文件提供详细的分步说明
  • 🤖 AI助手将:

- 浏览相关目录 - 分析你的代码库(技术栈、模式、约定) - 用相关文档填充每个AI_README

何时使用 init_ai_readme:

  • 首次在项目中设置AI_README
  • 在子目录中创建新的空AI_README.md文件后
  • get_context_for_file 检测空的AI_README文件
  • 批量处理多个空AI_README文件

______________________________________________________________________

✏️ 手动创建和编辑

您始终可以自己创建和编辑AI_README.md文件- 无需工具。没有所需的格式;AI将其视为纯文本,所以即使是一行也可以!

这是您的项目文档。无论您是第一次设置、添加新的约定还是更正AI编写的内容,都可以随时对其进行编辑。

完美运行的简单示例:

Never use emoji in code or comments.
Use Tailwind CSS, not inline styles.
Always use TypeScript strict mode.
This is a Next.js 14 app with App Router.
Use server components by default.
Database: Prisma + PostgreSQL.

重点: 写任何有助于AI理解你的偏好的东西。几个清晰的句子往往比冗长的文件要好。

最佳实践:

  • 保持简洁(\ 使用验证和压缩所有AI_README文件 validate_ai_readmescompress_ai_readme.

AI将自动运行整个循环: validate_ai_readmescompress_ai_readme (模拟运行预览)→ 应用→ 重新验证。

______________________________________________________________________

多级AI_README(不仅适用于Monoreps!)

此工具的强大功能是多级文档 -不仅对Monoreps,而且对 任何项目 希望按模块或功能组织约定。

为什么是多层次?

  • 🎯 避免冗余的根README -保持每个README的重点和简洁
  • 📍 精确的上下文 -AI只获得其正在处理的代码的相关约定
  • 🔧 灵活的组织 -按功能、模块或任何有意义的结构组织

简单地点 AI_README.md 不同文件夹级别的文件:

my-monorepo/
├── AI_README.md                    # Root-level conventions (applies to all)
├── apps/
│   ├── frontend/
│   │   ├── AI_README.md           # Frontend-specific conventions
│   │   └── src/components/Button.tsx
│   └── backend/
│       ├── AI_README.md           # Backend-specific conventions
│       └── src/api/users.ts
└── packages/
    └── shared/
        ├── AI_README.md           # Shared library conventions
        └── src/utils.ts

智能清空README处理:

  • 📝 创建空 AI_README.md 需要特定约定的子目录中的文件
  • 🚀 跑 init_ai_readme 工具(只需告诉您的AI:“请初始化AI_README文件”)
  • 🤖 AI自动分析每个目录并填充约定
  • 🔗 对于具有父README的子目录,生成差异内容(仅特定于模块的约定)
  • 📋 对于根目录,生成完整的项目分析

当AI处理文件时,它会自动得到:

  • 最相关 AI_README(最近的父目录)
  • 加上 根水平 AI_README(适用于整个项目的标准)

例如,编辑时 apps/frontend/src/components/Button.tsx:

  • ✅ 得到 apps/frontend/AI_README.md (React组件标准)
  • ✅ 获取root AI_README.md (项目范围的Git,测试约定)

测试集成

重启IDE,然后询问AI助手:

“我即将创建一个新组件。我应该遵循哪些约定?”

AI将自动检索您的AI_README上下文!

有关详细的设置说明,请参阅 快速入门指南.

______________________________________________________________________

🏗️ 项目结构

ai-readme-mcp/
├── src/
│   ├── index.ts           # MCP Server entry point
│   ├── tools/             # MCP Tools implementation
│   ├── core/              # Core logic (scanner, router, updater)
│   ├── types/             # TypeScript type definitions
│   └── utils/             # Utility functions
├── tests/
│   ├── unit/              # Unit tests
│   ├── integration/       # Integration tests
│   └── fixtures/          # Test fixtures
└── docs/                  # Documentation

🛠️ 发展

先决条件

  • Node.js 18+
  • npm/pnpm/纱线
  • TypeScript 5+

设置

# Clone the repository
git clone https://github.com/Draco-Cheng/ai-readme-mcp.git
cd ai-readme-mcp

# Install dependencies
npm install

# Run type checking
npm run typecheck

# Run tests
npm test

# Build the project
npm run build

# Development mode with watch
npm run dev

本地开发配置

如果您正在开发或修改源代码,请将MCP客户端配置为使用本地版本:

对于Claude Code-使用CLI添加:

# Linux/macOS:
claude mcp add --transport stdio ai-readme-manager --scope project -- node ~/ai-readme-mcp/dist/index.js

# Windows:
claude mcp add --transport stdio ai-readme-manager --scope project -- node C:\Users\YourName\ai-readme-mcp\dist\index.js

克劳德代码-手册 .mcp.json:

{
  "mcpServers": {
    "ai-readme-manager": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/ai-readme-mcp/dist/index.js"]
    }
  }
}

对于Cursor或Claude桌面:

{
  "mcpServers": {
    "ai-readme-manager": {
      "command": "node",
      "args": ["/absolute/path/to/ai-readme-mcp/dist/index.js"]
    }
  }
}

路径示例:

  • 窗户: "C:\\Users\\YourName\\ai-readme-mcp\\dist\\index.js" (使用 \\ 逃跑)
  • macOS/Linux: "/home/username/ai-readme-mcp/dist/index.js"

______________________________________________________________________

📚 文档

______________________________________________________________________

🛠️ 可用的MCP工具

discover_ai_readmes

扫描您的项目并发现所有AI_README.md文件。

// Parameters
{
  projectRoot: string;           // Required: Project root directory
  excludePatterns?: string[];    // Optional: Glob patterns to exclude
}

// Returns
{
  projectRoot: string;
  totalFound: number;
  readmeFiles: Array;
  lastUpdated: string;
}

get_context_for_file

获取特定文件路径的相关AI_README上下文。

// Parameters
{
  projectRoot: string;           // Required: Project root directory
  filePath: string;              // Required: File path relative to root
  includeRoot?: boolean;         // Optional: Include root README (default: true)
  excludePatterns?: string[];    // Optional: Glob patterns to exclude
}

// Returns
{
  filePath: string;
  totalContexts: number;
  contexts: Array;
  formattedPrompt: string;       // Ready-to-use formatted context
}

update_ai_readme

使用指定的操作更新AI_README.md文件。

// Parameters
{
  readmePath: string;            // Required: Path to AI_README.md file
  operations: Array;
}

// Returns
{
  success: boolean;
  readmePath: string;
  changes: Array;
  summary: string;               // Includes reminder to use git diff
  error?: string;                // Error message if failed
}

注: 更改直接写入文件。使用Git进行版本控制:

  • 审查变更: git diff AI_README.md
  • 撤消更改: git checkout AI_README.md
  • 提交更改: git add AI_README.md && git commit -m "Update AI_README"

**Example Usage:**

// Append new section { readmePath: "apps/frontend/AI_README.md", operations: [{ type: "append", content: "## Performance\n- Use React.memo for expensive components" }] }

// Insert after specific section { readmePath: "AI_README.md", operations: [{ type: "insert-after", section: "## Coding Conventions", content: "### Code Style\n- Use TypeScript strict mode\n- Prefer const over let" }] }

// Replace specific text { readmePath: "AI_README.md", operations: [{ type: "replace", searchText: "Run tests with npm test", content: "Run tests with: npm test or npm run test:watch" }] }


### `init_ai_readme`

在项目中初始化并填充空的AI_README文件。

// Parameters { projectRoot: string; // Required: Project root directory excludePatterns?: string[]; // Optional: Glob patterns to exclude targetPath?: string; // Optional: Specific directory to initialize }

// Returns { success: boolean; message: string; readmesToInitialize: string[]; // Paths to empty AI_README files instructions: string; // Detailed step-by-step guide for populating }


**特征:**

- 🔍 扫描项目以查找空的或丢失的AI_README文件
- 📝 如果不存在,则创建根级别AI_README
- 📋 为每个文件生成详细的分步说明
- 🎯 可以针对特定目录 `targetPath` 参数
- 🤖 通过分析引导人工智能:技术栈、模式、惯例

**示例用法:**

// Initialize all empty AI_READMEs in project { projectRoot: "/path/to/project" }

// Initialize only in specific directory { projectRoot: "/path/to/project", targetPath: "apps/backend" }


**典型工作流程:**

1. AI助手运行 `init_ai_readme`
1. 接收每个空文件的详细说明
1. 遵循说明:
   - 用途 `Glob` 扫描目录
   - 读取2-5个关键源文件
   - 分析技术栈、模式、惯例
1. 用途 `update_ai_readme` 填充每个文件
1. 与验证 `get_context_for_file` 或 `validate_ai_readmes`

### `validate_ai_readmes`

验证项目中的所有AI_README.md文件的质量和令牌效率。

// Parameters { projectRoot: string; // Required: Project root directory excludePatterns?: string[]; // Optional: Glob patterns to exclude config?: { // Optional: Custom validation config maxTokens?: number; rules?: { requireH1?: boolean; requireSections?: string[]; allowCodeBlocks?: boolean; maxLineLength?: number; }; tokenLimits?: { excellent?: number; // Default: 200 good?: number; // Default: 400 warning?: number; // Default: 600 error?: number; // Default: 1000 }; }; }

// Returns { valid: boolean; totalFiles: number; results: Array; summary: string; }


**验证功能**:

- 用于AI消费优化的令牌计数
- 结构验证(H1标题、章节)
- 行长度检查(默认值:100个字符)
- 代码块检测(严格模式下默认禁用)
- 基于令牌计数的质量评级

**默认令牌限制(严格模式)**:

- 🌟 优秀:\1000个代币

### `compress_ai_readme`

使用确定性填充语言删除压缩AI_README.md文件。无需LLM调用——纯正则表达式转换。

// Parameters { readmePath: string; // Required: Absolute path to AI_README.md file dryRun?: boolean; // Optional: Preview changes without writing (default: false) }

// Returns { success: boolean; readmePath: string; summary: string; // Human-readable summary with token diff tokensBefore: number; tokensAfter: number; reductionPercent: number; changes: Array; written: boolean; // false if dryRun or no changes found }


**它删除了什么(仅限散文——代码块从未被触及):**

- 填充词: `just`, `really`, `basically`, `actually`, `simply`, `essentially`
- 详细短语: `in order to` → `to`, `utilize` → `use`, `make sure to` → `ensure`
- 套期保值: `you should`, `remember to`, `it might be worth`, `please note that`
- 绒毛连接物: `furthermore`, `additionally`, `in addition`, `moreover`

**输出可能包含句子片段——这是有意的。** 令牌高效格式适用于AI_README文件。

**典型工作流程:**

1. 跑 `validate_ai_readmes` --注意任何 `filler-language` 警告
1. 跑 `compress_ai_readme` 随着 `dryRun: true` 预览
1. 再次运行无 `dryRun` 应用
1. 重新运行 `validate_ai_readmes` 确认改进

______________________________________________________________________

## 🚀 接下来是什么

我们正在积极开发新功能:

- **自动填充空AI_README** -在以下情况下自动生成AI_README内容 `get_context_for_file` 检测空文件,减少手动初始化步骤
- **增强工具触发** -~~Claude 4.6+通过延迟工具加载解决方法 `CLAUDE.md` (见上述步骤4)~~✅ 已解决:添加 `CLAUDE.md` 到您的项目根目录
- **CI/CD集成** -GitHub自动README验证操作
- **VSCode扩展** -具有可视化UI的本地VSCode扩展,用于管理AI_README文件,与当前的MCP服务器一起提供更集成的体验

想贡献吗?查看我们的 [贡献指南](./CONTRIBUTING.md)!

______________________________________________________________________

## 🤝 贡献

欢迎投稿!请随时提交拉取请求。

## 📄 许可证

此项目根据MIT许可证获得许可-请参阅 [许可证](LICENSE) 文件以获取详细信息。

## 🔗 相关资源

- [模型上下文协议规范](https://spec.modelcontextprotocol.io/)
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
- [克劳德代码MCP文档](https://docs.claude.com/en/docs/claude-code/mcp)

## 📧 联系

- GitHub问题:https://github.com/Draco-Cheng/ai-readme-mcp/issues
- 项目链接:https://github.com/Draco-Cheng/ai-readme-mcp

目录标签

目录标签

TypeScriptClaude开发工具AI文档管理本地部署代码规范团队协作自动化工具开发效率

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP