Install
Prerequisites
Section titled “Prerequisites”- 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)
Install and initialize
Section titled “Install and initialize”pip install docforge-clidocforge init my-projectcd my-projectConfigure
Section titled “Configure”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).
Bring up the database
Section titled “Bring up the database”docker compose up -d dbdocforge init-dbIngest your sources
Section titled “Ingest your sources”docforge ingestFirst ingest downloads the ~10 GB Qwen3-Embedding-4B model into ~/.cache/huggingface/. Subsequent runs are fast — content_hash deduplication skips unchanged sources.
Serve to your AI assistant
Section titled “Serve to your AI assistant”docforge serve # MCP server on stdiodocforge serve --api # FastAPI search API insteadPoint your MCP-capable assistant (Claude Code, Cursor, Copilot) at the running server. The search_documentation tool is discovered automatically.
Verify
Section titled “Verify”docforge statusdocforge 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:
# Generic (no auth)pip install docforge-cliclaude mcp add -s user -e DOCFORGE_API_URL=https://docforge.example.com \ docforge -- docforge serve --remote-api $DOCFORGE_API_URL
# Static Bearer tokenpip install docforge-cliclaude 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