Skip to main content

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_file via ENABLED_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
Add to your Cursor MCP by clicking this button: Install MCP ServerOR add to your Cursor MCP config file:Location: ~/.cursor/mcp.json
{
  "mcpServers": {
    "morph-mcp": {
      "env": {
        "MORPH_API_KEY": "your-api-key-here"
      },
      "command": "npx -y @morphllm/morphmcp",
      "args": []
    }
  }
}
Global Config: This configuration works across all your projects automatically. The MCP server detects workspace boundaries via .git, package.json, and other project indicators.
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 /mcp and /tools to see Morph’s edit_file tool
Cursor/VS Code: Make any code edit request - should use Morph automatically
Codex: Run codex mcp list to verify server is configured, then make edit requests
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

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+, 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
  4. Enable edit-only mode: Use ALL_TOOLS: "false" when you only need editing capabilities

Performance Comparison

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