@imenam/mcp-documentor
v1.0.25
Published
MCP server to create, manage and search project documentation with staleness tracking and semantic search.
Maintainers
Readme
@imenam/mcp-documentor
An MCP server to create, manage, and search project documentation — with staleness tracking and optional semantic search.
Connect it to Cursor, Claude Desktop, or any MCP-compatible agent to let your AI document, browse and verify your codebase docs without leaving the chat.
Features
- Create & update docs — write markdown documentation entries linked to source files; prefer partial edits via
patch_doc - Staleness tracking — automatically detects when tracked files have changed since the last doc update
- Semantic search — find relevant docs by meaning (requires an OpenAI API key)
- Multi-project support — organize docs into separate projects; MCP tools work across projects;
set_projectonly changes what the GUI shows - GUI — built-in web interface when a proxy is configured (
PROXY_URL); without it, the GUI worker is not started - Proxy-aware — integrates with the proxy-setup for GUI exposure
- Links & structure —
check_links,get_doc_tree,move_doc, andgit_diff_docfor maintenance workflows
Installation
npx -y @imenam/mcp-documentorOr install globally:
npm install -g @imenam/mcp-documentorGlobal install exposes:
mcp-documentor— MCP servermcp-documentor-migrate— CLI helper for migrating inline doc links (seescripts/migrate-links.js)
MCP Configuration
Add to your MCP client config (e.g. Cursor mcp.json):
{
"mcpServers": {
"mcp-documentor": {
"command": "npx",
"args": ["-y", "@imenam/mcp-documentor"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Environment Variables
| Variable | Required | Description |
|---|---|---|
| OPENAI_API_KEY | No | Enables semantic search via OpenAI embeddings (search_docs) |
| MCP_DOCUMENTOR_OPENAI_MODEL | No | Embedding model (default: text-embedding-3-small) |
| PROXY_URL | No | URL of the proxy server to register and launch the GUI |
| MCP_DATA_DIR | No | Overrides the default data directory (see Data storage) |
Optional .env at the package root (directory containing package.json discovered from the installed binary) is loaded when present.
Available Tools
| Tool | Description |
|---|---|
| create_doc | Create a new documentation entry linked to source files |
| get_doc | Retrieve a documentation entry with full content |
| get_doc_metadata | Get metadata and freshness status without loading content |
| list_docs | List docs with staleness indicators (optionally filter by project) |
| get_doc_tree | Return folder/doc structure for a project (or all projects) |
| update_doc | Fully replace content and/or metadata (prefer patch_doc for small edits) |
| patch_doc | Search-and-replace a fragment of a doc’s content |
| move_doc | Change a doc’s path (folder/name); use after renames to fix links |
| delete_doc | Permanently delete a documentation entry |
| search_docs | Semantic search over docs (natural language; requires OpenAI) |
| check_freshness | Staleness for one doc or a full project scan |
| refresh_file_snapshot | Mark tracked files as up-to-date without editing the doc |
| git_diff_doc | Git diff for tracked files vs snapshot baseline |
| check_links | Validate related_docs, doc:// links, and #heading anchors |
| list_projects | List all documentation projects |
| set_project | Switch the active project for the GUI only (not for MCP tools) |
Data Storage
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.
License
ISC
