Ultra-fast code editing with fuzzy patching, auto-rollback, and 5 unified tools.
npm install @mrxkun/mcfast-mcpmcfast v2.0 - Supercharge your AI coding agent with intelligent, unified tools.
``bash`
npx -y @mrxkun/mcfast-mcp
Add to your MCP configuration:
`json`
{
"mcpServers": {
"mcfast": {
"command": "npx",
"args": ["-y", "@mrxkun/mcfast-mcp"],
"env": {
"MCFAST_TOKEN": "your_token_here"
}
}
}
}
Get your free token at mcfast.vercel.app
mcfast v2.0 features 5 unified tools with intelligent auto-detection:
#### edit - Universal File Editing// ... existing code ...
Intelligently edits files with automatic strategy detection:
- Search/Replace: Detects patterns like "Replace X with Y" ā uses deterministic replacement
- Placeholder Merge: Detects ā uses token-efficient merging
- Mercury AI: Falls back to complex refactoring via Mercury Coder Cloud
Replaces: apply_fast, edit_file, apply_search_replace
`javascript
// Example: Simple replacement
{
instruction: "Replace 'foo' with 'bar'",
files: { "app.js": "const foo = 1;" }
}
// Example: Placeholder-based
{
instruction: "Add error handling",
code_edit: "try {\n // ... existing code ...\n} catch (e) { ... }",
files: { "app.js": "..." }
}
// Example: Complex refactoring
{
instruction: "Refactor authentication to use JWT tokens",
files: { "auth.js": "...", "middleware.js": "..." }
}
`
#### search - Unified Code Search
Automatically selects the best search strategy:
- Local: When files are in context (fastest, in-memory)
- AI Semantic: For complex natural language queries
- Filesystem: Fast grep-based codebase-wide search (ripgrep ā git grep ā grep)
Replaces: search_code, search_code_ai, search_filesystem
`javascript
// Example: Local search
{
query: "authentication",
files: { "app.js": "...", "auth.js": "..." }
}
// Example: Semantic search
{
query: "find where user authentication is handled"
}
// Example: Filesystem search
{
query: "TODO",
path: "/project/src"
}
`
#### read - File Reading
Read file contents with optional line ranges to save tokens.
Replaces: read_file
`javascript`
{
path: "/path/to/file.js",
start_line: 50,
end_line: 100
}
#### list_files - Directory Listing.gitignore
List files in a directory (recursive) respecting .
Replaces: list_files_fast
`javascript`
{
path: "/project/src",
depth: 3
}
#### reapply - Smart Retry
Automatically retries failed edits with adjusted strategy (max 3 attempts).
`javascript`
{
instruction: "Original instruction that failed",
files: { "app.js": "..." },
errorContext: "Error message from previous attempt"
}
All legacy tool names still work! They automatically redirect to the new unified tools:
- apply_fast ā editedit_file
- ā editapply_search_replace
- ā editsearch_code
- ā searchsearch_code_ai
- ā searchsearch_filesystem
- ā searchread_file
- ā readlist_files_fast
- ā list_files
ā
Auto-Detection - Tools automatically choose the best strategy
ā
Token Optimization - Placeholder merging and line-range reading save tokens
ā
Cloud Processing - Heavy AST parsing offloaded to Mercury Coder Cloud
ā
Deterministic - Reduces hallucinations with syntax verification
ā
Universal - Works with any MCP-enabled AI (Claude, Cursor, Windsurf, etc.)
- Speed: 10,000+ tokens/sec for local operations
- Accuracy: 98% success rate for cloud edits
- Efficiency: 50% token reduction with placeholder-based editing
- Zero Persistence: Code processed in memory, discarded immediately
- Cloud Masking: Your MCFAST_TOKEN` never exposed in logs
- Open Source: Audit the source at github.com/ndpmmo/mcfast
MIT Ā© mrxkun