document-manager-mcp

document-manager-mcp

MCP server for managing product documentation as markdown files. Supports creating, reading, updating, deleting, and searching docs with optional semantic search.

Category
访问服务器

README

Document Manager MCP

An MCP (Model Context Protocol) server for managing product documentation as markdown files. Use it from Cursor, Claude Desktop, or any MCP client to create, read, update, delete, and search documentation.

Document types

All files are stored as markdown under a configurable project root, in these categories:

Type Folder Use for
feature-specs docs/feature-specs/ Feature specifications
jtbd docs/jtbd/ Jobs to be done
user-stories docs/user-stories/ User stories
api docs/api/ API documentation

A special file docs/product-vision-and-strategy.md holds the product vision and strategy. Use the product_vision_and_strategy tool to view it and create it (with a default template) if it doesn’t exist.

Project identity (multiple MCPs)

When you run several Document Manager MCPs (e.g. one per project), set a project name so you can tell them apart in Cursor:

  • Environment variable: DOCS_PROJECT_NAME — short label for this project (e.g. my-app, backend-api).
  • The server then appears in Cursor as "document-manager (my-app)" instead of just "document-manager".

Example with two projects:

{
  "mcpServers": {
    "document-manager-my-app": {
      "command": "npx",
      "args": ["document-manager-mcp"],
      "env": {
        "DOCS_PROJECT_ROOT": "/path/to/my-app",
        "DOCS_PROJECT_NAME": "my-app"
      }
    },
    "document-manager-backend": {
      "command": "npx",
      "args": ["document-manager-mcp"],
      "env": {
        "DOCS_PROJECT_ROOT": "/path/to/backend",
        "DOCS_PROJECT_NAME": "backend-api"
      }
    }
  }
}

You’ll see two MCPs: document-manager (my-app) and document-manager (backend-api).

Project root

Set the project root so the MCP knows where to read/write files:

  • Environment variable: DOCS_PROJECT_ROOT (absolute or relative path).
  • If unset, the server uses the current working directory when the server starts.

Example: if DOCS_PROJECT_ROOT=/Users/you/my-product, then:

  • Feature specs go in /Users/you/my-product/docs/feature-specs/
  • API docs go in /Users/you/my-product/docs/api/, etc.

MCP tools

Tool Description
list_docs List all docs, optionally filtered by type.
read_doc Read a doc by docType and slug (filename).
write_doc Create or overwrite a doc (markdown content).
create_doc Create a new doc; fails if it already exists.
delete_doc Delete a doc by type and slug.
search_docs Search by text. With DOCS_EMBEDDING_PROVIDER=local, uses semantic search (by meaning); otherwise keyword search. Optional type filter, mode, limit.
product_vision_and_strategy View the product vision and strategy doc; creates docs/product-vision-and-strategy.md with a default template if it doesn’t exist.

MCP resources

Docs are exposed as resources with URIs:

  • Pattern: doc://{docType}/{slug}
  • Examples: doc://feature-specs/auth-spec.md, doc://api/users-endpoint.md
  • Product vision and strategy: doc://product-vision-and-strategy (single resource; create the file with the product_vision_and_strategy tool if needed).

Clients can list and read these resources like files (e.g. in Cursor’s MCP resource UI).

Run with npx (recommended)

No install needed. Use npx so the package is run on demand:

npx document-manager-mcp

With environment variables:

DOCS_PROJECT_ROOT=/path/to/your/project DOCS_PROJECT_NAME=my-project npx document-manager-mcp

In Cursor (or another MCP client), configure the server to run via npx:

{
  "mcpServers": {
    "document-manager": {
      "command": "npx",
      "args": ["document-manager-mcp"],
      "env": {
        "DOCS_PROJECT_ROOT": "/ABSOLUTE/PATH/TO/YOUR/PROJECT",
        "DOCS_PROJECT_NAME": "your-project"
      }
    }
  }
}

Replace /ABSOLUTE/PATH/TO/YOUR/PROJECT with the folder that should contain the docs/ tree. DOCS_PROJECT_NAME is optional; use it when you run multiple Document Manager MCPs so you can tell them apart.

Semantic search (local embeddings)

To search by meaning (e.g. “login” matching “authentication”, “sign-in”) instead of exact text only, use a local embedding model. No API key required.

Set in your MCP server env:

  • DOCS_EMBEDDING_PROVIDER=local — enables semantic search using Transformers.js and the default model Xenova/all-MiniLM-L6-v2 (downloaded on first use, then cached).
  • DOCS_EMBEDDING_MODEL (optional) — another Hugging Face model ID for feature extraction (e.g. Xenova/all-mpnet-base-v2 for higher quality, larger download).

Example:

{
  "mcpServers": {
    "document-manager": {
      "command": "npx",
      "args": ["document-manager-mcp"],
      "env": {
        "DOCS_PROJECT_ROOT": "/path/to/your/project",
        "DOCS_PROJECT_NAME": "my-project",
        "DOCS_EMBEDDING_PROVIDER": "local"
      }
    }
  }
}

The first semantic search will build an index under .document-manager/embedding-index.json; later searches reuse it until docs change. You can pass mode: "keyword" to search_docs to force exact-text search, or mode: "semantic" when local embeddings are enabled.

Cursor setup

  1. Configure Cursor
    In Cursor: Settings → MCP (or edit your MCP config file). Add a server entry using npx and set the project root via env:

    {
      "mcpServers": {
        "document-manager": {
          "command": "npx",
          "args": ["document-manager-mcp"],
          "env": {
            "DOCS_PROJECT_ROOT": "/ABSOLUTE/PATH/TO/YOUR/PROJECT",
            "DOCS_PROJECT_NAME": "your-project"
          }
        }
      }
    }
    

    Replace /ABSOLUTE/PATH/TO/YOUR/PROJECT with the folder that should contain the docs/ tree (feature-specs, jtbd, user-stories, api). Use DOCS_PROJECT_NAME as a short label when you have multiple Document Manager MCPs (optional).

  2. Restart Cursor (or reload MCP) so it picks up the server.

Running from source

If you develop or fork this repo and want to run the built server without npx:

git clone https://github.com/rfbatista/document-manager-mcp.git
cd document-manager-mcp
npm install
npm run build

Then in your MCP config use "command": "node" and "args": ["/ABSOLUTE/PATH/TO/document-manager-mcp/build/index.js"].

Claude Desktop setup

Add the server to claude_desktop_config.json and run it with npx:

{
  "mcpServers": {
    "document-manager": {
      "command": "npx",
      "args": ["document-manager-mcp"],
      "env": {
        "DOCS_PROJECT_ROOT": "/ABSOLUTE/PATH/TO/YOUR/PROJECT",
        "DOCS_PROJECT_NAME": "your-project"
      }
    }
  }
}

Development

npm install
npm run build   # build once
npm run start   # run built server (stdio)

Use stderr for logs; stdout is used for MCP JSON-RPC.

License

MIT

document-manager-mcp

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选