docs2mcp

docs2mcp

Enables any compatible MCP client or AI agent to retrieve documentation from a local directory of Markdown, HTML, or TXT files via a remote, read-only MCP server.

Category
访问服务器

README

docs2mcp

Turn a directory of Markdown, HTML, or TXT files into a remote, read-only MCP server that any compatible MCP client or agent can connect to for documentation retrieval. This includes AskMesh, Claude integrations, Codex, and custom MCP clients.

Quick start

uvx docs2mcp serve ./docs \
  --base-url https://docs.example.com/docs \
  --host 0.0.0.0 \
  --port 8765

uvx creates an isolated environment from PyPI and runs the published docs2mcp CLI without a manual installation step. For local development from a checkout, use python -m docs2mcp.runtime instead.

Enable incremental synchronization with file watching and periodic reconciliation:

uvx docs2mcp serve ./docs \
  --host 0.0.0.0 \
  --port 8765 \
  --watch \
  --sync-interval 30

The first startup scans the entire directory. Later changes are applied per document: new files are inserted, modified files are re-indexed, deleted files are removed, and unchanged files are skipped. The watcher uses a short debounce window and the periodic scan provides a fallback for filesystems that do not reliably emit events.

When binding to a specific public address with DNS-rebinding protection enabled, allow the incoming Host header explicitly:

uvx docs2mcp serve ./docs \
  --host 0.0.0.0 \
  --port 8765 \
  --allowed-host 'docs.example.com:*'

Use the same Python interpreter for installation and startup. docs2mcp requires the official MCP Python SDK mcp>=1.27.0,<2; an older or unrelated package named mcp does not provide mcp.server.fastmcp.

The legacy doc2mcp command remains available as a compatibility alias.

The process prints the MCP connection configuration on startup. Authentication is optional: pass --token to enable Bearer authentication, or omit it to run without authentication.

{
  "endpoint": "http://127.0.0.1:8765/mcp",
  "auth_type": "none",
  "token": null,
  "search_tool": "search_docs",
  "read_tool": "get_document",
  "contract_version": "agent-qa.docs/v1"
}

Enter the endpoint, authentication mode, search_docs, and get_document values in your MCP client configuration. When auth_type is none, select no authentication and leave the token empty. Clients that support Streamable HTTP can connect to the same endpoint without an AskMesh-specific adapter.

GET /readyz reports the document count and the latest synchronization counters, including added, updated, deleted, skipped, failed, duration, and the last error.

Supported formats

The MVP supports .md, .markdown, .txt, .html, and .htm. Indexing uses SQLite FTS5, so no separate vector database is required.

MCP contract

The server implements the interoperable agent-qa.docs/v1 document contract and exposes two read-only tools:

  • search_docs(query, limit): returns route, title, url, snippet, and score.
  • get_document(route, max_characters): returns document content, sections, and a citation URL.

search_docs.query uses SQLite FTS5 syntax. Whitespace is an AND query, OR matches either term, quoted text searches an exact phrase, NOT excludes a term, and * enables prefix matching. It is not semantic natural-language search; clients should show this syntax to users.

Connect from any MCP client

Use the Streamable HTTP endpoint and the two tool names in any client that supports remote MCP connections. AskMesh is one supported integration; Claude-based clients, Codex, and custom agents can use the same endpoint and read-only contract.

Current limitations

This release is a single-host MVP: documents are imported from a local directory and the index is stored in SQLite. Git synchronization, PDF parsing, object storage, vector search, and a multi-tenant control plane are planned for later releases.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选