Overview
mcp-lucene-server is a standalone MCP (Model Context Protocol) server written in Kotlin. It provides AI coding agents with fast, accurate code-search tools over any project, backed by a persistent Apache Lucene index for fulltext search and tree-sitter for AST-aware structural search. It is intended to replace an agent's built-in grep/glob/read-file tools for a target codebase.
The server communicates with MCP clients via JSON-RPC 2.0 over standard I/O, but internally uses a lightweight Proxy-Daemon architecture over HTTP/SSE. This allows the heavy Lucene JVM to stay alive in the background between editor restarts, sharing a single loaded index across multiple client windows. By default, the server acts as an intelligent proxy, spawning a daemon if none exists, and the daemon shuts down after 10 seconds of inactivity when all clients disconnect.
The server offers tools such as search_code, grep_code, find_definition, find_references, find_implementations, outline, search_ast, call_hierarchy, read_file, list_files, reindex_code, add_external_roots, and add_maven_dependency_sources. Tree-sitter-backed tools support Kotlin, Java, TypeScript/TSX, JavaScript, Python, Go, Rust, C, C++, C#, PHP, Ruby, and Swift. It requires JDK 17+ and Maven, and can be built with mvn package to produce a self-contained fat jar or a GraalVM native image.
Pricing
Free
Detailed plans have not been confirmed in our catalog. Check the official website for current limits and billing terms.
Visit WebsitePrices and limits may change. Confirm the currency, billing period, seat minimum and usage caps on the official website.
Use Cases
- AI coding agents use mcp-lucene-server to perform fuzzy fulltext search over a codebase.
- AI coding agents use mcp-lucene-server to find where a symbol is defined using a tree-sitter parse tree.
- AI coding agents use mcp-lucene-server to find real-code usages of a symbol.
- AI coding agents use mcp-lucene-server to list every symbol a file defines without reading the whole file.
- AI coding agents use mcp-lucene-server to run raw tree-sitter queries for structural search.
- AI coding agents use mcp-lucene-server to find incoming or outgoing function calls.
Features
Code search for AI agents
Search across any project
Persistent Apache Lucene index
Standalone Model Context Protocol server
Kotlin based server implementation
Reviews
No reviews yet. Be the first to share your experience!