Overview
Connect to Morph’s models via MCP. Works with Claude, Cursor, VS Code, and other MCP clients. Two modes:- Default (recommended):
edit_fileand ‘warp_grep’ via environment variableENABLED_TOOLS="edit_file", "warp_grep" - Full filesystem: All 16 tools (including the above) via environment variable
ENABLED_TOOLS="all"
Installation
1
1. Configure Your MCP Client
- Cursor
- Claude Code
- Codex
- Claude Desktop
- VS Code
- Manual
Add to your Cursor MCP by clicking this button:
OR add to your Cursor MCP config file:Location:
~/.cursor/mcp.jsonGlobal Config: This configuration works across all your projects automatically. The MCP server detects workspace boundaries via
.git, package.json, and other project indicators.Add to your rules in Settings → Rules for AI:
"morph-mcp's warp-grep surfaces relevant context across files. Use it first when understanding code."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: Type
Cursor/VS Code: Make any code edit request - should use Morph automatically
Codex: Run
Manual: Check server logs show “MCP Server started successfully”
/mcp and /tools to see Morph’s edit_file toolCursor/VS Code: Make any code edit request - should use Morph automatically
Codex: Run
codex mcp list to verify server is configured, then make edit requestsManual: Check server logs show “MCP Server started successfully”
Configuration
| Variable | Default | Description |
|---|---|---|
MORPH_API_KEY | Required | Your 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
Additional Tools (when ENABLED_TOOLS: “all”)
You get 15 additional filesystem tools:read_file, read_multiple_files, write_file, tiny_edit_file, list_directory, list_directory_with_sizes, directory_tree, create_directory, search_files, move_file, get_file_info, list_allowed_directories
Troubleshooting
Server won’t start: Check API key, Node.js 16+, runnpm cache clean --forceTools 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
- Use
edit_filefor modifications: Much faster than reading + writing entire files - Minimize edit scope: Include only the sections that need changes
- Batch related edits: Make multiple changes in a single
edit_filecall - Enable edit-only mode: Use
ALL_TOOLS: "false"when you only need editing capabilities
Performance Comparison
| Method | Speed | Use Case |
|---|---|---|
edit_file (Morph) | ~11 seconds | Code modifications, updates |
| Search & replace | ~20 seconds | Simple text substitutions |
| Traditional read/write | ~60 seconds | Full file rewrites |