codewiki-mcp 1.0.0 β 1.1.0
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/LICENSE +21 -0
- package/README.md +206 -144
- package/README.ru.md +206 -144
- package/dist/cli.js +0 -0
- package/dist/schemas.d.ts +12 -38
- package/package.json +26 -4
- package/.claude/skills/codewiki.md +0 -186
- package/.cursor/mcp.json +0 -9
- package/.dockerignore +0 -10
- package/.github/dependabot.yml +0 -33
- package/.github/workflows/ci.yml +0 -42
- package/.github/workflows/release.yml +0 -36
- package/.releaserc.json +0 -16
- package/CHANGELOG.md +0 -6
- package/Dockerfile +0 -15
- package/src/cli.ts +0 -67
- package/src/index.ts +0 -32
- package/src/lib/batchexecute.ts +0 -72
- package/src/lib/codewikiClient.ts +0 -294
- package/src/lib/config.ts +0 -30
- package/src/lib/errors.ts +0 -57
- package/src/lib/extractKeyword.ts +0 -47
- package/src/lib/repo.ts +0 -70
- package/src/lib/resolveRepo.ts +0 -60
- package/src/schemas.ts +0 -22
- package/src/server.ts +0 -120
- package/src/tools/askRepo.ts +0 -38
- package/src/tools/fetchRepo.ts +0 -74
- package/src/tools/searchRepos.ts +0 -40
- package/tests/batchexecute.test.ts +0 -42
- package/tests/client.test.ts +0 -129
- package/tests/errors.test.ts +0 -122
- package/tests/extractKeyword.test.ts +0 -34
- package/tests/resolveRepo.test.ts +0 -79
- package/tsconfig.json +0 -18
- package/vitest.config.ts +0 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 codewiki-mcp contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,53 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# π codewiki-mcp
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**MCP server for codewiki.google β search, fetch docs, and ask questions about any open-source repo**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://github.com/izzzzzi/codewiki-mcp/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/izzzzzi/codewiki-mcp/actions/workflows/release.yml)
|
|
9
|
+
[](https://www.npmjs.com/package/codewiki-mcp)
|
|
10
|
+
[](https://www.npmjs.com/package/codewiki-mcp)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](https://www.typescriptlang.org/)
|
|
13
|
+
[](https://nodejs.org/)
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
- **Multiple transports**: stdio (default), Streamable HTTP, SSE
|
|
11
|
-
- **NLP repo resolution**: natural-language input β GitHub search β `owner/repo` (via wink-nlp)
|
|
12
|
-
- **Retry with exponential backoff**: configurable retries for resilient API calls
|
|
13
|
-
- **Structured errors**: typed error codes (`VALIDATION`, `RPC_FAIL`, `TIMEOUT`, `NLP_RESOLVE_FAIL`)
|
|
14
|
-
- **Response metadata**: byte count and elapsed time on every response
|
|
15
|
-
- **Docker support**: multi-stage Alpine build
|
|
16
|
-
- **Claude Code skill**: prompt templates, workflow chains, error handling guide
|
|
15
|
+
[π·πΊ Π ΡΡΡΠΊΠΈΠΉ](README.ru.md) | **π¬π§ English**
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
<br />
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
*MCP server that connects any AI assistant to [codewiki.google](https://codewiki.google) β AI-generated wiki documentation for open-source repositories.*
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
codewiki fetch how routing works in Next.js
|
|
24
|
-
```
|
|
21
|
+
</div>
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
codewiki search state management libraries
|
|
28
|
-
```
|
|
23
|
+
---
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
codewiki ask how does React fiber reconciler work?
|
|
32
|
-
```
|
|
25
|
+
## π Overview
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
codewiki fetch vercel/next.js
|
|
37
|
-
codewiki fetch https://github.com/fastify/fastify
|
|
38
|
-
```
|
|
27
|
+
**codewiki-mcp** is a [Model Context Protocol](https://modelcontextprotocol.io/) server that gives AI assistants access to **codewiki.google** β a service that generates comprehensive wiki documentation for any GitHub repository. Search repos, fetch full docs, or ask natural-language questions β all through MCP.
|
|
39
28
|
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
codewiki fetch pages tailwindlabs/tailwindcss
|
|
43
|
-
```
|
|
29
|
+
---
|
|
44
30
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
## β¨ Features
|
|
32
|
+
|
|
33
|
+
| Feature | Description |
|
|
34
|
+
|---------|-------------|
|
|
35
|
+
| π **Search Repos** | Find repositories indexed by codewiki.google |
|
|
36
|
+
| π **Fetch Wiki Docs** | Get full markdown or structured pages for any repo |
|
|
37
|
+
| π¬ **Ask Questions** | Natural-language Q&A with conversation history |
|
|
38
|
+
| π§ **NLP Repo Resolution** | Type naturally β wink-nlp extracts keywords and resolves to `owner/repo` |
|
|
39
|
+
| π‘ **Multiple Transports** | stdio (default), Streamable HTTP, SSE |
|
|
40
|
+
| π **Retry with Backoff** | Automatic retries with exponential backoff on 5xx errors |
|
|
41
|
+
| π³ **Docker Support** | Multi-stage Alpine build |
|
|
42
|
+
| π **Response Metadata** | Byte count and elapsed time on every response |
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## π Quick Start
|
|
51
47
|
|
|
52
48
|
### Using npx (no install)
|
|
53
49
|
|
|
@@ -58,31 +54,26 @@ npx -y codewiki-mcp@latest
|
|
|
58
54
|
### From source
|
|
59
55
|
|
|
60
56
|
```bash
|
|
61
|
-
git clone https://github.com/
|
|
57
|
+
git clone https://github.com/izzzzzi/codewiki-mcp.git
|
|
62
58
|
cd codewiki-mcp
|
|
63
59
|
npm install
|
|
64
60
|
npm run build
|
|
65
61
|
```
|
|
66
62
|
|
|
67
|
-
###
|
|
63
|
+
### Transports
|
|
68
64
|
|
|
69
65
|
```bash
|
|
66
|
+
# stdio (default)
|
|
70
67
|
node dist/cli.js
|
|
71
|
-
```
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```bash
|
|
69
|
+
# Streamable HTTP
|
|
76
70
|
node dist/cli.js --http --port 3000
|
|
77
|
-
```
|
|
78
71
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```bash
|
|
72
|
+
# SSE
|
|
82
73
|
node dist/cli.js --sse --port 3001
|
|
83
74
|
```
|
|
84
75
|
|
|
85
|
-
### Docker
|
|
76
|
+
### π³ Docker
|
|
86
77
|
|
|
87
78
|
```bash
|
|
88
79
|
docker build -t codewiki-mcp .
|
|
@@ -101,11 +92,14 @@ docker run -p 3000:3000 \
|
|
|
101
92
|
codewiki-mcp --http
|
|
102
93
|
```
|
|
103
94
|
|
|
104
|
-
|
|
95
|
+
---
|
|
105
96
|
|
|
106
|
-
|
|
97
|
+
## π§ MCP Client Configuration
|
|
107
98
|
|
|
108
|
-
|
|
99
|
+
<details>
|
|
100
|
+
<summary><b>Cursor</b></summary>
|
|
101
|
+
|
|
102
|
+
Add to `.cursor/mcp.json`:
|
|
109
103
|
|
|
110
104
|
```json
|
|
111
105
|
{
|
|
@@ -118,7 +112,10 @@ Add to `.cursor/mcp.json` (or use the included one):
|
|
|
118
112
|
}
|
|
119
113
|
```
|
|
120
114
|
|
|
121
|
-
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><b>Claude Desktop</b></summary>
|
|
122
119
|
|
|
123
120
|
Add to `claude_desktop_config.json`:
|
|
124
121
|
|
|
@@ -133,13 +130,19 @@ Add to `claude_desktop_config.json`:
|
|
|
133
130
|
}
|
|
134
131
|
```
|
|
135
132
|
|
|
136
|
-
|
|
133
|
+
</details>
|
|
134
|
+
|
|
135
|
+
<details>
|
|
136
|
+
<summary><b>Claude Code</b></summary>
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
139
|
claude mcp add codewiki-mcp -- npx -y codewiki-mcp@latest
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
</details>
|
|
143
|
+
|
|
144
|
+
<details>
|
|
145
|
+
<summary><b>Windsurf</b></summary>
|
|
143
146
|
|
|
144
147
|
Add to your Windsurf MCP config:
|
|
145
148
|
|
|
@@ -154,7 +157,10 @@ Add to your Windsurf MCP config:
|
|
|
154
157
|
}
|
|
155
158
|
```
|
|
156
159
|
|
|
157
|
-
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><b>VS Code (Copilot)</b></summary>
|
|
158
164
|
|
|
159
165
|
Add to `.vscode/mcp.json`:
|
|
160
166
|
|
|
@@ -169,7 +175,10 @@ Add to `.vscode/mcp.json`:
|
|
|
169
175
|
}
|
|
170
176
|
```
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
</details>
|
|
179
|
+
|
|
180
|
+
<details>
|
|
181
|
+
<summary><b>Local development</b></summary>
|
|
173
182
|
|
|
174
183
|
```json
|
|
175
184
|
{
|
|
@@ -182,39 +191,83 @@ Add to `.vscode/mcp.json`:
|
|
|
182
191
|
}
|
|
183
192
|
```
|
|
184
193
|
|
|
185
|
-
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## π‘ Usage
|
|
199
|
+
|
|
200
|
+
Prompts you can use in any MCP-compatible client:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
codewiki fetch how routing works in Next.js
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
codewiki search state management libraries
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
codewiki ask how does React fiber reconciler work?
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Fetch complete documentation:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
codewiki fetch vercel/next.js
|
|
218
|
+
codewiki fetch https://github.com/fastify/fastify
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Get structured pages:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
codewiki fetch pages tailwindlabs/tailwindcss
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Ask with natural language:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
codewiki ask fastify how to add authentication?
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
186
234
|
|
|
187
|
-
|
|
235
|
+
## π οΈ MCP Tools
|
|
236
|
+
|
|
237
|
+
### π codewiki_search_repos
|
|
188
238
|
|
|
189
239
|
Search repositories indexed by codewiki.google.
|
|
190
240
|
|
|
191
241
|
| Parameter | Type | Required | Default | Description |
|
|
192
|
-
|
|
193
|
-
| `query` | string |
|
|
194
|
-
| `limit` | number |
|
|
242
|
+
|-----------|------|:--------:|---------|-------------|
|
|
243
|
+
| `query` | string | β
| β | Search query |
|
|
244
|
+
| `limit` | number | β | 10 | Max results (1β50) |
|
|
195
245
|
|
|
196
|
-
### codewiki_fetch_repo
|
|
246
|
+
### π codewiki_fetch_repo
|
|
197
247
|
|
|
198
248
|
Fetch generated wiki content for a repository.
|
|
199
249
|
|
|
200
250
|
| Parameter | Type | Required | Default | Description |
|
|
201
|
-
|
|
202
|
-
| `repo` | string |
|
|
203
|
-
| `mode` | string |
|
|
251
|
+
|-----------|------|:--------:|---------|-------------|
|
|
252
|
+
| `repo` | string | β
| β | `owner/repo`, GitHub URL, or natural-language query |
|
|
253
|
+
| `mode` | string | β | `"aggregate"` | `"aggregate"` β full markdown; `"pages"` β structured JSON |
|
|
204
254
|
|
|
205
|
-
### codewiki_ask_repo
|
|
255
|
+
### π¬ codewiki_ask_repo
|
|
206
256
|
|
|
207
257
|
Ask a natural-language question about a repository.
|
|
208
258
|
|
|
209
259
|
| Parameter | Type | Required | Default | Description |
|
|
210
|
-
|
|
211
|
-
| `repo` | string |
|
|
212
|
-
| `question` | string |
|
|
213
|
-
| `history` | array |
|
|
260
|
+
|-----------|------|:--------:|---------|-------------|
|
|
261
|
+
| `repo` | string | β
| β | Repository identifier (same formats as fetch) |
|
|
262
|
+
| `question` | string | β
| β | Question about the repo |
|
|
263
|
+
| `history` | array | β | `[]` | Conversation history `[{role, content}]` (max 20) |
|
|
264
|
+
|
|
265
|
+
---
|
|
214
266
|
|
|
215
|
-
## Response Format
|
|
267
|
+
## π Response Format
|
|
216
268
|
|
|
217
|
-
|
|
269
|
+
<details>
|
|
270
|
+
<summary><b>β
Success β Search</b></summary>
|
|
218
271
|
|
|
219
272
|
```json
|
|
220
273
|
{
|
|
@@ -236,7 +289,10 @@ Ask a natural-language question about a repository.
|
|
|
236
289
|
}
|
|
237
290
|
```
|
|
238
291
|
|
|
239
|
-
|
|
292
|
+
</details>
|
|
293
|
+
|
|
294
|
+
<details>
|
|
295
|
+
<summary><b>β
Success β Fetch (pages mode)</b></summary>
|
|
240
296
|
|
|
241
297
|
```json
|
|
242
298
|
{
|
|
@@ -259,7 +315,10 @@ Ask a natural-language question about a repository.
|
|
|
259
315
|
}
|
|
260
316
|
```
|
|
261
317
|
|
|
262
|
-
|
|
318
|
+
</details>
|
|
319
|
+
|
|
320
|
+
<details>
|
|
321
|
+
<summary><b>β
Success β Ask</b></summary>
|
|
263
322
|
|
|
264
323
|
```json
|
|
265
324
|
{
|
|
@@ -271,7 +330,10 @@ Ask a natural-language question about a repository.
|
|
|
271
330
|
}
|
|
272
331
|
```
|
|
273
332
|
|
|
274
|
-
|
|
333
|
+
</details>
|
|
334
|
+
|
|
335
|
+
<details>
|
|
336
|
+
<summary><b>β Error Response</b></summary>
|
|
275
337
|
|
|
276
338
|
```json
|
|
277
339
|
{
|
|
@@ -284,47 +346,20 @@ Ask a natural-language question about a repository.
|
|
|
284
346
|
}
|
|
285
347
|
```
|
|
286
348
|
|
|
287
|
-
|
|
349
|
+
Error codes: `VALIDATION`, `RPC_FAIL`, `TIMEOUT`, `NLP_RESOLVE_FAIL`
|
|
288
350
|
|
|
289
|
-
|
|
290
|
-
# Start server
|
|
291
|
-
node dist/cli.js --http --port 3000
|
|
351
|
+
</details>
|
|
292
352
|
|
|
293
|
-
|
|
294
|
-
curl -X POST http://localhost:3000/mcp \
|
|
295
|
-
-H "Content-Type: application/json" \
|
|
296
|
-
-d '{
|
|
297
|
-
"jsonrpc": "2.0",
|
|
298
|
-
"id": 1,
|
|
299
|
-
"method": "tools/call",
|
|
300
|
-
"params": {
|
|
301
|
-
"name": "codewiki_search_repos",
|
|
302
|
-
"arguments": { "query": "fastify", "limit": 5 }
|
|
303
|
-
}
|
|
304
|
-
}'
|
|
305
|
-
|
|
306
|
-
# Fetch wiki
|
|
307
|
-
curl -X POST http://localhost:3000/mcp \
|
|
308
|
-
-H "Content-Type: application/json" \
|
|
309
|
-
-d '{
|
|
310
|
-
"jsonrpc": "2.0",
|
|
311
|
-
"id": 2,
|
|
312
|
-
"method": "tools/call",
|
|
313
|
-
"params": {
|
|
314
|
-
"name": "codewiki_fetch_repo",
|
|
315
|
-
"arguments": { "repo": "fastify/fastify", "mode": "pages" }
|
|
316
|
-
}
|
|
317
|
-
}'
|
|
318
|
-
```
|
|
353
|
+
---
|
|
319
354
|
|
|
320
|
-
## How It Works
|
|
355
|
+
## βοΈ How It Works
|
|
321
356
|
|
|
322
357
|
### Data Flow
|
|
323
358
|
|
|
324
359
|
```
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
360
|
+
AI Assistant β MCP protocol β codewiki-mcp β HTTPS β codewiki.google
|
|
361
|
+
β
|
|
362
|
+
AI Assistant β MCP protocol β codewiki-mcp β JSON β Google RPC API
|
|
328
363
|
```
|
|
329
364
|
|
|
330
365
|
### Google Batchexecute RPC
|
|
@@ -337,11 +372,14 @@ codewiki.google uses Google's internal **batchexecute** RPC format (not REST, no
|
|
|
337
372
|
4. Parses `wrb.fr` frames and extracts the typed payload
|
|
338
373
|
|
|
339
374
|
Each tool maps to an RPC ID:
|
|
340
|
-
- `vyWDAf` β search
|
|
341
|
-
- `VSX6ub` β fetch wiki
|
|
342
|
-
- `EgIxfe` β ask question
|
|
343
375
|
|
|
344
|
-
|
|
376
|
+
| Tool | RPC ID |
|
|
377
|
+
|------|:------:|
|
|
378
|
+
| π Search | `vyWDAf` |
|
|
379
|
+
| π Fetch | `VSX6ub` |
|
|
380
|
+
| π¬ Ask | `EgIxfe` |
|
|
381
|
+
|
|
382
|
+
### π§ NLP Repo Resolution
|
|
345
383
|
|
|
346
384
|
Users can type natural language instead of `owner/repo`:
|
|
347
385
|
|
|
@@ -353,20 +391,20 @@ Users can type natural language instead of `owner/repo`:
|
|
|
353
391
|
β normalizeRepoInput("fastify/fastify") β URL for codewiki
|
|
354
392
|
```
|
|
355
393
|
|
|
356
|
-
### Retry with Exponential Backoff
|
|
394
|
+
### π Retry with Exponential Backoff
|
|
357
395
|
|
|
358
|
-
|
|
396
|
+
| Attempt | Delay |
|
|
397
|
+
|:-------:|------:|
|
|
398
|
+
| 0 | immediate |
|
|
399
|
+
| 1 | 250ms |
|
|
400
|
+
| 2 | 500ms |
|
|
401
|
+
| 3 | 1000ms |
|
|
359
402
|
|
|
360
|
-
|
|
361
|
-
Attempt 0: immediate
|
|
362
|
-
Attempt 1: after 250ms
|
|
363
|
-
Attempt 2: after 500ms
|
|
364
|
-
Attempt 3: after 1000ms
|
|
365
|
-
```
|
|
403
|
+
> 4xx errors (client errors) are never retried.
|
|
366
404
|
|
|
367
|
-
|
|
405
|
+
---
|
|
368
406
|
|
|
369
|
-
## CLI
|
|
407
|
+
## π₯οΈ CLI
|
|
370
408
|
|
|
371
409
|
```
|
|
372
410
|
codewiki-mcp [options]
|
|
@@ -379,7 +417,9 @@ Options:
|
|
|
379
417
|
--help, -h Show help
|
|
380
418
|
```
|
|
381
419
|
|
|
382
|
-
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## β‘ Configuration
|
|
383
423
|
|
|
384
424
|
Environment variables:
|
|
385
425
|
|
|
@@ -399,19 +439,9 @@ CODEWIKI_MAX_RETRIES=5
|
|
|
399
439
|
GITHUB_TOKEN=ghp_your_token
|
|
400
440
|
```
|
|
401
441
|
|
|
402
|
-
|
|
442
|
+
---
|
|
403
443
|
|
|
404
|
-
|
|
405
|
-
npm run dev # stdio with tsx
|
|
406
|
-
npm run dev:http # HTTP with tsx
|
|
407
|
-
npm run dev:sse # SSE with tsx
|
|
408
|
-
npm run typecheck # type check
|
|
409
|
-
npm run test # run tests
|
|
410
|
-
npm run test:watch # tests in watch mode
|
|
411
|
-
npm run build # compile to dist/
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
## Project Structure
|
|
444
|
+
## π Project Structure
|
|
415
445
|
|
|
416
446
|
```
|
|
417
447
|
src/
|
|
@@ -433,22 +463,31 @@ src/
|
|
|
433
463
|
βββ askRepo.ts # codewiki_ask_repo
|
|
434
464
|
```
|
|
435
465
|
|
|
436
|
-
|
|
466
|
+
---
|
|
437
467
|
|
|
438
|
-
|
|
468
|
+
## β Troubleshooting
|
|
469
|
+
|
|
470
|
+
<details>
|
|
471
|
+
<summary><b>Permission Denied</b></summary>
|
|
439
472
|
|
|
440
473
|
```bash
|
|
441
474
|
chmod +x ./node_modules/.bin/codewiki-mcp
|
|
442
475
|
```
|
|
443
476
|
|
|
444
|
-
|
|
477
|
+
</details>
|
|
478
|
+
|
|
479
|
+
<details>
|
|
480
|
+
<summary><b>Connection Refused (HTTP/SSE)</b></summary>
|
|
445
481
|
|
|
446
482
|
```bash
|
|
447
483
|
# Check if port is in use
|
|
448
484
|
lsof -i :3000
|
|
449
485
|
```
|
|
450
486
|
|
|
451
|
-
|
|
487
|
+
</details>
|
|
488
|
+
|
|
489
|
+
<details>
|
|
490
|
+
<summary><b>Timeout Errors</b></summary>
|
|
452
491
|
|
|
453
492
|
For large repositories, increase the timeout:
|
|
454
493
|
|
|
@@ -456,7 +495,10 @@ For large repositories, increase the timeout:
|
|
|
456
495
|
CODEWIKI_REQUEST_TIMEOUT=60000 node dist/cli.js
|
|
457
496
|
```
|
|
458
497
|
|
|
459
|
-
|
|
498
|
+
</details>
|
|
499
|
+
|
|
500
|
+
<details>
|
|
501
|
+
<summary><b>NLP Resolution Fails</b></summary>
|
|
460
502
|
|
|
461
503
|
If natural-language input doesn't resolve, use explicit format:
|
|
462
504
|
|
|
@@ -469,7 +511,25 @@ https://github.com/fastify/fastify
|
|
|
469
511
|
|
|
470
512
|
Set `GITHUB_TOKEN` to avoid GitHub API rate limits for unauthenticated requests.
|
|
471
513
|
|
|
472
|
-
|
|
514
|
+
</details>
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## π§βπ» Development
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
npm run dev # stdio with tsx
|
|
522
|
+
npm run dev:http # HTTP with tsx
|
|
523
|
+
npm run dev:sse # SSE with tsx
|
|
524
|
+
npm run typecheck # type check
|
|
525
|
+
npm run test # run tests
|
|
526
|
+
npm run test:watch # tests in watch mode
|
|
527
|
+
npm run build # compile to dist/
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## π€ Contributing
|
|
473
533
|
|
|
474
534
|
Contributions are welcome! Please:
|
|
475
535
|
|
|
@@ -479,6 +539,8 @@ Contributions are welcome! Please:
|
|
|
479
539
|
4. Run `npm run typecheck && npm run test` before submitting
|
|
480
540
|
5. Open a Pull Request
|
|
481
541
|
|
|
482
|
-
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
## π License
|
|
483
545
|
|
|
484
|
-
MIT
|
|
546
|
+
[MIT](LICENSE) Β© codewiki-mcp contributors
|