Skip to main content

Fetch docs, embed locally, expose via MCP for AI agents.

Project description

docs-kit

PyPI version License: MIT Python CI

Fetch docs from GitBook, Mintlify, or local files, embed them locally, and expose retrieval to AI tools over MCP.

No API keys are required for the default local embedding path.

What it does

  • Fetches public docs from GitBook and Mintlify sites via llms-full.txt / llms.txt (with sitemap.xml fallback for Mintlify)
  • Ingests local .md and .txt files
  • Stores vectors in local Qdrant by default
  • Serves an MCP server over stdio or SSE
  • Exposes MCP tools to ingest, remove, and list sources at runtime
  • Installs MCP config for supported AI clients

Install

The recommended install method is pipx — it puts docs-kit on your global PATH without touching your system Python or any project venv:

pipx install docs-kit

Install pipx first if you don't have it:

brew install pipx
pipx ensurepath   # adds ~/.local/bin to PATH

This matters for MCP installs. When docs-kit is on PATH, docs-kit install claude-code writes the absolute binary path into the agent config (e.g. /Users/you/.local/pipx/venvs/docs-kit/bin/docs-kit) so the MCP server works from any directory, not just your project folder.

If you install globally with pipx and do not have a project yet, docs-kit install <agent> will bootstrap a user config at ~/.docs-kit/docs-kit.yaml and point the MCP entry at it automatically.

Or with plain pip (works, but binary won't be on global PATH unless you're in the right venv):

pip install docs-kit

Quickstart

# 0. Install (once)
pipx install docs-kit

# 1. Install into your client
docs-kit install codex
docs-kit install claude-code

# 2. Ingest docs (uses ~/.docs-kit/docs-kit.yaml if no local config exists)
docs-kit ingest https://docs.elevenlabs.io

# 3. Check the collection
docs-kit inspect

# 4. Optional: create a project-local config instead
docs-kit init

Commands

docs-kit init

Create a project-local docs-kit.yaml.

docs-kit init
docs-kit init --dir ./sandbox

docs-kit ingest <path-or-url>

Ingest a local file, directory, or documentation URL into the vector store. Supports GitBook and Mintlify sites out of the box — auto-detected by default.

docs-kit ingest ./docs
docs-kit ingest https://docs.example.com
docs-kit ingest https://docs.mintlify-site.com --provider mintlify
docs-kit ingest https://docs.gitbook-site.com --provider gitbook
docs-kit ingest ./docs --recreate

--provider accepts auto (default), gitbook, or mintlify. In auto mode, the fetcher tries /llms-full.txt/llms.txt/sitemap.xml in order.

docs-kit fetch <url>

Download GitBook docs as Markdown without ingesting them.

docs-kit fetch https://docs.example.com
docs-kit fetch https://docs.example.com --output ./downloaded-docs

docs-kit serve

Run the MCP server. stdio is the default. Use SSE for HTTP clients.

docs-kit serve
docs-kit serve --transport sse --port 3001
docs-kit serve --config ./docs-kit.yaml

Without --config, docs-kit uses this precedence:

  1. ./docs-kit.yaml
  2. ~/.docs-kit/docs-kit.yaml (auto-created on first global use)

docs-kit install <agent>

Install docs-kit into a supported client config.

docs-kit install claude-code
docs-kit install codex
docs-kit install claude-code --project
docs-kit install cursor --config ./docs-kit.yaml

If you run docs-kit install <agent> outside a project and omit --config, docs-kit creates ~/.docs-kit/docs-kit.yaml and installs the MCP server with an absolute --config pointing there.

docs-kit query <text>

Run retrieval directly from the CLI.

docs-kit query "How do I authenticate?"
docs-kit query "getting started" --limit 3

docs-kit inspect

Show collection and embedding configuration details.

docs-kit inspect
docs-kit inspect --config ./docs-kit.yaml

docs-kit doctor

