Skip to main content
Glama

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.


Related MCP server: mcp-docs

๐Ÿ“ 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.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI agents to access, search, and understand structured package documentation and source code from Git repositories. It automatically generates specialized tools to browse module overviews, components, and detailed documentation for technical libraries.
    1
    428
    7
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Generic MCP server that exposes Markdown documentation to LLMs, enabling them to search and answer questions about any software documentation.
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    MCP server that fetches documentation from public git repositories at specific versions, enabling AI coding assistants to access up-to-date, ref-pinned docs from source repos.
    7
    2
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.

  • MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/debjit/docflow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server