Skip to main content
Glama
Documentation Manager

Documentation Manager

by arimxyer

Documentation Manager

PyPI version Python Version License

Comprehensive documentation lifecycle management powered by an MCP (Model Context Protocol) server. Automates documentation creation, maintenance, quality assessment, and synchronization for software projects.

Features

  • Automatic change detection - Track code changes and affected documentation

  • Link validation - Find broken links and missing assets

  • Quality assessment - Evaluate docs against 7 quality criteria

  • Symbol tracking - TreeSitter-based code symbol extraction (Python, Go, TypeScript, Rust)

  • Dependency mapping - Automatic code-to-docs relationships

  • Platform detection - Auto-detect MkDocs, Sphinx, Hugo, Docusaurus, etc.

  • Documentation migration - Restructure docs with git history preservation

Related MCP server: Spec Workflow MCP

Installation

The doc-management plugin provides an interactive documentation workflow with specialized agents and quick commands, powered by the doc-manager MCP server.

Install:

# Add the marketplace
/plugin marketplace add arimxyer/doc-manager-mcp

# Install the plugin (automatically configures MCP server)
/plugin install doc-manager@doc-manager-suite

What you get:

  • @doc-expert - Documentation expert who analyzes state and directs next steps

  • @doc-writer - Content specialist who creates/updates docs

  • /doc-status, /doc-sync, /doc-quality - Quick commands for common workflows

Example workflow:

You: "Set up documentation management"
Claude: [Invokes @doc-expert to detect platform and initialize]

You: "/doc-sync"
Claude: [Detects changes, updates docs via @doc-writer, validates, updates baselines]

You: "Check quality before release"
Claude: [Runs quality assessment and shows actionable findings]

See the Claude Code Plugin guide for details.


Standalone MCP Server

For using the MCP server without the plugin.

Claude Code:

claude mcp add doc-manager --scope project -- uvx doc-manager-mcp

Claude Desktop:

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "doc-manager": {
      "command": "uvx",
      "args": ["doc-manager-mcp"]
    }
  }
}

Restart your client. Your AI assistant can then use the 8 doc-manager tools directly.

Other MCP clients:

See Installation Guide for local development setup and alternative installation methods.

Quick Start

With Claude Code plugin:

You: "Set up documentation management for this project"
You: "/doc-sync"

With any MCP client:

Ask your AI assistant to initialize documentation management, check sync status, or validate quality. The AI will use the appropriate tools (docmgr_init, docmgr_sync, etc.) automatically.

See Quick Start Guide for complete workflows and examples.

MCP Server Tools

The doc-manager MCP server provides 8 tools for documentation management:

  • docmgr_init - Initialize doc-manager for a project (modes: existing, bootstrap)

  • docmgr_detect_changes - Detect code/doc changes (read-only, never writes baselines)

  • docmgr_detect_platform - Auto-detect documentation platform (MkDocs, Sphinx, Hugo, etc.)

  • docmgr_validate_docs - Check for broken links, missing assets, invalid code snippets

  • docmgr_assess_quality - Evaluate documentation against 7 quality criteria

  • docmgr_update_baseline - Update all baselines atomically (repo, symbols, dependencies)

  • docmgr_sync - Orchestrate change detection + validation + quality + baseline updates

  • docmgr_migrate - Restructure/migrate documentation with git history preservation

See Tools Reference for complete API documentation.

Architecture

Baseline System

Doc-manager maintains 3 baseline files in .doc-manager/memory/:

  1. repo-baseline.json - File checksums and metadata

  2. symbol-baseline.json - TreeSitter code symbols (functions, classes, config fields)

  3. dependencies.json - Code-to-docs dependency mappings

Workflow:

1. docmgr_init              → Create initial baselines
2. (make code changes)
3. docmgr_detect_changes    → Detect changes (read-only)
4. (update documentation)
5. docmgr_update_baseline   → Refresh baselines

Or use docmgr_sync mode="resync" to combine steps 3-5.

Configuration

