MM

mirkosertic/mcpluceneserver

Analytics & monitoring

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

6 stars 2 forks 品質 84 トレンド 34Apache-2.0

MCP Lucene Server is a Model Context Protocol (MCP) server that exposes Apache Lucene's full-text search capabilities through a conversational interface.

概要

A Model Context Protocol (MCP) server that exposes Apache Lucene fulltext search capabilities with automatic document crawling and indexing. This server supports both STDIO transport (for Claude Desktop integration) and HTTP transport (for web-based clients and remote access). - Automatically indexes PDFs, Microsoft Office, and OpenOffice documents - Multi-threaded crawling for fast indexing - Real-time directory monitoring for automatic updates - Incremental indexing with full reconciliation (skips unchanged files, removes orphans) - Simple keyword search (no Lucene syntax needed) and full Lucene query syntax search - Field-specific filtering (by author, language, file type, etc.

README

以下は原文 README の抜粋です。原文を見る。

MCP Lucene Server

A Model Context Protocol (MCP) server that exposes Apache Lucene fulltext search capabilities with automatic document crawling and indexing. This server supports both STDIO transport (for Claude Desktop integration) and HTTP transport (for web-based clients and remote access).

Features

Automatic Document Crawling

  • Automatically indexes PDFs, Microsoft Office, and OpenOffice documents
  • Multi-threaded crawling for fast indexing
  • Real-time directory monitoring for automatic updates
  • Incremental indexing with full reconciliation (skips unchanged files, removes orphans)

Powerful Search

  • Simple keyword search (no Lucene syntax needed) and full Lucene query syntax search
  • Field-specific filtering (by author, language, file type, etc.)
  • Structured passages with quality metadata for LLM consumption
  • Paginated results with filter suggestions

Semantic Search

  • Optional pure KNN embedding-based semantic search using multilingual-e5 embeddings with Late Chunking
  • Finds semantically related documents even without exact keyword matches
  • Requires VECTOR_MODEL to be configured. See SEMANTICSEARCH.md for details.

Query Profiling & Debugging

  • Deep query analysis and profiling (profileQuery tool)
  • Understand why queries return certain results and how scoring works
  • Filter impact analysis showing document reduction per filter
  • Document scoring explanations with BM25 breakdown
  • Term statistics (IDF, rarity, document frequency)
  • Actionable optimization recommendations
  • LLM-optimized structured output for easy interpretation

Rich Metadata Extraction

  • Automatic language detection
  • Author, title, creation date extraction
  • File type and size information
  • SHA-256 content hashing for change detection

JDBC Metadata Enrichment

  • Load additional metadata from PostgreSQL, MySQL, or any JDBC-compatible database at index time
  • JSON-based metadata with explicit field types (keyword, text, int, long, date)
  • Multi-value field support, automatic facet registration
  • Background sync job for incremental metadata updates (configurable interval)
  • All DB-sourced fields prefixed with dbmeta_ to avoid schema collisions

Text Normalization

  • Automatic removal of broken/invalid characters (replacement chars, control chars, zero-width chars)
  • Whitespace normalization (multiple spaces collapsed to single space)
  • Ensures clean, readable search results and passages

Performance Optimized

  • Batch processing for efficient indexing
  • NRT (Near Real-Time) search with dynamic optimization
  • Configurable thread pools for parallel processing
  • Progress notifications during bulk operations

Easy Integration

  • Dual transport support: STDIO (default) and HTTP
GitHub で README 全文を見る

インストール

docker run -v ./lucene-data-dir:/userdata -p 9000:9000 -it mirkosertic42/mcpluceneserver:main
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "lucene-search": { "command": "java", "args": [ "--enable-native-access=ALL-UNNAMED", "-Xmx2g", "-Dspring.profiles.active=deployed", "-jar", "/absolute/path/to/luceneserver-0.0.1-SNAPSHOT.jar" ] } } }