@imenam/mcp-documentor 1.0.23 → 1.0.24
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
CHANGED
|
@@ -6,12 +6,13 @@ Connect it to Cursor, Claude Desktop, or any MCP-compatible agent to let your AI
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **Create & update docs** — write markdown documentation entries linked to source files
|
|
9
|
+
- **Create & update docs** — write markdown documentation entries linked to source files; prefer partial edits via `patch_doc`
|
|
10
10
|
- **Staleness tracking** — automatically detects when tracked files have changed since the last doc update
|
|
11
11
|
- **Semantic search** — find relevant docs by meaning (requires an OpenAI API key)
|
|
12
|
-
- **Multi-project support** — organize docs into separate projects
|
|
13
|
-
- **GUI** — built-in web interface
|
|
12
|
+
- **Multi-project support** — organize docs into separate projects; MCP tools work across projects; `set_project` only changes what the GUI shows
|
|
13
|
+
- **GUI** — built-in web interface when a proxy is configured (`PROXY_URL`); without it, the GUI worker is not started
|
|
14
14
|
- **Proxy-aware** — integrates with the [proxy-setup](https://github.com/Imena/proxy-setup) for GUI exposure
|
|
15
|
+
- **Links & structure** — `check_links`, `get_doc_tree`, `move_doc`, and `git_diff_doc` for maintenance workflows
|
|
15
16
|
|
|
16
17
|
## Installation
|
|
17
18
|
|
|
@@ -25,6 +26,11 @@ Or install globally:
|
|
|
25
26
|
npm install -g @imenam/mcp-documentor
|
|
26
27
|
```
|
|
27
28
|
|
|
29
|
+
Global install exposes:
|
|
30
|
+
|
|
31
|
+
- `mcp-documentor` — MCP server
|
|
32
|
+
- `mcp-documentor-migrate` — CLI helper for migrating inline doc links (see `scripts/migrate-links.js`)
|
|
33
|
+
|
|
28
34
|
## MCP Configuration
|
|
29
35
|
|
|
30
36
|
Add to your MCP client config (e.g. Cursor `mcp.json`):
|
|
@@ -47,8 +53,12 @@ Add to your MCP client config (e.g. Cursor `mcp.json`):
|
|
|
47
53
|
|
|
48
54
|
| Variable | Required | Description |
|
|
49
55
|
|---|---|---|
|
|
50
|
-
| `OPENAI_API_KEY` | No | Enables semantic search via OpenAI embeddings |
|
|
51
|
-
| `
|
|
56
|
+
| `OPENAI_API_KEY` | No | Enables semantic search via OpenAI embeddings (`search_docs`) |
|
|
57
|
+
| `MCP_DOCUMENTOR_OPENAI_MODEL` | No | Embedding model (default: `text-embedding-3-small`) |
|
|
58
|
+
| `PROXY_URL` | No | URL of the proxy server to register and launch the GUI |
|
|
59
|
+
| `MCP_DATA_DIR` | No | Overrides the default data directory (see Data storage) |
|
|
60
|
+
|
|
61
|
+
Optional `.env` at the package root (directory containing `package.json` discovered from the installed binary) is loaded when present.
|
|
52
62
|
|
|
53
63
|
## Available Tools
|
|
54
64
|
|
|
@@ -57,17 +67,23 @@ Add to your MCP client config (e.g. Cursor `mcp.json`):
|
|
|
57
67
|
| `create_doc` | Create a new documentation entry linked to source files |
|
|
58
68
|
| `get_doc` | Retrieve a documentation entry with full content |
|
|
59
69
|
| `get_doc_metadata` | Get metadata and freshness status without loading content |
|
|
60
|
-
| `list_docs` | List
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
70
|
+
| `list_docs` | List docs with staleness indicators (optionally filter by project) |
|
|
71
|
+
| `get_doc_tree` | Return folder/doc structure for a project (or all projects) |
|
|
72
|
+
| `update_doc` | Fully replace content and/or metadata (prefer `patch_doc` for small edits) |
|
|
73
|
+
| `patch_doc` | Search-and-replace a fragment of a doc’s content |
|
|
74
|
+
| `move_doc` | Change a doc’s path (folder/name); use after renames to fix links |
|
|
75
|
+
| `delete_doc` | Permanently delete a documentation entry |
|
|
76
|
+
| `search_docs` | Semantic search over docs (natural language; requires OpenAI) |
|
|
77
|
+
| `check_freshness` | Staleness for one doc or a full project scan |
|
|
78
|
+
| `refresh_file_snapshot` | Mark tracked files as up-to-date without editing the doc |
|
|
79
|
+
| `git_diff_doc` | Git diff for tracked files vs snapshot baseline |
|
|
80
|
+
| `check_links` | Validate `related_docs`, `doc://` links, and `#heading` anchors |
|
|
65
81
|
| `list_projects` | List all documentation projects |
|
|
66
|
-
| `set_project` | Switch
|
|
82
|
+
| `set_project` | Switch the active project **for the GUI only** (not for MCP tools) |
|
|
67
83
|
|
|
68
84
|
## Data Storage
|
|
69
85
|
|
|
70
|
-
|
|
86
|
+
By default, data lives under **`.docs-data`** next to the resolved package root (the folder that contains `package.json` for the running install). Set **`MCP_DATA_DIR`** to use another directory. Contents include projects, SQLite/embeddings, and logs under `.docs-data/logs`. This tree is **not** part of the npm package; it is created at runtime.
|
|
71
87
|
|
|
72
88
|
## License
|
|
73
89
|
|
|
@@ -60,6 +60,7 @@ export declare const CreateDocArgsSchema: z.ZodObject<{
|
|
|
60
60
|
}, z.core.$strip>;
|
|
61
61
|
export declare const UpdateDocArgsSchema: z.ZodObject<{
|
|
62
62
|
path: z.ZodString;
|
|
63
|
+
title: z.ZodOptional<z.ZodString>;
|
|
63
64
|
content: z.ZodOptional<z.ZodString>;
|
|
64
65
|
tracked_files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
66
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -32,6 +32,7 @@ export const CreateDocArgsSchema = z.object({
|
|
|
32
32
|
});
|
|
33
33
|
export const UpdateDocArgsSchema = z.object({
|
|
34
34
|
path: z.string().describe("Path of the documentation entry to update, e.g. 'backend/auth/authentication' or 'authentication' for root docs"),
|
|
35
|
+
title: z.string().optional().describe("Title of the documentation entry"),
|
|
35
36
|
content: z.string().optional().describe("New content (replaces existing)"),
|
|
36
37
|
tracked_files: z.array(z.string()).optional().describe("New list of file paths (replaces existing)"),
|
|
37
38
|
tags: z.array(z.string()).optional().describe("New tags (replaces existing)"),
|
package/dist/src/index.js
CHANGED
|
@@ -437,6 +437,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
437
437
|
type: "object",
|
|
438
438
|
properties: {
|
|
439
439
|
path: { type: "string", description: "Path of the documentation entry to update, e.g. 'backend/auth/authentication' or 'authentication' for root docs" },
|
|
440
|
+
title: {
|
|
441
|
+
type: "string",
|
|
442
|
+
description: "New display title stored in frontmatter. Does not rename the file or change the document path — use move_doc to relocate or rename on disk.",
|
|
443
|
+
},
|
|
440
444
|
content: { type: "string", description: "New content (replaces existing). Supports [text](doc://target-doc-path) to link inline to other documents, and [text](#heading-slug) to link to headings within this document. For code blocks, always specify a language identifier for syntax highlighting, e.g. ```typescript, ```python, ```bash, ```json, ```yaml, ```sql." },
|
|
441
445
|
tracked_files: {
|
|
442
446
|
type: "array",
|
|
@@ -24,6 +24,9 @@ export async function updateDoc(storageEngine, embeddingEngine, args) {
|
|
|
24
24
|
return { isError: true, content: [{ type: "text", text: `Documentation entry "${validated.path}" not found in any project.` }] };
|
|
25
25
|
}
|
|
26
26
|
const { doc, project: resolvedProject } = resolved;
|
|
27
|
+
if (validated.title !== undefined) {
|
|
28
|
+
doc.title = validated.title;
|
|
29
|
+
}
|
|
27
30
|
if (validated.content !== undefined) {
|
|
28
31
|
doc.content = validated.content;
|
|
29
32
|
}
|
|
@@ -45,6 +48,8 @@ export async function updateDoc(storageEngine, embeddingEngine, args) {
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
const changes = [];
|
|
51
|
+
if (validated.title !== undefined)
|
|
52
|
+
changes.push(`title (${doc.title})`);
|
|
48
53
|
if (validated.content !== undefined)
|
|
49
54
|
changes.push("content");
|
|
50
55
|
if (validated.tracked_files !== undefined)
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.0.
|
|
1
|
+
export declare const APP_VERSION = "1.0.24";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated version file - do not edit manually
|
|
2
|
-
export const APP_VERSION = '1.0.
|
|
2
|
+
export const APP_VERSION = '1.0.24';
|