Example .doc-manager.yml:

platform: mkdocs
use_gitignore: true
exclude:
  - "tests/**"
sources:
  - "src/**/*.py"
docs_path: docs
metadata:
  language: Python
  created: '2025-01-19T20:00:00'
  version: '2.0.0'

See Configuration Reference for all options.

Development

Running tests

# All tests
uv run pytest

# Unit tests only
uv run pytest tests/unit/

# With coverage
uv run pytest --cov=doc_manager_mcp

Running the server locally

# Install in development mode
pip install -e .

# Run server (stdio transport)
doc-manager-mcp

# Or with uv
uvx --from . doc-manager-mcp

Linting

# Ruff (linter + formatter)
uv run ruff check .
uv run ruff format .

# Pyright (type checker)
uv run pyright

Adding new tools

  1. Create implementation in doc_manager_mcp/tools/

  2. Define Pydantic model in doc_manager_mcp/models.py

  3. Register tool in doc_manager_mcp/server.py with @mcp.tool

  4. Add tests in tests/unit/ and tests/integration/

  5. Update documentation

Documentation

License

MIT License

Available Tools

8 tools
docmgr_assess_qualityA
Read-onlyIdempotent

Assess documentation quality against 7 criteria with scores and actionable findings.

Use when: Auditing documentation health, before major releases, or tracking quality improvements over time Result: Returns quality scores (good/fair/poor) for each criterion plus specific findings, issues, and metrics Mode: Read-only (analyzes documentation only)

7 Quality criteria evaluated:

  • Relevance: Addresses current user needs (not outdated)

  • Accuracy: Reflects actual codebase state

  • Purposefulness: Clear goals and target audience

  • Uniqueness: No redundant or conflicting information

  • Consistency: Aligned terminology, formatting, style

  • Clarity: Precise language and navigation

  • Structure: Logical organization and hierarchy

Typical workflow: Run periodically to track quality trends, use findings to prioritize documentation improvements

Inputs: project_path (required), docs_path, criteria. Returns: result

docmgr_detect_changesA
Read-onlyIdempotent

Detect code changes without modifying baselines (pure read-only).

Use when: Checking if documentation is out of sync after code changes Result: Lists changed files (categorized as code/docs/assets/etc.), affected documentation, and optional semantic changes Mode: Read-only (never modifies any files)

Modes:

  • mode="checksum": Compare current file checksums against repo-baseline.json

  • mode="git_diff": Compare current files against a specific git commit

Set include_semantic=true to detect symbol-level changes (functions/classes added/modified/deleted).

Typical workflow: Run after code changes to identify which docs may need updates, before deciding whether to update documentation or baselines

Inputs: project_path (required), since_commit, mode, include_semantic. Returns: object

docmgr_detect_platformA
Read-onlyIdempotent

Auto-detect documentation platform (MkDocs, Sphinx, Hugo, etc.) or recommend one.

Use when: Setting up doc-manager for first time and unsure which platform is in use Result: Returns detected platform or recommendations based on project language and structure Mode: Read-only (analyzes project files only)

Detects by checking for platform-specific config files (mkdocs.yml, conf.py, config.toml, docusaurus.config.js).

Typical workflow: Run before docmgr_init to determine correct platform value for configuration

Inputs: project_path (required). Returns: result

docmgr_initA
Idempotent

Initialize doc-manager for a project (existing docs or create new).

Use when: Setting up doc-manager for the first time in a project Result: Creates .doc-manager.yml, baselines (repo, symbols, dependencies), and optionally bootstraps documentation structure Mode: State-modifying (creates files and directories)

Modes:

  • mode="existing": For projects with existing documentation - creates config and baselines only

  • mode="bootstrap": For new projects - creates documentation structure from templates plus config and baselines

Typical workflow: Run once at project setup, before any other doc-manager tools

Inputs: project_path (required), mode, platform, exclude_patterns, +3 more. Returns: object

docmgr_migrateA

Migrate or restructure documentation while optionally preserving git history.

