Wraps macOS Spotlight's mdfind command to let Claude search your filesystem with the same power you'd get from the terminal. Exposes a single search_files tool that takes queries in Spotlight syntax (kind:pdf, kMDItemFSName wildcards, date filters) and returns JSON results. You can scope searches to specific directories, sort by name/size/date, apply regex filters to filenames, and limit result counts up to 1000. Built on FastMCP and only works on macOS 10.15 or later. Useful when you need Claude to locate files by content, metadata, or patterns without writing custom filesystem traversal code. The mdfind backend means searches are fast and leverage your existing Spotlight index.
A Desktop Extension (DXT) that provides fast file search capabilities for macOS using the native mdfind command (Spotlight search).
⚠️ IMPORTANT: This extension only works on macOS systems. Windows and Linux are not supported.
This server is available in the Model Context Protocol Registry. Install it using your MCP client.
mcp-name: io.github.huoshuiai42/huoshui-file-search
uvx huoshui-file-search
git clone https://github.com/huoshui/huoshui-file-search.git
cd huoshui-file-search
uv sync
search_files tool with various parametersfrom server.main import search_files, FileSearchParams
# Basic search
params = FileSearchParams(query="report.pdf")
result = await search_files(None, params)
# Search with filters
params = FileSearchParams(
query="*.py",
path="/Users/username/Documents",
case_sensitive=True,
sort_by="size",
limit=50
)
result = await search_files(None, params)
query (required): Search query stringpath (optional): Directory to limit search scopecase_sensitive (optional): Enable case-sensitive search (default: false)regex (optional): Regex pattern to filter results by filenamesort_by (optional): Sort results by 'name', 'size', or 'date'limit (optional): Maximum number of results (default: 100, max: 1000)The query parameter uses macOS Spotlight's mdfind syntax:
report - finds files containing "report"kind:pdf, kind:image, kind:moviekMDItemFSName == "*.py" - finds Python filesinvoice AND kind:pdf - finds PDF files containing "invoice"date:today, modified:this weekNote: If your query like '寻找工程车' kind:movie returns no results, it might mean:
寻找工程车 AND kind:movie){
"query": "document.pdf"
}
{
"query": "*.txt",
"path": "/Users/username/Documents"
}
{
"query": "README",
"case_sensitive": true
}
{
"query": "kind:text",
"regex": "log.*2024.*\\.txt$"
}
{
"query": "*.jpg",
"sort_by": "size",
"limit": 20
}
The extension supports user configuration through the DXT manifest:
allowed_directories: List of directories to limit search scopedefault_limit: Default maximum number of search resultsenable_logging: Enable debug logginghuoshui-file-search/
├── manifest.json # DXT manifest file
├── server/ # MCP server implementation
│ ├── __init__.py
│ ├── __main__.py
│ └── main.py
├── pyproject.toml # Python package configuration
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
└── README.md # This file
Install dependencies:
uv sync
Run the server:
uv run python -m server
Or after publishing to PyPI:
uvx huoshui-file-search
The server will communicate via stdio according to the MCP protocol
Build the package:
uv build
Upload to PyPI:
uv publish
curl -LsSf https://astral.sh/uv/install.sh | sh)This extension only works on macOS. Ensure you're running it on a Mac.
Ensure Spotlight is enabled on your Mac. You can check this in System Preferences > Spotlight.
Large searches may timeout after 30 seconds. Try:
MIT License - see LICENSE file for details
Contributions are welcome! Please:
For issues and feature requests, please visit: https://github.com/huoshui/huoshui-file-search/issues
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp