Skip to content

Releases: shinpr/mcp-local-rag

Release: v0.15.2

15 Jun 14:45
95e39ea

Choose a tag to compare

Bug Fixes

  • delete_file now reports what was actually removed. Responses (MCP and CLI) include removedChunks and existed, instead of always returning deleted: true.
  • delete_file now fails on raw-data deletion errors. If a file's raw data cannot be removed, the operation reports an error rather than silently succeeding.

Contributors

Release: v0.15.1

12 Jun 12:14
b1bbcfd

Choose a tag to compare

Added

  • Configurable embedding dtype via RAG_DTYPE. Choose the embedding quantization (fp32, fp16, q8, int8, …) with an opt-in environment variable. The default is fp32, so existing setups are unchanged. If the chosen model does not provide the requested dtype, the server fails with an error that lists the dtypes the model does provide. Changing RAG_DTYPE (or RAG_DEVICE) changes the embedding space, so re-ingest your documents after changing it.

Changed

  • Clearer error reporting. Errors now keep their real cause instead of being masked. For example, a dtype/model misconfiguration during PDF ingestion now reports the actual problem rather than a generic “Failed to parse PDF”. Full diagnostic detail (cause chain) is written to stderr logs; MCP clients receive a clean, controlled message.
  • A failed re-ingest whose rollback also fails now reports a distinct error stating that existing data may not have been restored.

Release: v0.15.0

07 Jun 17:08
330aee8

Choose a tag to compare

Fixes

  • Ingest rollback: a failed re-ingest now restores the full prior chunk set with its real embeddings. Previously a rollback could lose chunks and leave dummy vectors behind, corrupting search results for that document.
  • list / list_files: a file is now correctly reported as ingested when its base directory is reached through a symlink or directory alias — no more false ingested: false and duplicate orphaned entries. Paths are shown in their configured (non-resolved) form. Existing databases keep working; no migration.
  • Input validation: MCP tools now reject malformed input with a clear InvalidParams error — query_documents (query, limit 1–20), ingest_data (content, metadata.source / format), and delete_file (missing target).
  • Error handling: delete failures are no longer silently swallowed, and a transient full-text-search failure degrades only that single query instead of disabling hybrid search until restart.

Performance

  • Faster embedding via true batched inference (one forward pass per batch).
  • Lighter list / status using row counts and projected scans instead of loading full rows.

Dependencies

  • @lancedb/lancedb 0.29 → 0.30 (existing databases keep working; no migration).

Release: v0.14.2

23 May 12:02
539d9df

Choose a tag to compare

Added

  • BASE_DIRS — JSON array env var to configure multiple document roots, e.g. BASE_DIRS='["/a","/b"]'.
  • Repeatable --base-dir for ingest and list. CLI roots replace env roots.
  • Precedence: CLI --base-dir > BASE_DIRS > BASE_DIR > cwd.

Changed

  • Configuration warnings (e.g. BASE_DIRS is set; BASE_DIR is ignored.) now appear in MCP tool responses, not only stderr.
  • list_files returns baseDirs: string[] and per-file baseDir. Legacy baseDir (first effective root) is preserved.
  • Invalid BASE_DIRS puts the server in degraded mode: status stays callable for diagnosis, root-dependent tools return a structured error. No silent fallback.

Security

  • Sensitive paths (/etc, /usr, ~/.ssh, ...) are rejected at both CLI and MCP server startup, including their realpath canonical forms (/private/etc on macOS).
  • The raw-data ingest fast path is now gated by a realpath boundary check, closing traversal and symlink-escape vectors.

Release: v0.14.1

17 May 09:06
b39255a

Choose a tag to compare

Changes

  • Visual ingest now offers two quality profiles (opt-in). When visual: true (MCP) or --visual (CLI) is set, a new visualQuality parameter (visualQuality: 'fast' | 'quality' on MCP ingest_file; --visual-quality fast|quality on CLI) selects the VLM. fast (default) keeps the v0.14.0 model HuggingFaceTB/SmolVLM-256M-Instruct. quality selects onnx-community/Qwen2.5-VL-3B-Instruct-ONNX for figures where in-image text (axis labels, panel sub-labels, flowchart nodes) needs to be captured reliably. Default behavior is unchanged; the quality profile is opt-in per ingest call.

