File Search MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@File Search MCP find all TypeScript files modified in the last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
file-search-mcp
A blazingly fast MCP server for searching files in large codebases and monorepos.
Why This Exists
Standard tools like grep and find are painfully slow on large codebases. They don't respect .gitignore, they follow symlink loops, and they flood your terminal with irrelevant results from node_modules.
file-search-mcp fixes all that:
Problem | Solution |
| Uses ripgrep (100x faster) |
| Built-in loop detection |
Results flood the terminal | Smart token-based truncation |
Binary files pollute results | Auto-detected and skipped |
Need to remember complex flags | Simple, intuitive parameters |
No context for matches | Configurable context lines |
Case sensitivity confusion | Smart case by default |
Related MCP server: fzf MCP Server
Installation
Prerequisites
Node.js 18+
ripgrep (for content search)
# Install ripgrep
brew install ripgrep # macOS
apt install ripgrep # Ubuntu
choco install ripgrep # WindowsQuick Start (npx)
No installation required! Just add to your MCP client config:
{
"mcpServers": {
"file-search": {
"command": "npx",
"args": ["-y", "file-search-mcp"]
}
}
}Global Install
npm install -g file-search-mcpThen use in your config:
{
"mcpServers": {
"file-search": {
"command": "file-search-mcp"
}
}
}Usage with Claude Desktop
Add to your Claude Desktop config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"file-search": {
"command": "npx",
"args": ["-y", "file-search-mcp"]
}
}
}Usage with OpenCode
Add to your OpenCode config (~/.config/opencode/config.json):
{
"mcp": {
"file-search": {
"type": "local",
"command": ["npx", "-y", "file-search-mcp"]
}
}
}Tools
search_files
Find files by name or glob pattern.
"Find all TypeScript files"
→ search_files(pattern: "*.ts")
"Find config files modified today"
→ search_files(pattern: "*.config.*", modified_within: "24h")
"Find large log files"
→ search_files(pattern: "*.log", min_size: "10MB")Parameters:
reasoning(required) - Why you're searchingpattern(required) - Glob pattern like*.ts,src/**/*.jspath- Directory to search (default: current dir)include_hidden- Include dotfiles (default: true)ignore_gitignore- Respect .gitignore (default: true)exclude- Extra patterns to skipdetail_level-minimal|standard|fullmodified_within- Only recent files, e.g.,24h,7dmin_size- Only large files, e.g.,1MB
search_content
Find text or regex patterns inside files.
"Find all TODO comments"
→ search_content(query: "TODO")
"Find API endpoints"
→ search_content(query: "app\.(get|post|put|delete)", file_pattern: "*.ts")
"Find hardcoded secrets"
→ search_content(query: "apiKey|secret|password")Parameters:
reasoning(required) - Why you're searchingquery(required) - Text or regex to findpath- Directory to search (default: current dir)file_pattern- Only search matching filesinclude_hidden- Include dotfiles (default: true)ignore_gitignore- Respect .gitignore (default: true)exclude- Extra patterns to skipdetail_level-minimal|standard|fullcontext_lines- Lines around matches (default: 2)
fuzzy_find
Fuzzy search when you don't remember exact names.
"Find the user controller"
→ fuzzy_find(query: "usrctrl")
"Find that API routes file"
→ fuzzy_find(query: "apirts")Parameters:
reasoning(required) - Why you're searchingquery(required) - Fuzzy search termspath- Directory to search (default: current dir)include_hidden- Include dotfiles (default: true)detail_level-minimal|standard|full
tree
Visualize directory structure.
"Show me the project structure"
→ tree(depth: 3)
"What's in the src folder?"
→ tree(path: "src", depth: 2)Parameters:
reasoning(required) - Why you need this viewpath- Directory to show (default: current dir)depth- How deep to traverse (default: 3)include_hidden- Show dotfiles (default: false)dirs_only- Only show directories (default: false)
Detail Levels
Level | What You Get |
| Just paths - fast, low tokens |
| Paths + size + modified date |
| Everything + content preview/matches |
Smart Features
Smart Case
Searches are case-insensitive by default, but become case-sensitive if your query contains uppercase letters. This matches how VS Code, ripgrep, and most modern tools work.
Token Limiting
Results are automatically truncated to ~100k tokens to prevent overwhelming responses. You'll see a warning if truncation occurred.
Binary Detection
Binary files (images, executables, archives, etc.) are automatically skipped to keep results clean and relevant.
Symlink Safety
Symlinks are followed, but loops are detected and prevented. No more infinite traversal!
Default Excludes
These directories are always skipped unless you override:
node_modules.gitdist,buildcoverage.next,.nuxt__pycache__,.pytest_cachevenv,.venvtarget(Rust)vendor(Go)
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run tests
npm test
npm run test:watch # Watch modeMetrics
All tool calls are tracked locally for development analysis. Metrics include:
Tool usage counts
Search patterns and queries
Response times
Error and truncation rates
Reasoning text for understanding use cases
# View metrics summary
npm run metrics
# View last 50 raw calls
npm run metrics:raw
# Clear all metrics
npm run metrics:clearMetrics are stored at ~/.file-search-mcp/metrics.json
License
MIT
Available Tools
4 toolsfuzzy_findA
USE WHEN YOU DON'T KNOW THE EXACT FILENAME. Fuzzy search that finds "UserController.ts" when you type "usrctl".
Ranked by match quality - best matches first. Perfect when you vaguely remember a filename or are exploring an unfamiliar codebase.
Much faster than glob with wildcards when you're guessing at names.
Examples: "userctrl" → UserController.ts, "jenkfile" → Jenkinsfile, "slacklib" → slackLib.groovy
Inputs: reasoning (required), query (required), path, include_hidden, +1 more.
search_contentA
USE INSTEAD OF GREP. Search file contents with surrounding context - see matches in context without follow-up reads.
Respects .gitignore, skips binary files, smart case-sensitivity. Use for finding implementations, tracing function calls, or analyzing patterns across a codebase.
Use context_lines parameter to control how much surrounding code you see (default: 2 lines).
Examples: "slackSend|notification" in *.groovy, "webhook" across all files, "TODO" in src/
Requires ripgrep: brew install ripgrep (macOS) | apt install ripgrep (Ubuntu)
Inputs: reasoning (required), query (required), path, file_pattern, +5 more.
search_filesA
USE INSTEAD OF GLOB/FIND. Find files by pattern with built-in previews - eliminates follow-up read calls.
Respects .gitignore, skips binary files, filters by size/date, handles symlinks safely. Perfect for exploring unfamiliar codebases or analyzing build infrastructure.
Set detail_level="full" to get content previews without separate read calls.
Examples: ".yml" in .github/workflows/, "**/Jenkinsfile", "*.config.js"
Inputs: reasoning (required), pattern (required), path, include_hidden, +5 more.
treeA
USE INSTEAD OF LS/FIND FOR STRUCTURE. Visualize directory layout without multiple commands.
Get instant overview of project organization. Configurable depth prevents overwhelming output in deep repos.
Use this first when exploring a new codebase - shows you where to look before you start searching.
Perfect for: "Show me the project structure", "What's in repos/jenkins/", "How is src/ organized?"
Inputs: reasoning (required), path, depth, include_hidden, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct search modality: fuzzy_find for approximate filename matching, search_content for grepping file contents, search_files for pattern-based file listing with previews, and tree for directory structure visualization. No overlap in purposes.
All tools use lowercase snake_case with clear verbs or nouns (fuzzy_find, search_content, search_files, tree). The naming pattern is consistent and predictable, aiding agent selection.
4 tools is well-scoped for a file search server. Each tool serves a core need (fuzzy name search, content grep, pattern file search, directory tree) without redundancy or excess.
The tool surface covers essential file exploration operations: fuzzy name finding, content search with context, pattern-based file discovery with previews, and project structure overview. No obvious gaps for typical use cases.
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Search and install shadcn/ui blocks, components and page templates. Free items need no key.
1
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides LLM-optimized filesystem access with intelligent file pagination for large files, lightning-fast ripgrep-powered code search with regex support, and security sandboxing to safely explore and search codebases.71MIT
- AlicenseNot gradedqualityBmaintenanceEnables fuzzy file searching, list filtering, and content searching using fzf's blazing-fast fuzzy matching algorithm. Self-contained with automatic fzf binary installation and cross-platform support.17 npm3MIT
- AlicenseNot gradedqualityDmaintenanceProvides fast file search capabilities using fd (a modern find alternative), enabling AI assistants to efficiently navigate codebases, search file contents with ripgrep, and execute commands on matched files.1MIT
- AlicenseAqualityDmaintenanceProvides ripgrep search capabilities to MCP clients like Claude, enabling high-performance text searches across files on your system.56 npmMIT