Use when: Moving docs to new location, changing documentation platform, or reorganizing documentation structure Result: Moves/restructures documentation files, optionally rewrites internal links, regenerates TOC, preserves git history Mode: State-modifying (moves files, modifies content)

Options:

  • preserve_history=true: Uses git mv to maintain file history

  • rewrite_links=true: Updates internal links to match new structure

  • regenerate_toc=true: Rebuilds table of contents

  • dry_run=true: Shows what would be done without making changes

Typical workflow: Set dry_run=true first to preview changes → review plan → run with dry_run=false to execute migration

Inputs: project_path (required), source_path (required), target_path, target_platform, +4 more. Returns: result

docmgr_syncA
Idempotent

Orchestrate complete documentation sync: detect changes, validate, assess quality, optionally update baselines.

Use when: After code changes to get complete documentation health report, or after doc updates to reset baselines Result: Comprehensive sync report with changed files, affected docs, validation issues, quality scores, and baseline status Mode: Depends on mode parameter - "check" is read-only, "resync" modifies baselines

Modes:

  • mode="check": Read-only analysis - detects changes, validates docs, assesses quality (no baseline updates)

  • mode="resync": Full sync - runs all checks PLUS updates all baselines atomically

This tool orchestrates: change detection → affected doc mapping → validation → quality assessment → optional baseline update.

Typical workflow: Use mode="check" after code changes to see documentation impact → fix identified issues → use mode="resync" to update baselines

Inputs: project_path (required), mode, docs_path. Returns: result

docmgr_update_baselineA
Idempotent

Update all baseline files to reflect current project state.

Use when: After updating documentation to match code changes, resetting the "clean" baseline Result: Atomically updates three baseline files: repo-baseline.json (checksums), symbol-baseline.json (code symbols), dependencies.json (code-doc mappings) Mode: State-modifying (rewrites baseline files)

This resets change detection to current state - run this when documentation is in sync with code.

Typical workflow: After writing/updating docs → run this to update baselines → future change detection starts from new baseline

Inputs: project_path (required), docs_path. Returns: object

docmgr_validate_docsA
Read-onlyIdempotent

Validate documentation for broken links, missing assets, code snippet syntax, and convention compliance.

Use when: Before releases, after major doc updates, or as part of CI/CD to catch documentation issues Result: Returns list of validation issues categorized by type (broken links, missing assets, syntax errors, convention violations) with file/line numbers Mode: Read-only (only analyzes documentation)

Optional checks:

  • check_links: Validate internal links point to existing files

  • check_assets: Verify images/assets exist and have alt text

  • check_snippets: Validate code block syntax

  • validate_code_syntax: Deep syntax validation with TreeSitter (slower)

  • validate_symbols: Check documented symbols exist in codebase

Typical workflow: Run regularly to maintain documentation quality, fix reported issues, re-run until clean

Inputs: project_path (required), docs_path, check_links, check_assets, +3 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: quality assessment, change detection, platform detection, initialization, migration, orchestrated sync, baseline updates, and validation. No two tools overlap in functionality; even docmgr_sync, which orchestrates multiple steps, is distinct as a high-level workflow tool.

    Naming Consistency5/5

    All tools follow the consistent pattern 'docmgr_verb_noun' (e.g., assess_quality, detect_changes, update_baseline), with minor abbreviations like 'init' and 'sync' that still fit the pattern. The prefix and underscore convention are uniform throughout.

    Tool Count5/5

    With 8 tools, the server is well-scoped for a documentation management system. Each tool covers a necessary operation (init, validate, assess, detect, migrate, sync, baseline update, platform detection) without being bloated or sparse.

    Completeness5/5

    The tool set covers the full documentation management lifecycle: setup (docmgr_init, docmgr_detect_platform), maintenance (docmgr_detect_changes, docmgr_validate_docs, docmgr_assess_quality), restructuring (docmgr_migrate), and baseline resetting (docmgr_update_baseline). The orchestrating tool docmgr_sync ties them together. No obvious gaps for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers