The problem
Coding agents waste most of their compute on things that aren’t reasoning. Cognition measured 60% of turns spent searching. Anthropic found specialized subprocesses improve task completion by 90%. And every file-editing agent hits the same failure: it rewrites a 500-line file to change 3 lines, burning tokens and introducing drift. These aren’t reasoning problems. They’re mechanical problems, and they have mechanical solutions.| Without Morph | With Morph |
|---|---|
| Agent rewrites a 500-line file to change 3 lines. Costs ~$0.12, takes 8 seconds. | Agent sends a 10-line edit snippet. Merged in under a second at 10,500 tok/s, 98% accuracy. |
str_replace fails when whitespace doesn’t match. Agent re-reads the file, retries. | Fast Apply takes a lazy snippet. No re-reads, no exact-string matching. |
| Agent spends 60% of turns searching. Results fill the context window. | WarpGrep searches in a separate context. Finds code in 3.8 steps. Main context stays clean. |
| After 50 turns, chat history is 80% filler. Model starts forgetting. | Compact removes irrelevant lines at 33,000 tok/s. 50-70% reduction. Every surviving line is verbatim. |
Get running in 30 seconds
One command installs the MCP server and addsedit_file + codebase_search to your editor. It auto-detects Claude Code, Cursor, Codex, and VS Code, then configures them all.
Terminal
npx -y @morphllm/morph-setup --morph-api-key YOUR_API_KEY
Logged in? Your API key auto-fills above. Otherwise, grab one from your dashboard.
Full MCP setup guide
Per-client configuration, CLAUDE.md prompts, and troubleshooting
Building an agent? Use the SDK.
OpenAI-compatible API. Point any OpenAI SDK athttps://api.morphllm.com/v1.
import { MorphClient } from '@morphllm/morphsdk';
const morph = new MorphClient({ apiKey: process.env.MORPH_API_KEY });
// Edit a file: 10,500 tok/s, 98% accuracy
const edit = await morph.fastApply.execute({
target_filepath: 'src/auth.ts',
instructions: 'Add null check before session creation',
code_edit: '// ... existing code ...\nif (!user) throw new Error("Not found");\n// ... existing code ...'
});
// Search a codebase: 3.8 steps, 8 parallel tool calls per turn
const search = await morph.warpGrep.execute({
searchTerm: 'Find authentication middleware',
repoRoot: '.'
});
// Compress context: 33,000 tok/s, 50-70% reduction
const compact = await morph.compact({
input: chatHistory,
query: 'JWT token validation'
});
npm install @morphllm/morphsdk
Products
| Product | What it does | Speed | Key metric |
|---|---|---|---|
| Fast Apply | Merges edit snippets into files | 10,500 tok/s | 98% accuracy |
| WarpGrep | Searches code in an isolated context window | ~3.8 steps | #1 SWE-Bench Pro |
| Compact | Removes irrelevant lines from chat history | 33,000 tok/s | 50-70% reduction, verbatim |
| Router | Routes prompts to the right model tier | ~50ms | $0.005/request |
| Reflexes | Classifies text for guardrails and routing | ~90ms | $0.0005/event |
Common gotchas
If you’re coming from…
- Claude Code / Codex
- Cursor
- Aider / Continue
- Building your own agent
Install the MCP server.
edit_file and codebase_search appear as tools automatically. No code changes. MCP quickstart →Next steps
Fast Apply Quickstart
Prompt templates, code examples, verification
WarpGrep Guide
Codebase search, GitHub search, streaming
Compact Guide
Query-conditioned compression, keepContext tags
MCP Integration
Claude Code, Cursor, Codex, VS Code
SDK Reference
Full TypeScript SDK documentation
API Playground
Test with live examples
Enterprise
Dedicated instances, self-hosted deployments, zero data retention. 99.9% uptime SLA, SOC2, SSO.Talk to Sales
Custom deployments and volume pricing
