Skip to content

Claude Code Integration ​

The recommended way to use KodaDocs is through Claude Code's MCP (Model Context Protocol) integration. This gives Claude direct access to all KodaDocs pipeline tools, letting it orchestrate the entire documentation process intelligently.

Setup ​

Add the KodaDocs MCP server to your Claude Code settings file at ~/.claude/settings.json:

json
{
  "mcpServers": {
    "kodadocs": {
      "command": "uvx",
      "args": ["kodadocs", "mcp"]
    }
  }
}

That's it. Claude Code will automatically connect to the KodaDocs MCP server when you start a session.

Available MCP Tools ​

Claude has access to 9 specialized tools:

ToolDescription
detect_frameworkIdentifies your project's framework (Next.js, Django, etc.)
discover_routesFinds all routes and pages in your application
analyze_codebaseExtracts code structure, error patterns, and data models
capture_screenshotsTakes screenshots of each route with Playwright
annotate_screenshotsAdds numbered callouts to interactive UI elements
assemble_vitepressBuilds the final documentation site
save_manifestSaves pipeline progress for resumption
load_manifestLoads existing pipeline state
deploy_siteDeploys to Cloudflare, Vercel, Netlify, or GitHub Pages

Typical Workflow ​

When you tell Claude to generate docs, it follows this pipeline:

  1. Framework Detection — identifies your project type
  2. Route Discovery — finds all pages and endpoints via static analysis (with Playwright crawler fallback)
  3. Codebase Analysis — extracts functions, error patterns, and data models using tree-sitter
  4. Screenshot Capture — visits each route in a headless browser, captures full-page screenshots
  5. Annotation — adds numbered callout circles to buttons, links, headings, and other interactive elements
  6. Article Writing — Claude writes end-user documentation referencing specific UI elements
  7. Site Assembly — compiles everything into a VitePress static site
  8. Deployment (optional) — publishes to your hosting provider

Getting the Best Results ​

Here are tips for getting great documentation:

  • Run your app locally before generating docs, so KodaDocs can capture screenshots. If your app isn't running, docs are generated from code analysis alone.
  • Provide auth credentials if your app has protected pages — Claude will ask about this during setup.
  • Review and edit the generated articles. KodaDocs provides confidence scores (0.0–1.0) — articles below 0.7 may need human review.
  • Use incremental updates after your app changes — Claude can call kodadocs update to re-capture only changed routes.

Environment Variables ​

VariablePurpose
ANTHROPIC_API_KEYRequired for AI-powered article generation
KODADOCS_LICENSE_KEYRequired for Pro themes and hosted deployment
ANTHROPIC_MODELOverride the default AI model (default: claude-sonnet-4-6)

Was this page helpful?

Powered by KodaDocs