ai-readme-mcp 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -116
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@ When working with AI assistants (like Claude, GPT, or other AI coding tools), yo
|
|
|
20
20
|
|
|
21
21
|
- ❌ **Inconsistent code style** - AI generates code that doesn't match your project's conventions
|
|
22
22
|
- ❌ **Repeated instructions** - You have to tell the AI the same rules over and over
|
|
23
|
-
- ❌ **Team inconsistency** - Different team members get different AI outputs
|
|
23
|
+
- ❌ **Team inconsistency** - Different team members get different AI outputs, leading to fragmented code quality
|
|
24
24
|
- ❌ **Context loss** - AI forgets your project's specific patterns and best practices
|
|
25
|
-
- ❌ **
|
|
25
|
+
- ❌ **No single source of truth** - Team conventions exist in Slack messages, PRs, and people's heads, not in a format AI can use
|
|
26
26
|
|
|
27
27
|
## 💡 The Solution
|
|
28
28
|
|
|
@@ -32,13 +32,15 @@ Think of it as:
|
|
|
32
32
|
- 📖 A "style guide" that AI reads before writing code
|
|
33
33
|
- 🎓 An "onboarding document" that teaches AI your project's conventions
|
|
34
34
|
- 🔧 A "configuration file" for AI behavior in your codebase
|
|
35
|
+
- 🤝 A **"team contract"** that ensures every developer's AI assistant follows the same standards
|
|
35
36
|
|
|
36
37
|
### How It Works
|
|
37
38
|
|
|
38
39
|
1. **Create** `AI_README.md` files in your project (root or specific directories)
|
|
39
40
|
2. **Document** your conventions: coding standards, architecture patterns, naming rules, testing requirements
|
|
40
|
-
3. **
|
|
41
|
-
4. **
|
|
41
|
+
3. **Commit to git** - Share conventions with your entire team
|
|
42
|
+
4. **AI reads it automatically** before making changes - ensuring every team member's AI follows the same rules
|
|
43
|
+
5. **Keep it in sync** - AI can update the README as your project evolves
|
|
42
44
|
|
|
43
45
|
### What This MCP Server Does
|
|
44
46
|
|
|
@@ -58,6 +60,7 @@ This MCP (Model Context Protocol) server automates the entire workflow:
|
|
|
58
60
|
|
|
59
61
|
- 🔍 **Automatic Discovery** - Scan and index all AI_README.md files in your project
|
|
60
62
|
- 🎯 **Smart Context Routing** - Find relevant README content based on file paths
|
|
63
|
+
- 🤝 **Team Consistency** - Every team member's AI assistant reads the same conventions from git, ensuring uniform code quality
|
|
61
64
|
- 🚀 **Guided Initialization** - `init_ai_readme` tool scans for empty files and guides AI through population
|
|
62
65
|
- 🔄 **Update & Sync** - AI can both read and update AI_README files
|
|
63
66
|
- ✅ **Validation & Quality** - Ensure README consistency with token limits and structure checks
|
|
@@ -66,100 +69,54 @@ This MCP (Model Context Protocol) server automates the entire workflow:
|
|
|
66
69
|
|
|
67
70
|
---
|
|
68
71
|
|
|
69
|
-
## 🚀 Installation
|
|
72
|
+
## 🚀 Installation & Setup
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
No installation needed! Just configure and use via npx:
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"mcpServers": {
|
|
78
|
-
"ai-readme-manager": {
|
|
79
|
-
"command": "npx",
|
|
80
|
-
"args": ["-y", "ai-readme-mcp"]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
```
|
|
74
|
+
### For Claude Code (VSCode Extension)
|
|
85
75
|
|
|
86
|
-
|
|
76
|
+
**Step 1: Add MCP Server**
|
|
87
77
|
|
|
88
|
-
|
|
78
|
+
In your project directory, run:
|
|
89
79
|
|
|
90
80
|
```bash
|
|
91
|
-
|
|
81
|
+
claude mcp add --scope project ai-readme-manager npx -- ai-readme-mcp
|
|
92
82
|
```
|
|
93
83
|
|
|
94
|
-
|
|
84
|
+
This creates a `.mcp.json` file that uses `npx` to run the package - no installation or path configuration needed!
|
|
85
|
+
|
|
86
|
+
**Step 2: Enable Project MCP Servers**
|
|
87
|
+
|
|
88
|
+
Create or edit `.claude/settings.local.json` in your project:
|
|
95
89
|
|
|
96
90
|
```json
|
|
97
91
|
{
|
|
98
|
-
"
|
|
99
|
-
"ai-readme-manager": {
|
|
100
|
-
"command": "ai-readme-mcp"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
92
|
+
"enableAllProjectMcpServers": true
|
|
103
93
|
}
|
|
104
94
|
```
|
|
105
95
|
|
|
106
|
-
**
|
|
107
|
-
|
|
108
|
-
> **Note:** Use this method if you want to modify or contribute to the source code.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# Clone this repository to a permanent location
|
|
112
|
-
git clone https://github.com/Draco-Cheng/ai-readme-mcp.git ~/ai-readme-mcp
|
|
113
|
-
cd ~/ai-readme-mcp
|
|
114
|
-
|
|
115
|
-
# Install and build
|
|
116
|
-
npm install
|
|
117
|
-
npm run build
|
|
118
|
-
```
|
|
96
|
+
**Step 3: Auto-approve MCP Tools (Optional but Recommended)**
|
|
119
97
|
|
|
120
|
-
|
|
98
|
+
To avoid "Yes/No" prompts every time and enable "Yes, Do not ask again" option, add the tools to your allow list.
|
|
121
99
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**Option 1: Using CLI (Recommended)**
|
|
125
|
-
|
|
126
|
-
In your project directory, run:
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
# If you cloned to ~/ai-readme-mcp:
|
|
130
|
-
claude mcp add --transport stdio ai-readme-manager --scope project -- node ~/ai-readme-mcp/dist/index.js
|
|
131
|
-
|
|
132
|
-
# Or use absolute path:
|
|
133
|
-
claude mcp add --transport stdio ai-readme-manager --scope project -- node /path/to/ai-readme-mcp/dist/index.js
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
This creates a `.mcp.json` file in your project root.
|
|
137
|
-
|
|
138
|
-
**Option 2: Manual Configuration**
|
|
139
|
-
|
|
140
|
-
Create `.mcp.json` in your project root:
|
|
100
|
+
In `.claude/settings.local.json`, add:
|
|
141
101
|
|
|
142
102
|
```json
|
|
143
103
|
{
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
104
|
+
"permissions": {
|
|
105
|
+
"allow": [
|
|
106
|
+
"mcp__ai-readme-manager__discover_ai_readmes",
|
|
107
|
+
"mcp__ai-readme-manager__get_context_for_file",
|
|
108
|
+
"mcp__ai-readme-manager__update_ai_readme",
|
|
109
|
+
"mcp__ai-readme-manager__validate_ai_readmes",
|
|
110
|
+
"mcp__ai-readme-manager__init_ai_readme"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"enableAllProjectMcpServers": true
|
|
151
114
|
}
|
|
152
115
|
```
|
|
153
116
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**Path examples:**
|
|
157
|
-
- **Windows:** `"C:\\Users\\YourName\\ai-readme-mcp\\dist\\index.js"`
|
|
158
|
-
- **macOS/Linux:** `"~/ai-readme-mcp/dist/index.js"` or `"/home/username/ai-readme-mcp/dist/index.js"`
|
|
159
|
-
|
|
160
|
-
> 💡 **Tip:** Clone to a permanent location like `~/ai-readme-mcp` so the path stays consistent across projects.
|
|
117
|
+
> **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.
|
|
161
118
|
|
|
162
|
-
**Verify Installation
|
|
119
|
+
**Step 4: Verify Installation**
|
|
163
120
|
|
|
164
121
|
```bash
|
|
165
122
|
claude mcp get ai-readme-manager
|
|
@@ -167,14 +124,11 @@ claude mcp get ai-readme-manager
|
|
|
167
124
|
|
|
168
125
|
You should see `Status: ✓ Connected`
|
|
169
126
|
|
|
170
|
-
###
|
|
127
|
+
### For Cursor
|
|
171
128
|
|
|
172
129
|
Add to Cursor's MCP configuration file:
|
|
173
|
-
|
|
174
|
-
**
|
|
175
|
-
**macOS/Linux:** `~/.cursor/mcp.json`
|
|
176
|
-
|
|
177
|
-
**Using npx (Recommended):**
|
|
130
|
+
- **Windows:** `%APPDATA%\Cursor\User\mcp.json`
|
|
131
|
+
- **macOS/Linux:** `~/.cursor/mcp.json`
|
|
178
132
|
|
|
179
133
|
```json
|
|
180
134
|
{
|
|
@@ -187,43 +141,36 @@ Add to Cursor's MCP configuration file:
|
|
|
187
141
|
}
|
|
188
142
|
```
|
|
189
143
|
|
|
190
|
-
|
|
144
|
+
After configuring, restart Cursor completely.
|
|
191
145
|
|
|
192
|
-
|
|
193
|
-
{
|
|
194
|
-
"mcpServers": {
|
|
195
|
-
"ai-readme-manager": {
|
|
196
|
-
"command": "ai-readme-mcp"
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
```
|
|
146
|
+
### For Claude Desktop Application
|
|
201
147
|
|
|
202
|
-
|
|
148
|
+
Add to `claude_desktop_config.json`:
|
|
149
|
+
- **Windows:** `%APPDATA%\claude\claude_desktop_config.json`
|
|
150
|
+
- **macOS:** `~/Library/Application Support/Claude/config.json`
|
|
151
|
+
- **Linux:** `~/.config/claude/config.json`
|
|
203
152
|
|
|
204
153
|
```json
|
|
205
154
|
{
|
|
206
155
|
"mcpServers": {
|
|
207
156
|
"ai-readme-manager": {
|
|
208
|
-
"command": "
|
|
209
|
-
"args": ["
|
|
157
|
+
"command": "npx",
|
|
158
|
+
"args": ["-y", "ai-readme-mcp"]
|
|
210
159
|
}
|
|
211
160
|
}
|
|
212
161
|
}
|
|
213
162
|
```
|
|
214
163
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
After configuring, restart Cursor completely. The MCP server should be available to AI assistants in Cursor.
|
|
164
|
+
### Alternative Installation Methods
|
|
218
165
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
166
|
+
The above methods use `npx` (recommended). If you prefer other approaches, you can use these configurations in your MCP config file:
|
|
167
|
+
- **Claude Code:** `.mcp.json` (project root)
|
|
168
|
+
- **Cursor:** `%APPDATA%\Cursor\User\mcp.json` (Windows) or `~/.cursor/mcp.json` (macOS/Linux)
|
|
169
|
+
- **Claude Desktop:** `claude_desktop_config.json` (see paths above)
|
|
222
170
|
|
|
223
|
-
**
|
|
224
|
-
**macOS/Linux:** `~/.config/claude/config.json` or `~/Library/Application Support/Claude/config.json`
|
|
171
|
+
**Option 1: Using npx (Recommended)**
|
|
225
172
|
|
|
226
|
-
|
|
173
|
+
No installation needed! Just configure and use via npx:
|
|
227
174
|
|
|
228
175
|
```json
|
|
229
176
|
{
|
|
@@ -236,31 +183,30 @@ Add to `claude_desktop_config.json`:
|
|
|
236
183
|
}
|
|
237
184
|
```
|
|
238
185
|
|
|
239
|
-
|
|
186
|
+
> The `-y` flag automatically accepts the npx prompt.
|
|
240
187
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
}
|
|
188
|
+
**Option 2: Global Installation**
|
|
189
|
+
|
|
190
|
+
Install once globally, use everywhere:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
npm install -g ai-readme-mcp
|
|
249
194
|
```
|
|
250
195
|
|
|
251
|
-
|
|
196
|
+
Then configure:
|
|
252
197
|
|
|
253
198
|
```json
|
|
254
199
|
{
|
|
255
200
|
"mcpServers": {
|
|
256
201
|
"ai-readme-manager": {
|
|
257
|
-
"command": "
|
|
258
|
-
"args": ["/path/to/ai-readme-mcp/dist/index.js"]
|
|
202
|
+
"command": "ai-readme-mcp"
|
|
259
203
|
}
|
|
260
204
|
}
|
|
261
205
|
}
|
|
262
206
|
```
|
|
263
207
|
|
|
208
|
+
> **Pros:** Faster startup (no npx download). **Cons:** Need to manually update when new versions release.
|
|
209
|
+
|
|
264
210
|
---
|
|
265
211
|
|
|
266
212
|
## Create Your First AI_README
|
|
@@ -444,6 +390,51 @@ npm run build
|
|
|
444
390
|
npm run dev
|
|
445
391
|
```
|
|
446
392
|
|
|
393
|
+
### Local Development Configuration
|
|
394
|
+
|
|
395
|
+
If you're developing or modifying the source code, configure your MCP client to use your local build:
|
|
396
|
+
|
|
397
|
+
**For Claude Code - Add with CLI:**
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# Linux/macOS:
|
|
401
|
+
claude mcp add --transport stdio ai-readme-manager --scope project -- node ~/ai-readme-mcp/dist/index.js
|
|
402
|
+
|
|
403
|
+
# Windows:
|
|
404
|
+
claude mcp add --transport stdio ai-readme-manager --scope project -- node C:\Users\YourName\ai-readme-mcp\dist\index.js
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**For Claude Code - Manual `.mcp.json`:**
|
|
408
|
+
|
|
409
|
+
```json
|
|
410
|
+
{
|
|
411
|
+
"mcpServers": {
|
|
412
|
+
"ai-readme-manager": {
|
|
413
|
+
"type": "stdio",
|
|
414
|
+
"command": "node",
|
|
415
|
+
"args": ["/absolute/path/to/ai-readme-mcp/dist/index.js"]
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**For Cursor or Claude Desktop:**
|
|
422
|
+
|
|
423
|
+
```json
|
|
424
|
+
{
|
|
425
|
+
"mcpServers": {
|
|
426
|
+
"ai-readme-manager": {
|
|
427
|
+
"command": "node",
|
|
428
|
+
"args": ["/absolute/path/to/ai-readme-mcp/dist/index.js"]
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**Path examples:**
|
|
435
|
+
- **Windows:** `"C:\\Users\\YourName\\ai-readme-mcp\\dist\\index.js"` (use `\\` for escaping)
|
|
436
|
+
- **macOS/Linux:** `"/home/username/ai-readme-mcp/dist/index.js"`
|
|
437
|
+
|
|
447
438
|
---
|
|
448
439
|
|
|
449
440
|
## 📚 Documentation
|
|
@@ -695,6 +686,7 @@ We're actively working on new features:
|
|
|
695
686
|
- **Auto-populate Empty AI_README** - Automatically generate AI_README content when `get_context_for_file` detects empty files, reducing manual initialization steps
|
|
696
687
|
- **Enhanced Tool Triggering** - Improve tool descriptions and prompts to ensure AI assistants trigger tools at the right moments with better precision and reliability
|
|
697
688
|
- **CI/CD Integration** - GitHub Actions for automated README validation
|
|
689
|
+
- **VSCode Extension** - Native VSCode extension with visual UI for managing AI_README files, offering a more integrated experience alongside the current MCP server
|
|
698
690
|
|
|
699
691
|
Want to contribute? Check out our [Contributing Guide](./CONTRIBUTING.md)!
|
|
700
692
|
|