MCP HubMCP Hub
mamertofabian

mcp-everything-search

by: mamertofabian

mcp everything search

123created 14/12/2024
Visit
search
tool

📌Overview

Purpose: The Everything Search MCP Server aims to provide users with efficient file searching capabilities across multiple operating systems including Windows, macOS, and Linux.

Overview: This framework enables rapid and comprehensive file and folder searches, leveraging platform-specific technologies such as the Everything SDK for Windows, the mdfind command for macOS, and the locate/plocate commands for Linux. Its design focuses on delivering optimized search performance tailored to each operating system.

Key Features:

  • Cross-Platform Compatibility: Supports Windows, macOS, and Linux, adapting its search methods to the strengths of each platform for enhanced user experience.

  • Flexible Search Options: Users can customize search queries with various parameters, such as case sensitivity, whole word matching, and regex support, allowing for precise and tailored search results.

  • Robust Result Sorting: Provides multiple sorting options for results, enabling users to easily find files based on different criteria, such as date modified or file size, thus improving efficiency in locating needed resources.


Everything Search MCP Server

An MCP server that provides fast file searching capabilities across Windows, macOS, and Linux.

  • On Windows, it uses the Everything SDK.
  • On macOS, it uses the built-in mdfind command.
  • On Linux, it uses the locate/plocate command.

Tools

search

Search for files and folders across your system. The search capabilities and syntax vary by platform:

  • Windows: Full Everything SDK features
  • macOS: Basic filename and content search using Spotlight database
  • Linux: Basic filename search using locate database

Parameters:

  • query (required): Search query string.
  • max_results (optional): Maximum number of results to return (default: 100, max: 1000)
  • match_path (optional): Match against full path instead of filename only (default: false)
  • match_case (optional): Enable case-sensitive search (default: false)
  • match_whole_word (optional): Match whole words only (default: false)
  • match_regex (optional): Enable regex search (default: false)
  • sort_by (optional): Sort order for results (default: 1). Available options:
- 1: Sort by filename (A to Z)
- 2: Sort by filename (Z to A)
- 3: Sort by path (A to Z)
- 4: Sort by path (Z to A)
- 5: Sort by size (smallest first)
- 6: Sort by size (largest first)
- 7: Sort by extension (A to Z)
- 8: Sort by extension (Z to A)
- 11: Sort by creation date (oldest first)
- 12: Sort by creation date (newest first)
- 13: Sort by modification date (oldest first)
- 14: Sort by modification date (newest first)

Examples:

{
  "query": "*.py",
  "max_results": 50,
  "sort_by": 6
}
{
  "query": "ext:py datemodified:today",
  "max_results": 10
}

Response includes:

  • File/folder path
  • File size in bytes
  • Last modified date

Search Syntax Guide

For detailed information about search syntax supported on each platform, see SEARCH_SYNTAX.md.

Prerequisites

Windows

  1. Everything search utility:
  2. Everything SDK:

Linux

  1. Install and initialize the locate or plocate command:
    • Ubuntu/Debian: sudo apt-get install plocate or sudo apt-get install mlocate
    • Fedora: sudo dnf install mlocate
  2. Update the database:
    • For plocate: sudo updatedb
    • For mlocate: sudo /etc/cron.daily/mlocate

macOS

No additional setup required. The server uses the built-in mdfind command.

Installation

Installing via Smithery

Install Everything Search for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-server-everything-search --client claude

Using uv (recommended)

When using uv, no specific installation is needed. Use uvx to directly run mcp-server-everything-search.

Using PIP

Alternatively, install via pip:

pip install mcp-server-everything-search

Run as a script using:

python -m mcp_server_everything_search

Configuration

Windows

Set environment variable for Everything SDK DLL path:

EVERYTHING_SDK_PATH=path\to\Everything-SDK\dll\Everything64.dll

Linux and macOS

No additional configuration required.

Usage with Claude Desktop

Add one of these configurations to your claude_desktop_config.json based on your platform:

Windows (using uvx):

"mcpServers": {
  "everything-search": {
    "command": "uvx",
    "args": ["mcp-server-everything-search"],
    "env": {
      "EVERYTHING_SDK_PATH": "path/to/Everything-SDK/dll/Everything64.dll"
    }
  }
}

Windows (using pip installation):

"mcpServers": {
  "everything-search": {
    "command": "python",
    "args": ["-m", "mcp_server_everything_search"],
    "env": {
      "EVERYTHING_SDK_PATH": "path/to/Everything-SDK/dll/Everything64.dll"
    }
  }
}

Linux and macOS (using uvx):

"mcpServers": {
  "everything-search": {
    "command": "uvx",
    "args": ["mcp-server-everything-search"]
  }
}

Linux and macOS (using pip installation):

"mcpServers": {
  "everything-search": {
    "command": "python",
    "args": ["-m", "mcp_server_everything_search"]
  }
}

Debugging

Use the MCP inspector to debug the server.

For uvx installations:

npx @modelcontextprotocol/inspector uvx mcp-server-everything-search

Or if developing locally:

git clone https://github.com/mamertofabian/mcp-everything-search.git
cd mcp-everything-search/src/mcp_server_everything_search
npx @modelcontextprotocol/inspector uv run mcp-server-everything-search

To view server logs:

  • Linux/macOS:

    tail -f ~/.config/Claude/logs/mcp*.log
    
  • Windows (PowerShell):

    Get-Content -Path "$env:APPDATA\Claude\logs\mcp*.log" -Tail 20 -Wait
    

Development

For local development and testing:

  1. Use MCP inspector to test your changes (see Debugging section).

  2. Test with Claude desktop app by adding this to claude_desktop_config.json:

"everything-search": {
  "command": "uv",
  "args": [
    "--directory",
    "/path/to/mcp-everything-search/src/mcp_server_everything_search",
    "run",
    "mcp-server-everything-search"
  ],
  "env": {
    "EVERYTHING_SDK_PATH": "path/to/Everything-SDK/dll/Everything64.dll"
  }
}

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software under the terms of the MIT License.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by voidtools (the creators of Everything search utility). It is an independent project utilizing the publicly available Everything SDK.