Overview
Connect to Morph’s models via MCP. Works with Claude Code, Codex, Cursor, and other MCP clients. Two modes:- Default (recommended):
edit_fileand ‘warpgrep_codebase_search’ via environment variableENABLED_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
- Claude Code
- Codex
- Cursor
- Claude Desktop
- VS Code
- Manual
One-liner Installation (Recommended):Manual Config File Method:Create or edit
Configure Claude to prefer Morph: Add this to your global Claude config:
.claude.json in your workspace: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
Codex: Run
Cursor/VS Code: Make any code edit request - should use Morph automatically
Manual: Check server logs show “MCP Server started successfully”
/mcp and /tools to see Morph’s edit_file toolCodex: Run
codex mcp list to verify server is configured, then make edit requestsCursor/VS Code: Make any code edit request - should use Morph automatically
Manual: 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 |
Advanced Configuration
| Variable | Default | Description |
|---|---|---|
MORPH_API_URL | https://api.morphllm.com | Override the Morph API base URL (for proxies) |
MORPH_WARP_GREP_TIMEOUT | 30000 | Timeout for Warp Grep model calls in milliseconds |
/v1/chat/completions with the token in the Authorization: Bearer header. Forward these to https://api.morphllm.com/v1/chat/completions after handling auth/billing.
Warp Grep timeout — Increase for large codebases or slow networks:
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+, 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
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 |