đ File Search MCP
A Model Context Protocol (MCP) server for full-text search in the file system, written in Rust.
đ Quick Start
First, install the Rust SDK (download it from: https://www.rust-lang.org/).
Clone this repository:
git clone git@github.com:Kurogoma4D/file-search-mcp.git
Then add it to your MCP settings (in systems like Cursor, Claude, etc.).
- Command:
<repository_path>/target/release/file-search-mcp
Replace <repository_path>
with the actual path of the cloned repository.
⨠Features
- Full-text Search: Search for keywords in text files within the directory structure.
- File Content Reader: Read and display the content of a specific text file.
- Intelligent File Recognition: Automatically identify text files and skip binary files.
- MCP Integration: Compatible with systems supporting the Model Context Protocol.
- In-memory Indexing: Create fast, temporary search indexes.
- Score-based Results: Return search results with relevance scores.
đĻ Installation
First, install the Rust SDK (download it from: https://www.rust-lang.org/).
Clone this repository:
git clone git@github.com:Kurogoma4D/file-search-mcp.git
Then add it to your MCP settings (in systems like Cursor, Claude, etc.).
- Command:
<repository_path>/target/release/file-search-mcp
Replace <repository_path>
with the actual path of the cloned repository.
đģ Usage Examples
Search Tool
- Description: Search for keywords in text files within the specified directory.
- Parameters:
directory
: The path of the directory to search.keyword
: The keyword to search for.
File Content Reader Tool
- Description: Read and display the content of a specific file.
- Parameters:
file_path
: The path of the file to read.
đ Documentation
File Search MCP is a tool that provides powerful full-text search functionality for text files in a specified directory. It uses the Tantivy search engine to efficiently index and search text content.
This project implements the Model Context Protocol (MCP), making it compatible with AI assistants and other systems that support this protocol.
đ§ Technical Details
Technology Stack
- Rust: Used for performance, security, and concurrency.
- Tantivy: A full-text search engine library written in Rust.
- RMCP: A Rust implementation of the Model Context Protocol.
- Tokio: An asynchronous runtime for Rust.
How It Works
- The server indexes text files in the specified directory, excluding binary files.
- It processes the content of text files and adds them to the Tantivy in-memory index.
- When a search is performed, it queries the index to find matches and sorts them by relevance.
- It returns the results, including the file path and relevance score.
- The file content reader tool allows you to view the content of a specific text file by providing its path.
đ License
MIT License
đ Acknowledgments







