mcpField
M
morph-search

morph-search

github.com/parcadeiDevelopment3.9k491 installsUpdated 39w ago
Repository

About morph-search

A skill for searching codebases and editing files with Morph’s WarpGrep. It supports text and regex searches across directories, along with programmatic file replacement.

Key features

  1. 01Search code patterns
  2. 02Search with regular expressions
  3. 03Set a search directory
  4. 04Replace file contents
  5. 05Compare text search with ast-grep

Use cases

  1. 01Find a function or variable across a codebase
  2. 02Locate imports or async functions
  3. 03Replace the contents of a file

MCP support

Requires the `morph` MCP server in `mcp_config.json` and `MORPH_API_KEY`.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/parcadei/continuous-claude-v3 --skill morph-search

After installing, type/morph-searchin Claude Code to confirm it loaded.

Details

From the project README

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

ParameterDescription
--searchSearch query/pattern
--pathDirectory to search (default: .)
--editFile path to edit
--contentNew 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

ToolBest For
morph/warpgrepFast text/regex search (20x faster)
ast-grepStructural code search (understands syntax)

MCP Server Required

Requires morph server in mcp_config.json with MORPH_API_KEY.

Comments

Markdown supported