foo-543674
MCP Serverfoo-543674public

fs text search mcp

一个提供本地文件实时全文搜索能力的MCP服务器,使用Tantivy引擎。

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
Rust
Language
-
License

About This Server

一个提供本地文件实时全文搜索能力的MCP服务器,使用Tantivy引擎。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Server for Full Text Search in local file

A Model Context Protocol (MCP) server that provides full-text search capabilities for local files. It watches directories for file changes and maintains a search index using Tantivy.

Features

  • 🔍 Full-text search with Tantivy search engine
  • 🔄 Real-time synchronization when files are created, modified, or deleted

Usage

MCP Client Configuration

Add the following configuration to your Claude Desktop config file:

macOS Configuration

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "fs-text-search": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/path/to/your/documents:/home/source",
        "-v", "/path/to/search/index:/home/index",
        "foobarxyzzy/fs-text-search-mcp",
        "--extensions", "txt,md,rs,py,js,ts,json",
      ]
    }
  }
}

Windows Configuration (via WSL)

Config file location: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "fs-text-search": {
      "command": "wsl.exe",
      "args": [
        "bash",
        "-c",
        "/usr/bin/docker run -i --rm -v /mnt/c/path/to/your/documents:/home/source -v /mnt/c/path/to/search/index:/home/index foobarxyzzy/fs-text-search-mcp --extensions txt,md,rs,py,js,ts,json"
      ]
    }
  }
}

Options

OptionShortDescriptionDefault
--extensions-eFile extensions to include (comma-separated)txt,md

Contribute

Run in local

$ cargo run -- --watch-dir /path/to/source

Options

OptionShortDescriptionDefault
--watch-dir-wDirectory to watch for file changes./
--index-dir-iDirectory to store search index (optional)In-memory
--extensions-eFile extensions to include (comma-separated)txt,md
--verbose-vEnable verbose loggingfalse
--quiet-qOnly error log and response are showingfalse

Example MCP Interactions

// Initialize the connection
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"test-client","version":"1.0.0"},"capabilities":{}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}

// Get available tools
{"jsonrpc":"2.0","method":"tools/list","id":1}

// Search for content
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_index","arguments":{"keyword":"function"}}}

// Load file
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"load_file","arguments":{"file_path":"/path/to/file"}}}

Dependencies

  • tantivy: Full-text search engine
  • notify-debouncer-full: File system event debouncing
  • rmcp: Model Context Protocol implementation
  • clap: Command-line argument parsing
  • tokio: Async runtime
  • tracing: Structured logging

Quick Start

1

Clone the repository

git clone https://github.com/foo-543674/fs-text-search-mcp
2

Install dependencies

cd fs-text-search-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerfoo-543674
Repofs-text-search-mcp
LanguageRust
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation