@morphllm/morphmcp
v0.8.136
Published
Fast & accurate MCP server with AI-powered file editing and intelligent code search. Prevents context pollution and saves time for a better user experience.
Downloads
32,684
Readme
Morph MCP
Supercharge your coding agent. One MCP with two specialized tools for faster edits and smarter retrieval.
Tools
| Tool | What it does |
|------|-------------|
| edit_file | Apply code changes at 10,500+ tokens/sec with 98% accuracy |
| codebase_search | Natural-language code exploration sub-agent backed by WarpGrep under the hood |
| github_codebase_search | Search any public GitHub repo by URL or owner/repo shorthand |
All three tools are always exposed. Clients can manage tool visibility on their side.
Quick Start
Claude Code
claude mcp add morph-mcp -e MORPH_API_KEY=sk-xxx -- npx -y @morphllm/morphmcpCursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"morph-mcp": {
"command": "npx",
"args": ["-y", "@morphllm/morphmcp"],
"env": {
"MORPH_API_KEY": "sk-xxx"
}
}
}
}VS Code
Add to .vscode/mcp.json:
{
"mcp": {
"servers": {
"morph-mcp": {
"command": "npx",
"args": ["-y", "@morphllm/morphmcp"],
"env": {
"MORPH_API_KEY": "sk-xxx"
}
}
}
}
}How the Tools Work
edit_file
Applies code edits using Morph's Fast Apply model. The agent sends partial code with // ... existing code ... placeholders, and Fast Apply merges it into the full file.
Input:
path: "src/api.ts"
code_edit: |
export async function fetchData(endpoint: string) {
// ... existing code ...
const response = await fetch(endpoint, {
headers,
timeout: 5000 // added timeout
});
// ... existing code ...
}
instruction: "Add 5 second timeout to fetch call"
Output: Git-style unified diff showing exactly what changedcodebase_search
codebase_search is the MCP-facing wrapper around WarpGrep. Ask a natural-language question about what you want to understand and it will use WarpGrep under the hood to locate relevant files and line ranges. It does not accept regex or symbol-only queries.
Good: Where does auth get handled, what are the different oauth methods supported?
Bad: auth()
Input:
search_string: "Where does auth get handled, what are the different oauth methods supported?"
repo_path: "/Users/me/project"
search_type: "default" # optional: "default" or "node_modules"
Output: List of files with specific line ranges + actual code contentConfiguration
| Variable | Description | Default |
|----------|-------------|---------|
| MORPH_API_KEY | Your API key from morphllm.com | Required |
| MORPH_API_URL | Override Morph API base URL for custom proxies | https://api.morphllm.com |
| MORPH_WARP_GREP_TIMEOUT | Timeout for warp grep model calls in ms | 30000 |
Get an API Key
- Sign up at morphllm.com
- Go to dashboard → API Keys
- Keys start with
sk-ormorph-
Links
License
MIT
