mcp-docs-service 0.2.0 → 0.2.1
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/CHANGELOG.md +43 -0
- package/LICENSE +1 -1
- package/README.md +29 -57
- package/dist/handlers/docs.d.ts +17 -0
- package/dist/handlers/docs.js +280 -0
- package/dist/handlers/docs.js.map +1 -0
- package/dist/handlers/file.d.ts +32 -0
- package/dist/handlers/file.js +222 -0
- package/dist/handlers/file.js.map +1 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.d.ts +2 -24
- package/dist/index.js +431 -49
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/tools.d.ts +141 -0
- package/dist/schemas/tools.js +46 -0
- package/dist/schemas/tools.js.map +1 -0
- package/dist/types/docs.d.ts +49 -0
- package/dist/types/docs.js +2 -0
- package/dist/types/docs.js.map +1 -0
- package/dist/types/file.d.ts +21 -0
- package/dist/types/file.js +2 -0
- package/dist/types/file.js.map +1 -0
- package/dist/types/index.d.ts +34 -43
- package/dist/types/index.js +3 -5
- package/dist/types/index.js.map +1 -1
- package/dist/types/tools.d.ts +11 -0
- package/dist/types/tools.js +2 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/utils/file.d.ts +24 -0
- package/dist/utils/file.js +94 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/index.d.ts +1 -60
- package/dist/utils/index.js +2 -151
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/path.d.ts +16 -0
- package/dist/utils/path.js +39 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +20 -8
- package/dist/cli/bin.d.ts +0 -6
- package/dist/cli/bin.js +0 -49
- package/dist/cli/bin.js.map +0 -1
- package/dist/cli/index.d.ts +0 -16
- package/dist/cli/index.js +0 -108
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/jsonrpc.d.ts +0 -29
- package/dist/cli/jsonrpc.js +0 -121
- package/dist/cli/jsonrpc.js.map +0 -1
- package/dist/core/docAnalyzer.d.ts +0 -25
- package/dist/core/docAnalyzer.js +0 -118
- package/dist/core/docAnalyzer.js.map +0 -1
- package/dist/core/docManager.d.ts +0 -48
- package/dist/core/docManager.js +0 -257
- package/dist/core/docManager.js.map +0 -1
- package/dist/core/docProcessor.d.ts +0 -20
- package/dist/core/docProcessor.js +0 -127
- package/dist/core/docProcessor.js.map +0 -1
- package/dist/core/mcpDocsServer.d.ts +0 -61
- package/dist/core/mcpDocsServer.js +0 -395
- package/dist/core/mcpDocsServer.js.map +0 -1
@@ -1,395 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/**
|
3
|
-
* MCP Documentation Management Server
|
4
|
-
* This server implements the Model Context Protocol for managing documentation
|
5
|
-
*/
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
-
exports.MCPDocsServer = void 0;
|
8
|
-
const docManager_js_1 = require("./docManager.js");
|
9
|
-
const docAnalyzer_js_1 = require("./docAnalyzer.js");
|
10
|
-
class MCPDocsServer {
|
11
|
-
constructor(docsDir = "./docs", options = {}) {
|
12
|
-
this.docManager = new docManager_js_1.DocManager(docsDir, options);
|
13
|
-
this.docAnalyzer = new docAnalyzer_js_1.DocAnalyzer(this.docManager);
|
14
|
-
// Log initialization info
|
15
|
-
console.error(`MCP Documentation Service initialized with docs directory: ${docsDir}`);
|
16
|
-
if (options.createIfNotExists) {
|
17
|
-
console.error("Directory will be created if it doesn't exist");
|
18
|
-
}
|
19
|
-
}
|
20
|
-
/**
|
21
|
-
* Execute a query using the MCP protocol
|
22
|
-
*/
|
23
|
-
async executeQuery(sql) {
|
24
|
-
try {
|
25
|
-
// Parse the SQL-like query to extract command and parameters
|
26
|
-
const { command, params } = this.parseQuery(sql);
|
27
|
-
// Execute the appropriate command
|
28
|
-
switch (command) {
|
29
|
-
case "list_files":
|
30
|
-
return await this.listFiles(params);
|
31
|
-
case "list_directories":
|
32
|
-
return await this.listDirectories(params);
|
33
|
-
case "get_document":
|
34
|
-
return await this.getDocument(params);
|
35
|
-
case "search_documents":
|
36
|
-
return await this.searchDocuments(params);
|
37
|
-
case "create_document":
|
38
|
-
return await this.createDocument(params);
|
39
|
-
case "update_document":
|
40
|
-
return await this.updateDocument(params);
|
41
|
-
case "delete_document":
|
42
|
-
return await this.deleteDocument(params);
|
43
|
-
case "analyze_docs":
|
44
|
-
return await this.analyzeDocumentation(params);
|
45
|
-
case "get_health_score":
|
46
|
-
return await this.getHealthScore();
|
47
|
-
case "get_suggestions":
|
48
|
-
return await this.getSuggestions();
|
49
|
-
default:
|
50
|
-
return {
|
51
|
-
success: false,
|
52
|
-
error: `Unknown command: ${command}`,
|
53
|
-
};
|
54
|
-
}
|
55
|
-
}
|
56
|
-
catch (error) {
|
57
|
-
console.error("Error executing query:", error);
|
58
|
-
return {
|
59
|
-
success: false,
|
60
|
-
error: error instanceof Error ? error.message : String(error),
|
61
|
-
};
|
62
|
-
}
|
63
|
-
}
|
64
|
-
/**
|
65
|
-
* Parse a query string into command and parameters
|
66
|
-
*/
|
67
|
-
parseQuery(query) {
|
68
|
-
// Default to empty parameters
|
69
|
-
const params = {};
|
70
|
-
// Handle simple command syntax
|
71
|
-
if (query.indexOf("(") === -1) {
|
72
|
-
return { command: query.trim(), params };
|
73
|
-
}
|
74
|
-
// Extract command name
|
75
|
-
const commandMatch = query.match(/^\s*(\w+)\s*\(/);
|
76
|
-
if (!commandMatch) {
|
77
|
-
throw new Error(`Invalid query format: ${query}`);
|
78
|
-
}
|
79
|
-
const command = commandMatch[1];
|
80
|
-
// Extract parameters between parentheses
|
81
|
-
const paramsMatch = query.match(/\(\s*(.*)\s*\)/s);
|
82
|
-
if (!paramsMatch) {
|
83
|
-
return { command, params };
|
84
|
-
}
|
85
|
-
// Parse parameter string
|
86
|
-
const paramsStr = paramsMatch[1];
|
87
|
-
// Handle JSON object parameters
|
88
|
-
if (paramsStr.trim().startsWith("{") && paramsStr.trim().endsWith("}")) {
|
89
|
-
try {
|
90
|
-
return { command, params: JSON.parse(paramsStr) };
|
91
|
-
}
|
92
|
-
catch (e) {
|
93
|
-
throw new Error(`Invalid JSON parameters: ${e instanceof Error ? e.message : String(e)}`);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
// Parse key=value parameters
|
97
|
-
let currentKey = "";
|
98
|
-
let currentValue = "";
|
99
|
-
let inQuotes = false;
|
100
|
-
let inObject = false;
|
101
|
-
let inArray = false;
|
102
|
-
let objectDepth = 0;
|
103
|
-
let arrayDepth = 0;
|
104
|
-
for (let i = 0; i < paramsStr.length; i++) {
|
105
|
-
const char = paramsStr[i];
|
106
|
-
const nextChar = paramsStr[i + 1] || "";
|
107
|
-
// Handle quotes
|
108
|
-
if (char === '"' && paramsStr[i - 1] !== "\\") {
|
109
|
-
inQuotes = !inQuotes;
|
110
|
-
currentValue += char;
|
111
|
-
continue;
|
112
|
-
}
|
113
|
-
// Handle objects
|
114
|
-
if (char === "{" && !inQuotes) {
|
115
|
-
inObject = true;
|
116
|
-
objectDepth++;
|
117
|
-
currentValue += char;
|
118
|
-
continue;
|
119
|
-
}
|
120
|
-
if (char === "}" && !inQuotes) {
|
121
|
-
objectDepth--;
|
122
|
-
if (objectDepth === 0)
|
123
|
-
inObject = false;
|
124
|
-
currentValue += char;
|
125
|
-
continue;
|
126
|
-
}
|
127
|
-
// Handle arrays
|
128
|
-
if (char === "[" && !inQuotes) {
|
129
|
-
inArray = true;
|
130
|
-
arrayDepth++;
|
131
|
-
currentValue += char;
|
132
|
-
continue;
|
133
|
-
}
|
134
|
-
if (char === "]" && !inQuotes) {
|
135
|
-
arrayDepth--;
|
136
|
-
if (arrayDepth === 0)
|
137
|
-
inArray = false;
|
138
|
-
currentValue += char;
|
139
|
-
continue;
|
140
|
-
}
|
141
|
-
// Handle key=value separator
|
142
|
-
if (char === "=" &&
|
143
|
-
!inQuotes &&
|
144
|
-
!inObject &&
|
145
|
-
!inArray &&
|
146
|
-
currentKey === "") {
|
147
|
-
currentKey = currentValue.trim();
|
148
|
-
currentValue = "";
|
149
|
-
continue;
|
150
|
-
}
|
151
|
-
// Handle parameter separator
|
152
|
-
if (char === "," && !inQuotes && !inObject && !inArray) {
|
153
|
-
if (currentKey && currentValue) {
|
154
|
-
// Try to parse the value
|
155
|
-
try {
|
156
|
-
if (currentValue.startsWith('"') && currentValue.endsWith('"')) {
|
157
|
-
// String value
|
158
|
-
params[currentKey] = JSON.parse(currentValue);
|
159
|
-
}
|
160
|
-
else if (currentValue.toLowerCase() === "true" ||
|
161
|
-
currentValue.toLowerCase() === "false") {
|
162
|
-
// Boolean value
|
163
|
-
params[currentKey] = currentValue.toLowerCase() === "true";
|
164
|
-
}
|
165
|
-
else if (!isNaN(Number(currentValue))) {
|
166
|
-
// Number value
|
167
|
-
params[currentKey] = Number(currentValue);
|
168
|
-
}
|
169
|
-
else if (currentValue.startsWith("[") &&
|
170
|
-
currentValue.endsWith("]")) {
|
171
|
-
// Array value
|
172
|
-
params[currentKey] = JSON.parse(currentValue);
|
173
|
-
}
|
174
|
-
else if (currentValue.startsWith("{") &&
|
175
|
-
currentValue.endsWith("}")) {
|
176
|
-
// Object value
|
177
|
-
params[currentKey] = JSON.parse(currentValue);
|
178
|
-
}
|
179
|
-
else {
|
180
|
-
// Everything else as string
|
181
|
-
params[currentKey] = currentValue;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
catch (e) {
|
185
|
-
// If parsing fails, use as string
|
186
|
-
params[currentKey] = currentValue;
|
187
|
-
}
|
188
|
-
}
|
189
|
-
currentKey = "";
|
190
|
-
currentValue = "";
|
191
|
-
continue;
|
192
|
-
}
|
193
|
-
// Add character to current value
|
194
|
-
currentValue += char;
|
195
|
-
}
|
196
|
-
// Handle the last parameter
|
197
|
-
if (currentKey && currentValue) {
|
198
|
-
try {
|
199
|
-
if (currentValue.startsWith('"') && currentValue.endsWith('"')) {
|
200
|
-
// String value
|
201
|
-
params[currentKey] = JSON.parse(currentValue);
|
202
|
-
}
|
203
|
-
else if (currentValue.toLowerCase() === "true" ||
|
204
|
-
currentValue.toLowerCase() === "false") {
|
205
|
-
// Boolean value
|
206
|
-
params[currentKey] = currentValue.toLowerCase() === "true";
|
207
|
-
}
|
208
|
-
else if (!isNaN(Number(currentValue))) {
|
209
|
-
// Number value
|
210
|
-
params[currentKey] = Number(currentValue);
|
211
|
-
}
|
212
|
-
else if (currentValue.startsWith("[") && currentValue.endsWith("]")) {
|
213
|
-
// Array value
|
214
|
-
params[currentKey] = JSON.parse(currentValue);
|
215
|
-
}
|
216
|
-
else if (currentValue.startsWith("{") && currentValue.endsWith("}")) {
|
217
|
-
// Object value
|
218
|
-
params[currentKey] = JSON.parse(currentValue);
|
219
|
-
}
|
220
|
-
else {
|
221
|
-
// Everything else as string
|
222
|
-
params[currentKey] = currentValue;
|
223
|
-
}
|
224
|
-
}
|
225
|
-
catch (e) {
|
226
|
-
// If parsing fails, use as string
|
227
|
-
params[currentKey] = currentValue;
|
228
|
-
}
|
229
|
-
}
|
230
|
-
return { command, params };
|
231
|
-
}
|
232
|
-
/**
|
233
|
-
* List all markdown files
|
234
|
-
*/
|
235
|
-
async listFiles(params) {
|
236
|
-
const directory = params.directory || "";
|
237
|
-
const files = await this.docManager.listMarkdownFiles(directory);
|
238
|
-
return {
|
239
|
-
success: true,
|
240
|
-
data: files,
|
241
|
-
};
|
242
|
-
}
|
243
|
-
/**
|
244
|
-
* List all directories
|
245
|
-
*/
|
246
|
-
async listDirectories(params) {
|
247
|
-
const directory = params.directory || "";
|
248
|
-
const directories = await this.docManager.listDirectories(directory);
|
249
|
-
return {
|
250
|
-
success: true,
|
251
|
-
data: directories,
|
252
|
-
};
|
253
|
-
}
|
254
|
-
/**
|
255
|
-
* Get a document by path
|
256
|
-
*/
|
257
|
-
async getDocument(params) {
|
258
|
-
if (!params.path) {
|
259
|
-
return {
|
260
|
-
success: false,
|
261
|
-
error: "Document path is required",
|
262
|
-
};
|
263
|
-
}
|
264
|
-
const document = await this.docManager.getDocument(params.path);
|
265
|
-
if (!document) {
|
266
|
-
return {
|
267
|
-
success: false,
|
268
|
-
error: `Document not found: ${params.path}`,
|
269
|
-
};
|
270
|
-
}
|
271
|
-
return {
|
272
|
-
success: true,
|
273
|
-
data: document,
|
274
|
-
};
|
275
|
-
}
|
276
|
-
/**
|
277
|
-
* Search for documents
|
278
|
-
*/
|
279
|
-
async searchDocuments(params) {
|
280
|
-
const options = {
|
281
|
-
query: params.query || "",
|
282
|
-
tags: params.tags,
|
283
|
-
status: params.status,
|
284
|
-
directory: params.directory,
|
285
|
-
};
|
286
|
-
const results = await this.docManager.searchDocuments(options);
|
287
|
-
return {
|
288
|
-
success: true,
|
289
|
-
data: results,
|
290
|
-
};
|
291
|
-
}
|
292
|
-
/**
|
293
|
-
* Create a new document
|
294
|
-
*/
|
295
|
-
async createDocument(params) {
|
296
|
-
if (!params.path) {
|
297
|
-
return {
|
298
|
-
success: false,
|
299
|
-
error: "Document path is required",
|
300
|
-
};
|
301
|
-
}
|
302
|
-
if (!params.content) {
|
303
|
-
return {
|
304
|
-
success: false,
|
305
|
-
error: "Document content is required",
|
306
|
-
};
|
307
|
-
}
|
308
|
-
if (!params.metadata || typeof params.metadata !== "object") {
|
309
|
-
return {
|
310
|
-
success: false,
|
311
|
-
error: "Document metadata is required",
|
312
|
-
};
|
313
|
-
}
|
314
|
-
const createParams = {
|
315
|
-
path: params.path,
|
316
|
-
content: params.content,
|
317
|
-
metadata: params.metadata,
|
318
|
-
};
|
319
|
-
const success = await this.docManager.createDocument(createParams);
|
320
|
-
return {
|
321
|
-
success,
|
322
|
-
data: { created: success },
|
323
|
-
};
|
324
|
-
}
|
325
|
-
/**
|
326
|
-
* Update an existing document
|
327
|
-
*/
|
328
|
-
async updateDocument(params) {
|
329
|
-
if (!params.path) {
|
330
|
-
return {
|
331
|
-
success: false,
|
332
|
-
error: "Document path is required",
|
333
|
-
};
|
334
|
-
}
|
335
|
-
const updateParams = {
|
336
|
-
path: params.path,
|
337
|
-
content: params.content,
|
338
|
-
metadata: params.metadata,
|
339
|
-
};
|
340
|
-
const success = await this.docManager.updateDocument(updateParams);
|
341
|
-
return {
|
342
|
-
success,
|
343
|
-
data: { updated: success },
|
344
|
-
};
|
345
|
-
}
|
346
|
-
/**
|
347
|
-
* Delete a document
|
348
|
-
*/
|
349
|
-
async deleteDocument(params) {
|
350
|
-
if (!params.path) {
|
351
|
-
return {
|
352
|
-
success: false,
|
353
|
-
error: "Document path is required",
|
354
|
-
};
|
355
|
-
}
|
356
|
-
const success = await this.docManager.deleteDocument(params.path);
|
357
|
-
return {
|
358
|
-
success,
|
359
|
-
data: { deleted: success },
|
360
|
-
};
|
361
|
-
}
|
362
|
-
/**
|
363
|
-
* Analyze documentation
|
364
|
-
*/
|
365
|
-
async analyzeDocumentation(params) {
|
366
|
-
const directory = params.directory;
|
367
|
-
const analysis = await this.docAnalyzer.analyzeDocumentation(directory);
|
368
|
-
return {
|
369
|
-
success: true,
|
370
|
-
data: analysis,
|
371
|
-
};
|
372
|
-
}
|
373
|
-
/**
|
374
|
-
* Get documentation health score
|
375
|
-
*/
|
376
|
-
async getHealthScore() {
|
377
|
-
const score = await this.docAnalyzer.calculateHealthScore();
|
378
|
-
return {
|
379
|
-
success: true,
|
380
|
-
data: { score },
|
381
|
-
};
|
382
|
-
}
|
383
|
-
/**
|
384
|
-
* Get suggestions for improving documentation
|
385
|
-
*/
|
386
|
-
async getSuggestions() {
|
387
|
-
const suggestions = await this.docAnalyzer.generateSuggestions();
|
388
|
-
return {
|
389
|
-
success: true,
|
390
|
-
data: { suggestions },
|
391
|
-
};
|
392
|
-
}
|
393
|
-
}
|
394
|
-
exports.MCPDocsServer = MCPDocsServer;
|
395
|
-
//# sourceMappingURL=mcpDocsServer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mcpDocsServer.js","sourceRoot":"","sources":["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