Overview
Connect to Morph’s 10,500+ tok/s file editing via Model Context Protocol. Works with Claude, Cursor, VS Code, and other MCP clients. Two modes:- Default (recommended):
edit_fileviaENABLED_TOOLS="edit_file" - Full filesystem: All 16 tools (including the above) via
ENABLED_TOOLS="all"
Installation
1
1. Configure Your MCP Client
- Cursor
- Claude Code
- Codex
- Claude Desktop
- VS Code
- Manual
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 |