Skip to main content

Overview

Connect to Morph’s models via MCP. Works with Claude Code, Codex, Cursor, and other MCP clients. Two modes:
  • Default (recommended): edit_file and ‘warpgrep_codebase_search’ via environment variable ENABLED_TOOLS="edit_file", "warpgrep_codebase_search"
  • Custom : If you want more control over the tools used, you can specify any one of the two available tools

Installation

1

1. Configure Your MCP Client

One-liner Installation (Recommended):
claude mcp add filesystem-with-morph -e MORPH_API_KEY={user.morphApiKey} -- npx -y @morphllm/morphmcp
Configure Claude to prefer Morph: Add this to your global Claude config:
mkdir -p ~/.claude && echo "ALWAYS use mcp__filesystem-with-morph__edit_file for code edits. morph-mcp's warpgrep_codebase_search surfaces relevant context across files. Use it first when understanding code." >> ~/.claude/CLAUDE.md
Manual Config File Method:Create or edit .claude.json in your workspace:
{
  "mcpServers": {
    "filesystem-with-morph": {
      "env": {
        "MORPH_API_KEY": "{user.morphApiKey}"
      },
      "command": "npx -y @morphllm/morphmcp",
      "args": []
    }
  }
}
2

2. Get API Key

Get your API key from the dashboard and replace your-api-key-here in your configuration.
3

3. Test Installation

Claude Code: Type /mcp and /tools to see Morph’s edit_file tool
Codex: Run codex mcp list to verify server is configured, then make edit requests
Cursor/VS Code: Make any code edit request - should use Morph automatically
Manual: Check server logs show “MCP Server started successfully”

Configuration

VariableDefaultDescription
MORPH_API_KEYRequiredYour API key
ENABLED_TOOLS"edit_file"Comma-separated list of tools, or "all" for full filesystem access
WORKSPACE_MODE"true"Auto workspace detection
DEBUG"false"Debug logging

Available Tools

Morph-Powered Tools (Default)

edit_file - 10,500+ tokens/sec code editing via Morph Apply warpgrep_codebase_search - up to 8 parallel tool calls per turn, a smart, fast search sub agent.

Troubleshooting

Server won’t start: Check API key, Node.js 16+, run npm cache clean --force
Tools missing: Restart client, validate JSON config
Workspace issues: Add .git or package.json, or set WORKSPACE_MODE="false"
Slow performance: Use edit_file over write_file, check network to api.morphllm.com

Performance Optimization

Best Practices

  1. Use edit_file for modifications: Much faster than reading + writing entire files
  2. Minimize edit scope: Include only the sections that need changes
  3. Batch related edits: Make multiple changes in a single edit_file call

Performance Comparison

MethodSpeedUse Case
edit_file (Morph)~11 secondsCode modifications, updates
Search & replace~20 secondsSimple text substitutions
Traditional read/write~60 secondsFull file rewrites