Skip to main content

Compress local documentation context for coding agents.

Project description

API MCP pack: install-pack open-meteo, mcp doctor, mcp list

Local docs context for coding agents, plus version-pinned API tool surfaces.

PyPI version License: MIT Python 3.11 | 3.12 | 3.13

Quickstart | API MCP packs | Commands | Supported Agents | Docs


Docmancer is an MIT-licensed CLI on PyPI with two local surfaces:

  • Docs RAG. Fetch documentation with add, normalize it into sections, index with SQLite FTS5, and return compact context packs with source attribution on query. No vector DB, no embedding downloads, no remote query API.
  • API MCP packs. Install version-pinned MCP packs compiled from public OpenAPI / GraphQL / TypeDoc / Sphinx sources, then expose them to your agent through one shared mcp serve process. Two meta-tools regardless of how many packs you install (Tool Search). Auth, destructive-call gating, idempotency-key reuse, and version pinning all run inside the local dispatcher.

Quickstart

pipx install docmancer    # Python 3.11, 3.12, or 3.13
docmancer setup           # config + DB + agent skills + MCP server registration

setup creates ~/.docmancer/, writes the config, initializes the SQLite database, installs detected agent skills, and registers docmancer mcp serve into each agent's MCP config. Use setup --all for non-interactive installation across every supported agent. If pipx picks an unsupported interpreter, pin one explicitly: pipx install docmancer --python python3.13.

Docs RAG flow:

docmancer add https://docs.pytest.org
docmancer query "How do I use fixtures?"

API MCP pack flow (see API MCP packs for the full walkthrough):

docmancer install-pack open-meteo@v1
docmancer mcp doctor

Open-Meteo is a public read-only weather API that needs no API key, so the install above produces a usable pack with zero credentials. For packs that do require credentials, set the relevant _API_KEY env var before running docmancer mcp doctor.

Agents call docs RAG through installed skills and API packs through the auto-registered MCP server. All agents on the same machine share one local SQLite index and one MCP manifest.


API MCP packs

Runtime support ships in the PyPI build. install-pack resolves artifacts in this order:

  1. Local cache.
  2. The hosted Docmancer artifact API.
  3. Built-in known-source fallback. Open-Meteo packs are compiled locally from the public OpenAPI spec when precompiled artifacts are not already available, so the demo install works even without registry access.
docmancer install-pack open-meteo@v1
# Open-Meteo is keyless, so no credential setup is needed.

docmancer mcp doctor
docmancer mcp list

docmancer mcp disable open-meteo --version v1
docmancer mcp enable  open-meteo --version v1

docmancer install-pack open-meteo@v1 --expanded

docmancer uninstall open-meteo@v1

What the agent sees. tools/list returns exactly two tools regardless of how many packs you install: docmancer_search_tools (token-overlap search across every enabled pack's curated surface, returns the top match's full input schema inlined) and docmancer_call_tool (dispatches the resolved tool by its slug, e.g. open_meteo__v1__forecast). Per-call schema validation, destructive gating, schema-driven idempotency-key auto-injection (UUID4, reused on retry from a 24-hour SQLite fingerprint cache), wire-pinned header injection (the dispatcher reads auth.required_headers from the contract for keyed APIs that need dated version headers), and call-log redaction (arg_keys only, never values) all happen inside the dispatcher. Open-Meteo itself needs none of those features, which is exactly what makes it a clean smoke-test pack.

Source-kind support today.

Source Compiled by pipeline Runtime executor
OpenAPI 3.0 / 3.1 yes http (live wire calls)
GraphQL introspection yes noop_doc (executor not yet wired)
TypeDoc / Sphinx yes noop_doc (documentation only)

Commands

The full CLI surface (docs RAG, API MCP packs, setup / install, bench, and the rest) is documented in the repo wiki: Commands.


Retrieval shape

query defaults to a 2400-token budget and returns markdown with a per-call savings summary:

Context pack: ~900 tokens vs ~4800 raw docs tokens (81.2% less docs overhead, 5.33x agentic runway)

The numbers are estimates; the point is that the docs portion of the context shrinks so the agent has more room for actual work.


Project-local config

Global config lives under ~/.docmancer/. For a project-specific index:

docmancer init
docmancer add ./docs

docmancer init writes a docmancer.yaml pointing at .docmancer/docmancer.db and .docmancer/extracted/ inside the project. Without a project config, docmancer falls back to the global one.

index:
  db_path: .docmancer/docmancer.db
  extracted_dir: .docmancer/extracted/

Supported agents

setup auto-detects installed agents. Manual install for a single target:

docmancer install claude-code      # ~/.claude/skills + MCP server entry
docmancer install cursor           # ~/.cursor/skills + ~/.cursor/mcp.json
docmancer install claude-desktop   # zip via Claude Desktop's Skills UI
docmancer install codex
docmancer install cline
docmancer install gemini
docmancer install github-copilot
docmancer install opencode

Each agent install drops a skill file under the agent's conventional location and writes an idempotent docmancer entry into its MCP config so installed packs are picked up immediately. See the wiki › Install Targets for the exact paths per agent.


Optional extras

Extra Enables
docmancer[browser] Playwright fetcher for JS-heavy sites (used by add --browser)
docmancer[crawl4ai] Alternative fetcher for hard-to-scrape sites

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

docmancer-0.4.9.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

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

docmancer-0.4.9-py3-none-any.whl (173.2 kB view details)

Uploaded Python 3

File details

Details for the file docmancer-0.4.9.tar.gz.

File metadata

  • Download URL: docmancer-0.4.9.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmancer-0.4.9.tar.gz
Algorithm Hash digest
SHA256 10e11874840b7ed531e15d72ef15177234935391b1d0b325ce8d05afe1b8b16f
MD5 9c0b8ce817d7d51f664554b82e90daa1
BLAKE2b-256 17c416000b77f869a83b2e2cd9f7d7ec24833cb79c46c00aca9da1fe7c054001

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmancer-0.4.9.tar.gz:

Publisher: publish.yml on docmancer/docmancer

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

File details

Details for the file docmancer-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: docmancer-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 173.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmancer-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2ec22b7d935adb002a98f61a2ecad78b62e549c78ef08aa578bb605971ba52eb
MD5 161b92e4f7bb4b5be2926c5c80113f97
BLAKE2b-256 cab5b5ae66d6622fcc1b210c3aebe124cadaff3f86396634fc1cacf09647236f

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmancer-0.4.9-py3-none-any.whl:

Publisher: publish.yml on docmancer/docmancer

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