AI_README MCP Server
About
AI_README MCP Server is a Model Context Protocol (MCP) server that helps AI assistants understand your project conventions through dedicated AI_README.md guide files. It automatically discovers, routes, and manages these files so AI can generate consistent, high-quality code that
Details
- Author
- Draco-Cheng
- Downloads
- 376
- Categories
- Knowledge Base, Developer Tools
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
AI_README MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
{
"mcpServers": {
"ai-readme-manager": {
"command": "npx",
"args": [
"-y",
"ai-readme-mcp@latest"
]
}
}
}
discover_ai_readmes
Scan the project and discover all AI_README.md files. Returns an index of all README files with their paths, scopes, and coverage patterns.
get_context_for_file
ALWAYS CALL THIS FIRST - NO EXCEPTIONS. WHEN TO CALL (check these FIRST before responding): - User asks: optimize, improve, analyze, review, suggest, think, opinion. - User mentions: file name, component name, project, codebase, backend, frontend, infra, devops, CI/CD, docker, config. - User asks: "what can", "what should", "how to", "can you", "help me". - User wants to: create, build, add, implement, setup, configure, deploy, migrate, optimize, refactor, improve, analyze, review, suggest, think, opinion. - User selects an option that leads to code changes (e.g., choosing from a list of approaches). - User says: "next step", "next phase", "next section", "continue", "proceed", "go ahead", "start", "do it", "yes" (confirming action). - Before: Write, Edit, TodoWrite, Bash (for build/deploy), suggesting ANY code changes. - When executing a plan, todo, or multi-phase task: call BEFORE each file modification. - After user approves a plan or todo, call this BEFORE the each Write/Edit. IF ANY ABOVE = TRUE → CALL get_context_for_file IMMEDIATELY. MANDATORY: Call this tool BEFORE every code-related response. CALL EVERY TIME - EVERY response that involves code/suggestions MUST start with get_context_for_file. CALL EVERY TIME - even if you called it earlier in this conversation. CALL EVERY TIME - even if working on the same file. CALL EVERY TIME - even within the same section/phase - multiple calls are expected and correct. CALL EVERY TIME - context may have changed or sub-directories may have additional conventions. CALL EVERY TIME - when user confirms or selects an option that will result in code changes. What this tool does: Gets AI_README context showing project conventions that MUST be followed. Why it matters: - Without: Wrong tech (suggest Tailwind when project uses CSS Modules). - With: Suggestions fit existing codebase perfectly. - During plan/todo/phase execution: Context may differ per directory; call before EACH file change. DETECT CONFLICTS: After reading context, if user wants X but AI_README says Y: - This is ARCHITECTURAL DECISION. - Workflow: get_context → update_ai_readme → get_context → Write/Edit. RECORD DECISIONS: When you make architectural decisions during planning or implementation: - Design patterns, API structure, naming conventions, new abstractions. - Call update_ai_readme to record decisions that affect multiple files. - Future code (yours or others) will follow these recorded conventions.
update_ai_readme
CALL THIS to record DECISIONS and CONVENTIONS. WHEN TO CALL: A. CONFLICT RESOLUTION — STOP IMMEDIATELY when any of these occur: - User says: "don't use X", "use Y instead", "prefer", "switch to". - During planning: user's request or your proposal differs from AI_README conventions. - During planning: user approves a plan that contradicts AI_README. - User overrides a convention mid-task (even casually, e.g. 'just use X here'). - DO NOT continue planning or coding. Call update_ai_readme first, then resume. B. ARCHITECTURAL DECISIONS (during planning/implementation): - You chose a design pattern (e.g., repository pattern, factory, singleton). - You decided on API structure (REST paths, error format, response shape). - You established naming conventions (files, functions, variables). - You created new abstractions (utilities, hooks, services, types). - You set up error handling strategy or validation approach. - You introduced a new dependency or integration pattern. C. IMPLEMENTATION PATTERNS (after writing code): - You created a reusable pattern others should follow. - You established a file/folder structure for a new feature. - You made decisions that affect future development. D. MISSING / UNDOCUMENTED (during get_context or code review): - AI_README is missing a convention that is ALREADY USED in 2+ existing files. - A pattern exists in code but not in AI_README — record it so future code follows it. - Do NOT record one-off choices or speculative future patterns. RULE: If a decision will affect MORE THAN ONE FILE or FUTURE CODE → RECORD IT. WORKFLOW: 1. get_context (read current conventions). 2. Make decision or detect conflict. 3. update_ai_readme (record the decision). 4. Continue with implementation. Content Rules: - Extremely concise (default < 400 tokens; project may set a higher tokenBudget). - Only actionable conventions (tech, naming, patterns, infrastructure patterns, testing patterns). - NO explanations or examples
validate_ai_readmes
Validate all AI_README.md files in a project. Checks token count, structure, and content quality. Returns validation results with suggestions for improvement.
compress_ai_readme
Compress an AI_README.md file using deterministic filler-language removal (no LLM call). WHEN TO CALL: - validate_ai_readmes reports 'filler-language' warnings. - validate_ai_readmes reports token count is too high. - After init_ai_readme, to tighten up generated content. - Any time you want to reduce AI_README token footprint without losing information. WHAT IT DOES (pure text transforms, deterministic): - Removes filler: just, really, basically, actually, simply, essentially - Shortens verbose phrases: 'in order to' → 'to', 'utilize' → 'use', 'make sure to' → 'ensure' - Removes hedging: 'you should', 'remember to', 'it might be worth', 'please note that' - Removes fluff connectives: furthermore, additionally, in addition, moreover - NEVER modifies: code blocks (``` fenced), inline code (`...`), headings, file paths, URLs, commands - Output may contain sentence fragments — this is intentional. Fragments are valid token-efficient format. USE dryRun:true FIRST to preview changes before writing.
init_ai_readme
Initialize and populate empty AI_README files within a project. When to use: - First-time setup when no AI_README exists. - get_context_for_file reports empty or missing AI_README files. - Newly created directories need conventions recorded. - Multiple directories require conventions in one pass. What it does: - Scans for missing or empty AI_README documents. - Creates a root-level AI_README if none is present. - Provides directory-specific prompts to gather conventions. - Guides you through documenting tech stack, patterns, and naming. Workflow: - Call init_ai_readme. - Follow the step-by-step instructions to inspect each directory. - Use update_ai_readme to record the conventions. - Run validate_ai_readmes to check for problems. - Fix any warnings (remove redundant content, add Cross-directory dependencies section). - Re-run get_context_for_file to confirm coverage before coding.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"ai_readme mcp server": {
"ai-readme-manager": {
"command": "npx",
"args": [
"-y",
"ai-readme-mcp@latest"
]
}
}
}
}
McpServers
{
"ai-readme-manager": {
"command": "npx",
"args": [
"-y",
"ai-readme-mcp@latest"
]
}
}
AI_README MCP Server
> A smart documentation system that helps AI assistants understand and follow your project's conventions📑 Quick Navigation
- Installation & Setup - For Claude Code - For Cursor - For GitHub Copilot - For Claude Desktop - For OpenClaw - Alternative Installation Methods - Quick Start - Manual Creation & Editing - Configuration (.aireadme.config.json)
- Validate & Compress AI_README Files
- Multi-Level AI_README
- Available MCP Tools
---
📋 Overview
AI_README MCP Server is a Model Context Protocol (MCP) server that helps AI assistants understand your project conventions through dedicatedAI_README.md guide files. It automatically discovers, routes, and manages these files so AI can generate consistent, high-quality code that matches your team's standards.
Works with: GitHub Copilot (VSCode 1.102+), Claude Code, Cursor, OpenClaw, and other MCP-compatible AI tools.
---
🎯 The Problem
When working with AI assistants (like Claude, GPT, or other AI coding tools), you've probably experienced: - ❌ Inconsistent code style - AI generates code that doesn't match your project's conventions - ❌ Repeated instructions - You have to tell the AI the same rules over and over - ❌ Team inconsistency - Different team members get different AI outputs, leading to fragmented code quality - ❌ Context loss - AI forgets your project's specific patterns and best practices - ❌ No single source of truth - Team conventions exist in Slack messages, PRs, and people's heads, not in a format AI can use💡 The Solution
AI_README.md - A dedicated guide file specifically designed for AI assistants to read. Think of it as: - 📖 A "style guide" that AI reads before writing code - 🎓 An "onboarding document" that teaches AI your project's conventions - 🔧 A "configuration file" for AI behavior in your codebase - 🤝 A "team contract" that ensures every developer's AI assistant follows the same standardsHow It Works
1. CreateAI_README.md files in your project (root or specific directories)
2. Document your conventions: coding standards, architecture patterns, naming rules, testing requirements
3. Commit to git - Share conventions with your entire team
4. AI reads it automatically before making changes - ensuring every team member's AI follows the same rules
5. Keep it in sync - AI can update the README as your project evolves
What This MCP Server Does
This MCP (Model Context Protocol) server automates the entire workflow: - 🔍 Auto-discovers all AI_README.md files in your project - 🎯 Routes context - AI gets the most relevant README for the code it's editing - 🚀 Guided initialization -init_ai_readme scans for empty files and guides AI through population
- ✏️ Updates automatically - AI can add new conventions it discovers while coding
- ✅ Validates quality - Ensures READMEs are concise and optimized for AI consumption
Result: Every AI interaction in your project follows your team's standards and produces consistent, high-quality code.
---
✨ Features
- 🔍 Automatic Discovery - Scan and index all AI_README.md files in your project - 🎯 Smart Context Routing - Find relevant README content based on file paths - 🤝 Team Consistency - Every team member's AI assistant reads the same conventions from git, ensuring uniform code quality - 🚀 Guided Initialization -init_ai_readme tool scans for empty files and guides AI through population
- 🔄 Update & Sync - AI can both read and update AI_README files
- ✅ Validation & Quality - Ensure README consistency with token limits and structure checks
- 🗜️ Auto-Compression - compress_ai_readme removes filler language and verbose phrases automatically, reducing token footprint without losing information
- 🏗️ Monorepo Support - Place AI_README.md files at different folder levels; the tool automatically finds and uses the most relevant one
- 📦 Easy Integration - Works seamlessly with Cursor, Claude Code, and other MCP clients
---
🚀 Installation & Setup
For Claude Code (VSCode Extension)
> 💡 Model Recommendation: For the best experience, use larger models (Sonnet or Opus) which have stronger instruction-following capabilities and more reliably trigger MCP tools. Smaller models like Haiku may not consistently call the tools when appropriate. Step 1: Add MCP Server In your project directory, run: ``bash
claude mcp add --scope project ai-readme-manager npx -- ai-readme-mcp@latest
`
This creates a .mcp.json file that uses npx to run the package - no installation or path configuration needed!
Step 2: Enable Project MCP Servers
Create or edit .claude/settings.local.json in your project:
`json
{
"enableAllProjectMcpServers": true
}
`
Step 3: Auto-approve MCP Tools (Optional but Recommended)
To avoid "Yes/No" prompts every time and enable "Yes, Do not ask again" option, add the tools to your allow list.
In .claude/settings.local.json, add:
`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
}
`
> Note: Without this configuration, you'll be prompted for approval every time Claude uses these tools, and the "Do not ask again" option won't appear.
Step 4: Verify Installation
`bash
claude mcp get ai-readme-manager
`
You should see Status: ✓ Connected
Step 5: Add CLAUDE.md Instructions
Add the following to your project's CLAUDE.md to ensure Claude consistently calls the MCP tools before every code task:
`markdown
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.
Convention used in 2+ files AND non-obvious (AI'd get it wrong from code alone) → call mcp__ai-readme-manager__update_ai_readme to record it. Bulleted keywords, not prose; 1 "- " bullet = 1 fact (+why only if it stops reversion); fragments. Record only the fact AI can't see in code — not where it lives, what toggles it, or how it works (those → "See <file>."). A run-on chaining facts with ";"/"then" is a wall — break it into bullets, don't grow 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.
`
> Why this matters: Without CLAUDE.md, Claude may skip calling the MCP tools, causing it to generate code that ignores your project's conventions. This step is essential for reliable tool triggering.
For Cursor
Add to Cursor's MCP configuration file:
- Windows: %APPDATA%\Cursor\User\mcp.json
- macOS/Linux: ~/.cursor/mcp.json
`json
{
"mcpServers": {
"ai-readme-manager": {
"command": "npx",
"args": ["ai-readme-mcp@latest"]
}
}
}
`
After configuring, restart Cursor completely.
Add AGENTS.md Instructions
Add the following to your project's AGENTS.md to ensure Cursor consistently uses the MCP tools before every code task:
`markdown
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.
Convention used in 2+ files AND non-obvious (AI'd get it wrong from code alone) → call update_ai_readme to record it. Bulleted keywords, not prose; 1 "- " bullet = 1 fact (+why only if it stops reversion); fragments. Record only the fact AI can't see in code — not where it lives, what toggles it, or how it works (those → "See <file>."). A run-on chaining facts with ";"/"then" is a wall — break it into bullets, don't grow 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.
`
For GitHub Copilot (VSCode 1.102+)
Requirements:
- VSCode 1.102 or later
- GitHub Copilot & Copilot Chat extensions installed
Option 1: Using VSCode Settings UI
1. Open VSCode Settings (Ctrl+,)
2. Search for "MCP"
3. Click "Edit in settings.json"
4. Add the MCP server configuration
Option 2: Manual Configuration
Add to your VSCode settings.json:
`json
{
"github.copilot.chat.mcp.servers": {
"ai-readme-manager": {
"command": "npx",
"args": ["ai-readme-mcp@latest"]
}
}
}
`
After configuring, restart VSCode and you'll see the MCP tools available in GitHub Copilot Chat!
Add .github/copilot-instructions.md Instructions
Create .github/copilot-instructions.md in your project to ensure Copilot consistently uses the MCP tools before every code task:
`markdown
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.
Convention used in 2+ files AND non-obvious (AI'd get it wrong from code alone) → call update_ai_readme to record it. Bulleted keywords, not prose; 1 "- " bullet = 1 fact (+why only if it stops reversion); fragments. Record only the fact AI can't see in code — not where it lives, what toggles it, or how it works (those → "See <file>."). A run-on chaining facts with ";"/"then" is a wall — break it into bullets, don't grow 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.
`
For Claude Desktop Application
Add to claude_desktop_config.json:
- Windows: %APPDATA%\claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/config.json
- Linux: ~/.config/claude/config.json
`json
{
"mcpServers": {
"ai-readme-manager": {
"command": "npx",
"args": ["ai-readme-mcp@latest"]
}
}
}
`
Add CLAUDE.md Instructions
Add the following to your project's CLAUDE.md to ensure Claude Desktop consistently uses the MCP tools before every code task:
`markdown
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.
Convention used in 2+ files AND non-obvious (AI'd get it wrong from code alone) → call update_ai_readme to record it. Bulleted keywords, not prose; 1 "- " bullet = 1 fact (+why only if it stops reversion); fragments. Record only the fact AI can't see in code — not where it lives, what toggles it, or how it works (those → "See <file>."). A run-on chaining facts with ";"/"then" is a wall — break it into bullets, don't grow 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.
`
For OpenClaw
> Perfect for vibe coding / iterative AI development — OpenClaw users often run AI agents in tight loops to build or refactor code. Without persistent context, each iteration risks breaking conventions set in previous rounds. ai-readme-mcp gives your agent a stable memory of project rules across every loop.
Option 1: CLI (Recommended)
`bash
openclaw mcp set ai-readme-manager '{"command":"npx","args":["ai-readme-mcp@latest"]}'
`
Option 2: Edit config file directly
Add to ~/.openclaw/openclaw.json:
`json
{
"mcp": {
"servers": {
"ai-readme-manager": {
"command": "npx",
"args": ["ai-readme-mcp@latest"]
}
}
}
}
`
After configuring, restart OpenClaw to load the new MCP server. Verify with:
`bash
openclaw mcp list
`
Add skill instructions
To ensure OpenClaw's agent consistently reads project conventions before each code change, add the following to your skill or system prompt:
`markdown
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.
Convention used in 2+ files AND non-obvious (AI'd get it wrong from code alone) → call update_ai_readme to record it. Bulleted keywords, not prose; 1 "- " bullet = 1 fact (+why only if it stops reversion); fragments. Record only the fact AI can't see in code — not where it lives, what toggles it, or how it works (those → "See <file>."). A run-on chaining facts with ";"/"then" is a wall — break it into bullets, don't grow 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.
`
> Why this matters for iterative agents: In agentic loops, each iteration is a fresh context. Without AI_README.md, the agent has no memory of decisions made in previous rounds — leading to style drift, conflicting patterns, and regressions. ai-readme-mcp acts as the persistent memory layer that keeps every loop grounded in the same conventions.
Alternative Installation Methods
The above methods use npx (recommended). If you prefer other approaches, you can use these configurations in your MCP config file:
- Claude Code: .mcp.json (project root)
- Cursor: %APPDATA%\Cursor\User\mcp.json (Windows) or ~/.cursor/mcp.json (macOS/Linux)
- Claude Desktop: claude_desktop_config.json (see paths above)
Option 1: Using npx (Recommended)
No installation needed! Just configure and use via npx:
`json
{
"mcpServers": {
"ai-readme-manager": {
"command": "npx",
"args": ["ai-readme-mcp@latest"]
}
}
}
`
> The -y flag automatically accepts the npx prompt. The @latest ensures you always get the newest version.
Option 2: Global Installation
Install once globally, use everywhere:
`bash
npm install -g ai-readme-mcp@latest
`
Then configure:
`json
{
"mcpServers": {
"ai-readme-manager": {
"command": "ai-readme-mcp"
}
}
}
`
> Pros: Faster startup (no npx download). Cons: Need to manually update when new versions release.
> Don't forget: After configuring the MCP server, add the instructions file for your AI tool — see the setup section for your specific client above (CLAUDE.md, AGENTS.md, or .github/copilot-instructions.md).
---
🚀 Quick Start
Use the init_ai_readme tool to automatically scan and populate empty AI_README files:
Step 1: Create empty AI_README.md files where needed
``bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





