Skip to content

pydocs-mcp 0.4.0

Choose a tag to compare

@msobroza msobroza released this 03 Jul 01:00
c07ebdd

Published to PyPI: https://pypi.org/project/pydocs-mcp/0.4.0/

pip install pydocs-mcp

Added

  • Multi-repo search — one MCP server (or CLI query) over several already-indexed repos: serve --workspace <dir> / --db <file> load pre-built {name}_{hash}.db bundles read-only; a new project filter on search/lookup scopes one repo, omitted it unions across all with dedup (a repo's own code beats the same symbol seen as a dependency; most-recently-indexed wins among duplicates). A per-database identity stamp rejects bundles built with a mismatching embedder up front.
  • Reference-graph readers on lookupshow="impact" (everything that transitively calls a symbol, ranked — "what breaks if I change X?") and show="context" (the symbol's dependency closure packed under a token budget — "everything to understand X").
  • Graph-boosted retrieval — dense-seeded graph_expand step, index-time node_scores (PageRank / community, optional [graph] extra) with centrality/diversity rerankers, synthetic embedding-kNN similar edges, graph presets + a structural-recall benchmark split.
  • Selective dependency embedding — everything stays BM25/FTS-indexed, but dense vectors are written per package tier: the project embeds fully; dependencies embed one docstring page per module plus markdown/READMEs by default. Promote chosen dependencies with --full-dep NAME / embedding.full_index_dependencies (globs); embedding.dependency_policy: full | doc_pages | none. Indexing torch-sized dependencies drops from ~an hour to seconds on CPU.
  • ONNX / OpenVINO backends for sentence_transformersembedding.backend: torch | onnx | openvino + embedding.model_file_name (e.g. a qint8-quantized export) for ~2–4× faster CPU inference; new [openvino] extra. Index on GPU, serve on CPU with the same model.
  • New embeddersgte-modernbert-base and the code-specialized F2LLM-v2 family via sentence_transformers (RepoQA leaderboard + figures in the benchmark docs).
  • Dependency manifests[project.optional-dependencies] and PEP 735 [dependency-groups] are now parsed; the --watch watcher re-indexes when pyproject.toml / requirements*.txt change.
  • Example agentexamples/ask_your_docs_agent/: a minimal LangGraph ReAct chat agent (terminal or notebook) over the MCP tools, with conversation memory, follow-up reformulation, and project inference.
  • Documentation site — Sphinx + Furo under documentation/.

Changed

  • Default chunk search is now dense + graph expansion (chunk_search_graph.yaml), replacing BM25-only — RepoQA recall@10 0.40 → 0.77 on standard queries, 0.30 → 1.00 on structurally-reachable answers, at no extra indexing cost. BM25 and hybrid remain as presets.
  • Dependencies embed documentation pages only by default; scope="deps" searches route to a BM25 ∥ dense fusion preset so dependency code stays reachable by keyword.
  • graph_expand decay default raised to 0.9.
  • Schema v10 → v12 — additive, migrated automatically on open. Note: the ingestion pipeline identity changed, so the first re-index after upgrading re-extracts and re-embeds packages; serving existing indexes keeps working without it.

Fixed

  • Reference resolver no longer rescans the whole symbol universe per reference (O(N²) → bucketed) — indexing large dependencies such as numpy/torch previously appeared to hang.
  • The startup SQLite ↔ vector-store integrity check compares intended embeddings instead of raw chunk counts, ending the re-extract-everything loop for deployments that don't embed every chunk.
  • Dense search over a partially-embedded corpus no longer raises when the candidate set contains vectorless chunks.
  • BM25 candidates carry qualified_name, unblocking LLM tree reranking.
  • GPU benchmark runs no longer silently fall back to CPU (onnxruntime CUDA library path).