Check environment variables, config presence, and Qdrant connectivity.

docs-kit doctor
docs-kit doctor --config ./docs-kit.yaml

docs-kit list

List ingested sources with their ingestion timestamps.

docs-kit list
docs-kit list --config ./docs-kit.yaml

docs-kit remove <source>

Remove an ingested source by URL or file path.

docs-kit remove https://docs.example.com/page
docs-kit remove ./docs/getting-started.md

MCP Tools

When connected to an MCP client, docs-kit exposes:

Tool Description
search_docs(query, limit=5) Hybrid dense + BM25 retrieval
list_sources() List all ingested source URLs/paths
list_ingested_sources() List sources with ingestion timestamps
get_collection_info() Collection stats (exists, point count)
get_full_document(source) Retrieve full stored document by source
ingest_urls(urls, provider="auto") Ingest comma-separated URLs at runtime
remove_source(source) Remove a source and all its chunks

Install Targets

Local config install is supported for:

  • claude-code
  • claude-desktop
  • cursor
  • codex

Codex aliases:

  • codex-app

ChatGPT aliases are accepted for guidance only:

  • chatgpt
  • chatgpt-desktop

chatgpt and chatgpt-desktop do not currently use a local stdio config written by this command. The installer prints guidance for the current OpenAI flow, which uses remote MCP apps/connectors in ChatGPT settings.

Configuration

Project-local docs-kit.yaml created by docs-kit init:

embedding:
  provider: fastembed
  model: BAAI/bge-small-en-v1.5

vector_store:
  provider: qdrant
  local_path: .docs-kit/qdrant
  collection_name: knowledge_base

ingestion:
  chunk_size: 800
  chunk_overlap: 120
  bm25_model: Qdrant/bm25

mcp:
  transport: stdio
  host: localhost
  port: 3001

Global installs can also use a user config at ~/.docs-kit/docs-kit.yaml, with data stored under ~/.docs-kit/qdrant.

Supported Sources

Source Strategy
GitBook sites /llms-full.txt/llms.txt
Mintlify sites /llms-full.txt/llms.txt/sitemap.xml
Local .md files Direct file read
Local .txt files Direct file read

Both GitBook and Mintlify support the llms.txt standard, so in most cases the same auto strategy works for both. The Mintlify fetcher adds a /sitemap.xml fallback for sites where llms.txt is disabled.

Requirements

  • Python 3.11–3.13 (3.14+ not yet supported — onnxruntime wheels are unavailable for 3.14)
  • Disk space for the local embedding model download
  • Local Qdrant storage under .docs-kit/ by default

If your system Python is 3.14, pass an explicit version to pipx:

pipx install docs-kit --python python3.13

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docs_kit-0.1.2.tar.gz (110.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docs_kit-0.1.2-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file docs_kit-0.1.2.tar.gz.

File metadata

  • Download URL: docs_kit-0.1.2.tar.gz
  • Upload date:
  • Size: 110.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docs_kit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3002f63b1124f0361f9bf6b857c8de3f89b5521b46734d2612132e3f0572634f
MD5 b6f8dd29d4391037c20fea3f1b9109b8
BLAKE2b-256 3744c3ca8cd6019536bc7d7f55fe5c294a6e23170566c87feb6f85dbebf8f4b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for docs_kit-0.1.2.tar.gz:

Publisher: publish.yml on gaurangtorvekar/docs-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docs_kit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: docs_kit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docs_kit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f7f331c1c68fa9f947f02ed060108e63c296081933ebf6d1b4fff78d56ec242
MD5 ec52a5c37d84aa8bc66f5052c671c936
BLAKE2b-256 0fc66656db949ddf3815d28d7cb2fa59f32a67fa74938e47632d7a240c945a14

See more details on using hashes here.

Provenance

The following attestation bundles were made for docs_kit-0.1.2-py3-none-any.whl:

Publisher: publish.yml on gaurangtorvekar/docs-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page