Release: v0.14.0

17 May 03:05
f7412a8

Choose a tag to compare

Changes

  • Visual ingest for PDFs (opt-in). visual: true (MCP) or --visual (CLI) inlines a short caption from a local VLM (HuggingFaceTB/SmolVLM-256M-Instruct) into the text chunks for each page with figures, tables, or diagrams. Captions are auxiliary text — not image search, not OCR, and not a faithful transcription of the figure. Default ingest is unchanged. See the README's Ingesting PDFs with figures section for usage and the security note.
  • GPU acceleration. Embedding runs on WebGPU when available, with a CPU fallback. Override with RAG_DEVICE=cpu.
  • Bug fix (Windows paths). File metadata fields (file name, extension) now extract correctly from backslash-style paths. Previously these fields could be empty or contain the full path when ingesting from a Windows path.
  • MCP server is env-only. Configuration comes from environment variables only; passing CLI flags to npx mcp-local-rag now fails fast with a clear error instead of being silently ignored.

Contributors

  • Thanks to @mickey-mikey for GPU support (#128), the env-only MCP server fix (#123), and the Windows path-handling fix (#118).

Release: v0.13.2

11 May 10:37
623c2f0

Choose a tag to compare

Patch release improving read_chunk_neighbors input validation.

Fixes

  • read_chunk_neighbors now treats an empty or whitespace-only filePath/source as not provided. Passing source: "" alongside a valid filePath returns the document window instead of resolving to an empty raw-data path and returning nothing.
  • The filePath/source validation error now matches the actual situation: "Provide either filePath or source, not both" when both are given, "Either filePath or source must be provided" when neither is.

Maintenance

  • Upgraded dev dependencies (@biomejs/biome, @types/node, knip, lint-staged, dpdm) to their latest non-major releases.

Contributors

  • Thanks to @dburner for the initial work on empty filePath/source handling.

Release: v0.13.1

07 May 07:14
45d6d2c

Choose a tag to compare

Patch release for dependency upgrades.

Dependencies

  • @huggingface/transformers ^4.0.0 → ^4.2.0
    • Minor version bump in the embedding library. Embedding output may differ slightly from v0.13.0; re-ingest existing documents if you observe behavior changes.
  • @lancedb/lancedb ^0.26.2 → ^0.27.2
  • @modelcontextprotocol/sdk ^1.28.0 → ^1.29.0
  • jsdom ^27.4.0 → ^29.1.1
  • turndown 7.2.2 → 7.2.4

Transitive

  • protobufjs 7.5.4 → 7.5.5 (#108)
  • @xmldom/xmldom 0.8.11 → 0.8.13 (#109)

Release: v0.13.0

17 Apr 01:25
2cbbae0

Choose a tag to compare

What's New

New tool: read_chunk_neighbors — Expand a search result by reading the chunks immediately before and after it in the same document.

After finding a relevant chunk via query_documents, pass its chunkIndex and filePath (or source) to retrieve surrounding context in a single call. Useful when a hit answers a question only partially.

MCP Tool

read_chunk_neighbors({ filePath: "/path/to/doc.md", chunkIndex: 5 })

CLI

npx mcp-local-rag read-neighbors --file-path /path/to/doc.md --chunk-index 5

Key details

  • Asymmetric window: --before and --after control each direction independently (default 2, max 50)
  • Target marking: The requested chunk is included with isTarget: true
  • Lenient boundaries: Out-of-range indices return only existing chunks (no error)
  • Dual input: Accepts filePath (from ingest_file) or source (from ingest_data)
  • Skills docs updated: Agent Skills now include context-expansion guidance

Release: v0.12.0

02 Apr 04:16
4bc5bc9

Choose a tag to compare

Added

  • CHUNK_MIN_LENGTH environment variable and --chunk-min-length CLI flag to configure minimum chunk length in characters (range: 1–10,000, default: 50)
  • CHUNK_MIN_LENGTH entry in MCP server manifest (server.json)

Changed

  • Minimum chunk length default (50) is now exported as a single source of truth from the chunker module
  • Error message for zero-chunk ingestion now reflects the actual configured value instead of hardcoded "50"
  • Warning and error messages across all env var parsers and CLI flags now truncate user input to 100 characters