DocFlow MCP Server

DocFlow MCP Server

Serves documentation for Git repositories via MCP, providing tools to search docs, retrieve feature details, WIP status, and full context. Enables LLM agents to access human and LLM-optimized documentation through stdio or SSE transports.

Category
访问服务器

README

DocFlow 🚀

Agent-Powered, LLM-Optimized Documentation Generation & MCP Serving System

DocFlow automatically generates, updates, and serves dual-audience documentation (rich Markdown for humans + high-density JSON for LLMs) from Git repository activity.

Unlike traditional doc tools that rely on direct LLM API keys or lock you into specific vendors, DocFlow generates minimal, focused "caveman prompts" that can be executed by any coding agent (Antigravity, Cursor, Claude Code, Cline, Codex, Hermes, Continue, etc.) within your organization's approved toolset.


🔑 Key Features

  • 🔗 1 App Repo : 1 Doc Repo Model: Strict 1-to-1 pairing between an application source repository (or monorepo root) and its dedicated documentation repository.
  • 🏗️ Infrastructure First: Automatically scans and documents system architecture, frameworks, and hosting environments (Dev/Staging/Prod) before chunking feature modules.
  • 🤖 Agent Agnostic: Zero LLM API key dependencies. Generates structured task prompts in prompts/pending/ for any agent to execute.
  • 📄 Dual-Audience Output: Maintains human-readable index.md and token-optimized context.json for every feature module.
  • 🌐 MCP Server Included: Built-in FastMCP server serving documentation tools (search_docs, get_feature, get_wip, get_full_context) over stdio and sse.
  • 📁 Decoupled Doc Repo: Keeps documentation in a separate, dedicated repository to keep application source repositories clean.
  • 📌 Work-In-Progress Tracking: Scans active feature branches and updates status/wip.md & status/wip.json.
  • 🌐 Standard Specification Support: Automatically generates llms.txt and llms-full.txt discovery files.
  • 🐙 Multi-Platform MR/PR Creation: Automated branch creation, committing, pushing, and Pull/Merge Request opening for GitHub, GitLab, and Bitbucket.

📐 Architecture & Workflow

App Repo (Merge/Release) ──→ DocFlow Git Analyzer
                                    │
                                    ▼
                          Prompt Builder (Jinja2)
                                    │
                         Caveman Task Prompt
                                    │
                                    ▼
                           Agent Runner (shell / manual)
                                    │
                                    ▼
                         Target Docs Repository
                          ├── architecture/ (Hosting & Frameworks) [Init First]
                          ├── features/<feature>/
                          │     ├── index.md (Human)
                          │     └── context.json (LLM)
                          ├── status/ (wip.md, wip.json)
                          ├── prompts/ (pending/ & completed/)
                          ├── llms.txt & llms-full.txt
                          └── CONVENTIONS.md
                                    │
                                    ▼
                         Doc Branch & MR Creator
                                    │
                                    ▼
                           FastMCP Server
                          (stdio / SSE transports)

⚡ Quick Start

Installation

# Clone the repository
git clone https://github.com/YOUR_USERNAME/docflow2.git
cd docflow2

# Create a virtual environment (recommended for Linux/PEP 668)
python3 -m venv --without-pip .venv
curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python3

# Install DocFlow in editable mode
.venv/bin/pip install -e .

# Activate the virtual environment
source .venv/bin/activate

Basic Commands

# 1. Initialize documentation for an application repository
docflow init --repo /path/to/app-repo --docs /path/to/docs-repo --mode manual

# 2. Track active feature branches & work-in-progress
docflow status --repo /path/to/app-repo --docs /path/to/docs-repo

# 3. Generate documentation update prompts from git diffs
docflow generate --repo /path/to/app-repo --docs /path/to/docs-repo --from main~1 --to main

# 4. Commit doc updates, push branch, and create Pull Request
docflow publish --docs /path/to/docs-repo --platform github

# 5. Start the MCP Server for LLM agent integration
docflow serve --docs /path/to/docs-repo --mode stdio

📂 Documentation Repository Layout

docs-repo/
├── CONVENTIONS.md                        # Documentation format standards
├── llms.txt                              # Discovery index
├── llms-full.txt                         # Concatenated context file
│
├── architecture/                         # Baseline architecture & infrastructure
│   ├── index.md                          # Frameworks, Dev/Staging/Prod envs
│   └── context.json                      # Compact LLM metadata
│
├── features/                             # Feature-based documentation
│   ├── authentication/
│   │   ├── index.md                      # Detailed human docs
│   │   ├── context.json                  # Compact LLM JSON
│   │   ├── files.md                      # File manifest
│   │   └── changelog.md                  # Historical change log
│   └── ...
│
├── status/                               # Work-in-progress active branch docs
│   ├── wip.md
│   └── wip.json
│
└── prompts/                              # Task prompt repository
    ├── pending/                          # Prompts waiting for agent execution
    └── completed/                        # Completed task prompts (audit log)

⚙️ Configuration (.docflow.yml)

Place .docflow.yml in your application repository root or documentation repository root:

project:
  name: "MyApplication"

app:
  repo_path: "/path/to/app-repo"

docs:
  repo_path: "/path/to/docs-repo"

agent:
  mode: "shell"                          # "shell" (automatic CLI agent execution) or "manual" (stage prompts in prompts/pending/)
  command: "agy --dangerously-skip-permissions --add-dir {docs_repo} -p \"$(cat {prompt_file})\""

platform:
  type: "github"                         # github | gitlab | bitbucket | generic
  auto_mr: true

generation:
  full_diff_threshold: 200
  ignore:
    - "*.lock"
    - "node_modules/"
    - "dist/"
    - "__pycache__/"

Agent Execution Modes

  • Shell Mode (mode: shell): DocFlow invokes your CLI coding agent (e.g., agy, opencode, claude) to execute task prompts immediately. The agent writes files directly into target paths in your documentation repository, and DocFlow moves executed prompts from prompts/pending/ to prompts/completed/.
  • Manual Mode (mode: manual): DocFlow generates prompts inside prompts/pending/. Each prompt includes an explicit CRITICAL OUTPUT FILE LOCATION DIRECTIVE with exact target absolute paths so that external agents write files directly into the target docs repository.

📊 Configuration Dashboard (docflow info)

View repository pairing, agent settings, documented feature modules, and pending task prompts at any time:

docflow info

Output:

DocFlow Information Dashboard
  Project Name: MyApplication
  App Repo:     /path/to/app-repo (exists)
  Docs Repo:    /path/to/docs-repo (exists)
  Agent Mode:   shell (agy --dangerously-skip-permissions --add-dir {docs_repo} -p "$(cat {prompt_file})")
  Platform:     github
  Documented Features (7): config, core, components, scripts, public, pages, lib
  Pending Prompts (0): None

🧪 Testing

Run the full pytest suite:

pytest -v

📜 License

This project is licensed under the MIT License.

推荐服务器

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

官方
精选