fd
- python
0
GitHub Stars
python
Language
3 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"thhart-fd-mcp": {
"command": "fd-mcp",
"args": []
}
}
}fd-mcp exposes fd’s fast file search capabilities as MCP tools so AI assistants can quickly locate and analyze files within large codebases. It combines fd’s speed and friendly syntax with the Model Context Protocol to empower code navigation, pattern matching, and content searches in an MCP workflow.
How to use
You integrate an MCP client to access the fd-mcp tools. Once connected, you can perform fast file searches, content searches, and file operations across your project from your AI assistant or MCP-enabled workflow. Use the tool names and parameters described below to construct queries that match your needs, such as finding files by pattern, filtering by extension, searching within file contents, or listing recently changed files.
How to install
Prerequisites you need before installing: a supported Python runtime and a working pip installation.
-
Open your terminal.
-
Navigate to the fd-mcp project directory.
-
Install the package in editable mode.
-
Start the MCP server using one of the provided runtime options.
Tools and usage notes
fd_search Replaces: find, locate commands. Search for files and directories recursively using fd. Parameters let you constrain by path, type, extension, depth, and more.
fd_search_content Replaces: find -exec grep. Search for text within files using ripgrep in combination with fd. Parameters cover the search pattern, file filtering, path, extension, and context.
fd_exec Replaces: find -exec. Run a command on each file found by fd, using {} as the filename placeholder.
fd_recent_files Replaces: find -mtime. List files modified within a time window, with optional type and extension filters.
fd_count Replaces: piping to wc -l. Count files matching a pattern under a path.
Examples
fd_search(pattern=".*", path=".", extension="py")
fd_search(pattern="test_.*", path=".", extension="py")
fd_search(pattern=".*", path=".", type="d", max_depth=2)
fd_search(pattern=".*", path=".", extension="py", max_depth=1)
fd_search_content(search_pattern="TODO", extension="py")
fd_exec(command="wc -l {}", pattern=".*", path=".", extension="py")
fd_recent_files(hours=24)
fd_count(pattern=".*", path=".", type="f")
Available tools
fd_search
Search for files and directories recursively using fd with pattern, path, extension, and various filters.
fd_search_content
Search within file contents using ripgrep in combination with fd, with options for pattern, path, extension, and context.
fd_exec
Execute a command on files found by fd, using {} as a placeholder for each filename.
fd_recent_files
List recently modified files with optional filters by path, hours, extension, and type.
fd_count
Count files matching a pattern under a given path.