morph-search
Fast codebase search via WarpGrep (20x faster than grep)
When & Why to Use This Skill
Morph Codebase Search is a high-performance developer utility that leverages WarpGrep to deliver codebase searching capabilities up to 20 times faster than traditional grep. Designed for speed and efficiency, it allows AI agents and developers to instantly locate patterns, function names, and variables across massive repositories, while also supporting programmatic file editing to streamline development workflows.
Use Cases
- Rapid Code Exploration: Quickly navigate and understand large, complex codebases by finding specific function definitions, variable declarations, or architectural patterns in seconds.
- Efficient Debugging and Troubleshooting: Accelerate the debugging process by instantly locating the source of error messages or specific logic across thousands of files.
- Automated Refactoring: Perform project-wide updates, such as renaming variables or updating import statements, by combining high-speed regex search with programmatic file editing.
- Security and Compliance Auditing: Scan entire repositories for sensitive information, hardcoded credentials, or the use of deprecated and insecure APIs using powerful regex matching.
| name | morph-search |
|---|---|
| description | Fast codebase search via WarpGrep (20x faster than grep) |
| allowed-tools | [Bash, Read] |
Morph Codebase Search
Fast, AI-powered codebase search using WarpGrep. 20x faster than traditional grep.
When to Use
- Search codebase for patterns, function names, variables
- Find code across large codebases quickly
- Edit files programmatically
Usage
Search for code patterns
uv run python -m runtime.harness scripts/mcp/morph_search.py \
--search "authentication" --path "."
Search with regex
uv run python -m runtime.harness scripts/mcp/morph_search.py \
--search "def.*login" --path "./src"
Edit a file
uv run python -m runtime.harness scripts/mcp/morph_search.py \
--edit "/path/to/file.py" --content "new content"
Parameters
| Parameter | Description |
|---|---|
--search |
Search query/pattern |
--path |
Directory to search (default: .) |
--edit |
File path to edit |
--content |
New content for file (use with --edit) |
Examples
# Find all async functions
uv run python -m runtime.harness scripts/mcp/morph_search.py \
--search "async def" --path "./src"
# Search for imports
uv run python -m runtime.harness scripts/mcp/morph_search.py \
--search "from fastapi import" --path "."
vs ast-grep
| Tool | Best For |
|---|---|
| morph/warpgrep | Fast text/regex search (20x faster) |
| ast-grep | Structural code search (understands syntax) |
MCP Server Required
Requires morph server in mcp_config.json with MORPH_API_KEY.