Skip to content

Install

  • Python 3.12+
  • Docker (for the local Postgres + pgvector container)
  • A Hugging Face token (optional — not required for the default Qwen3-Embedding-4B model which is Apache 2.0 and publicly accessible)
Terminal window
pip install docforge-cli
docforge init my-project
cd my-project

Edit the three files the scaffolder drops in:

  • docforge.yml — your Confluence base URL and embedding settings.
  • sources.yml — the Confluence pages and local git repo paths to index.
  • .env — credentials (CONFLUENCE_EMAIL, CONFLUENCE_API_TOKEN, HF_TOKEN, DATABASE_URL).
Terminal window
docker compose up -d db
docforge init-db
Terminal window
docforge ingest

First ingest downloads the ~10 GB Qwen3-Embedding-4B model into ~/.cache/huggingface/. Subsequent runs are fast — content_hash deduplication skips unchanged sources.

Terminal window
docforge serve # MCP server on stdio
docforge serve --api # FastAPI search API instead

Point your MCP-capable assistant (Claude Code, Cursor, Copilot) at the running server. The search_documentation tool is discovered automatically.

Terminal window
docforge status
docforge search "how do we handle retries"

status shows indexed source + chunk counts. search runs a test query against the index and prints top results with source attribution.

Use a hosted instance (no local DB required)

Section titled “Use a hosted instance (no local DB required)”

If your team already operates a docforge deployment and you only want to use it from your editor (Claude Code, etc.), you don’t need to clone, ingest, or run Postgres locally:

Terminal window
# Generic (no auth)
pip install docforge-cli
claude mcp add -s user -e DOCFORGE_API_URL=https://docforge.example.com \
docforge -- docforge serve --remote-api $DOCFORGE_API_URL
# Static Bearer token
pip install docforge-cli
claude mcp add -s user \
-e DOCFORGE_API_URL=https://docforge.example.com \
-e DOCFORGE_API_TOKEN=eyJ... \
-e DOCFORGE_AUTH=bearer \
docforge -- docforge serve --remote-api $DOCFORGE_API_URL --auth bearer
# Entra (Azure AD)
pip install docforge-cli[azure]
az login --tenant <your-tenant-id>
claude mcp add -s user \
-e DOCFORGE_API_URL=https://docforge.example.com \
-e DOCFORGE_AUDIENCE=api://<app-registration-uri> \
-e DOCFORGE_AUTH=azure \
-e DOCFORGE_TEAM=your-team \
docforge -- docforge serve --remote-api $DOCFORGE_API_URL --auth azure