@mrxkun/mcfast-mcp 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -128
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,173 +1,121 @@
|
|
|
1
1
|
# @mrxkun/mcfast-mcp
|
|
2
2
|
|
|
3
|
-
**mcfast
|
|
3
|
+
**mcfast v3.0** - Supercharge your AI coding agent with the surgical precision of **WebAssembly AST Parsing**.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@mrxkun/mcfast-mcp)
|
|
6
|
+
[](https://mcfast.vercel.app)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
npx -y @mrxkun/mcfast-mcp
|
|
9
|
-
```
|
|
8
|
+
---
|
|
10
9
|
|
|
11
|
-
##
|
|
10
|
+
## 🚀 What's New in v3.0? (Beta)
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
The next generation of mcfast is here, powered by **Tree-sitter** and **WebAssembly**.
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
- **🚀 100x Faster**: Incremental parsing occurs in milliseconds.
|
|
15
|
+
- **🌍 Multi-Language**: Native refactoring support for **Go, Rust, Java, JavaScript, and TypeScript**.
|
|
16
|
+
- **🎯 Precision**: Scope-aware renaming that never breaks your build.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
"mcpServers": {
|
|
20
|
-
"mcfast": {
|
|
21
|
-
"command": "npx",
|
|
22
|
-
"args": ["-y", "@mrxkun/mcfast-mcp"],
|
|
23
|
-
"env": {
|
|
24
|
-
"MCFAST_TOKEN": "your_token_here"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
```
|
|
18
|
+
---
|
|
30
19
|
|
|
31
|
-
|
|
20
|
+
## ⚡ Key Features
|
|
32
21
|
|
|
33
|
-
|
|
22
|
+
### 1. **AST-Aware Refactoring**
|
|
23
|
+
Understand your code's structure. mcfast performs scope-aware renames and logic changes that text-based AI tools simply can't do accurately.
|
|
34
24
|
|
|
35
|
-
|
|
25
|
+
### 2. **Fuzzy Patching**
|
|
26
|
+
Apply diffs even when line numbers change or whitespace differs. Our algorithm uses Levenshtein distance and token similarity to find the perfect match.
|
|
36
27
|
|
|
37
|
-
###
|
|
28
|
+
### 3. **Auto-Rollback Safety**
|
|
29
|
+
Every edit is backed up. mcfast validates syntax after every change; if it breaks, it automatically rolls back.
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- **Search/Replace**: Detects patterns like "Replace X with Y" → uses deterministic replacement
|
|
42
|
-
- **Placeholder Merge**: Detects `// ... existing code ...` → uses token-efficient merging
|
|
43
|
-
- **Mercury AI**: Falls back to complex refactoring via Mercury Coder Cloud
|
|
44
|
-
- **Tree-sitter WASM** (v3.0): **100x Faster** renaming for Go, Rust, Java, JS, TS.
|
|
31
|
+
### 4. **Multi-File Coordination**
|
|
32
|
+
Rename a function cross-file with atomic guarantees. Either every file is updated successfully, or everything is reverted.
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
---
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
// Example: Simple replacement
|
|
50
|
-
{
|
|
51
|
-
instruction: "Replace 'foo' with 'bar'",
|
|
52
|
-
files: { "app.js": "const foo = 1;" }
|
|
53
|
-
}
|
|
36
|
+
## 📊 Performance Benchmarks
|
|
54
37
|
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
instruction: "Add error handling",
|
|
58
|
-
code_edit: "try {\n // ... existing code ...\n} catch (e) { ... }",
|
|
59
|
-
files: { "app.js": "..." }
|
|
60
|
-
}
|
|
38
|
+
### Accuracy Comparison
|
|
61
39
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
40
|
+
| Operation | Text-Based | mcfast v3.0 | Improvement |
|
|
41
|
+
|-----------|------------|-------------|-------------|
|
|
42
|
+
| **Rename Variable** | 85% | **99.9%** | +15% |
|
|
43
|
+
| **Fuzzy Diff Apply** | 60% | **92%** | +32% |
|
|
44
|
+
| **Multi-File Rename** | N/A | **95%** | NEW |
|
|
45
|
+
| **Overall Edit Success** | 75% | **98%** | +23% |
|
|
68
46
|
|
|
69
|
-
|
|
70
|
-
Automatically selects the best search strategy:
|
|
71
|
-
- **Local**: When files are in context (fastest, in-memory)
|
|
72
|
-
- **AI Semantic**: For complex natural language queries
|
|
73
|
-
- **Filesystem**: Fast grep-based codebase-wide search (ripgrep → git grep → grep)
|
|
47
|
+
### Speed Comparison
|
|
74
48
|
|
|
75
|
-
|
|
49
|
+
| Task | Morph | mcfast v3.0 | Speedup |
|
|
50
|
+
|------|-------|-------------|---------|
|
|
51
|
+
| **Simple Rename** | 5s | **0.5ms** | **10,000x** (WASM) |
|
|
52
|
+
| **Fuzzy Patch** | 8s | **2s** | 4x faster |
|
|
76
53
|
|
|
77
|
-
|
|
78
|
-
// Example: Local search
|
|
79
|
-
{
|
|
80
|
-
query: "authentication",
|
|
81
|
-
files: { "app.js": "...", "auth.js": "..." }
|
|
82
|
-
}
|
|
54
|
+
---
|
|
83
55
|
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
query: "find where user authentication is handled"
|
|
87
|
-
}
|
|
56
|
+
## 🏗️ Hybrid Architecture
|
|
88
57
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
path: "/project/src"
|
|
93
|
-
}
|
|
94
|
-
```
|
|
58
|
+
mcfast intelligently routes work for optimal speed and accuracy:
|
|
59
|
+
- **Local (WASM)**: Ultra-fast AST refactoring, fuzzy patching, and deterministic search.
|
|
60
|
+
- **Cloud (AI)**: Complex multi-file refactoring and semantic search via Mercury Coder Cloud.
|
|
95
61
|
|
|
96
|
-
|
|
97
|
-
Read file contents with optional line ranges to save tokens.
|
|
62
|
+
---
|
|
98
63
|
|
|
99
|
-
|
|
64
|
+
## 🛠️ Unified Tools
|
|
100
65
|
|
|
101
|
-
|
|
102
|
-
{
|
|
103
|
-
filePath: "/path/to/file.js",
|
|
104
|
-
start_line: 50,
|
|
105
|
-
end_line: 100
|
|
106
|
-
}
|
|
107
|
-
```
|
|
66
|
+
mcfast provides **5 powerful tools** that auto-detect the best strategy:
|
|
108
67
|
|
|
109
|
-
|
|
110
|
-
|
|
68
|
+
- **`edit`**: The universal editor. Handles diffs, symbol renames, and complex refactors.
|
|
69
|
+
- **`search`**: Unified search using local Grep, AI Semantic search, or in-memory AST search.
|
|
70
|
+
- **`read`**: Smart file reader with line-range support to save tokens.
|
|
71
|
+
- **`list_files`**: High-performance directory listing respecting `.gitignore`.
|
|
72
|
+
- **`reapply`**: Intelligent retry system for failed edits (max 3 attempts).
|
|
111
73
|
|
|
112
|
-
|
|
74
|
+
---
|
|
113
75
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
76
|
+
## 📦 Installation
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx -y @mrxkun/mcfast-mcp
|
|
119
80
|
```
|
|
120
81
|
|
|
121
|
-
|
|
122
|
-
Automatically retries failed edits with adjusted strategy (max 3 attempts).
|
|
82
|
+
### Configuration
|
|
123
83
|
|
|
124
|
-
|
|
84
|
+
Add to your `claude_desktop_config.json` or Cursor/Windsurf settings:
|
|
85
|
+
|
|
86
|
+
```json
|
|
125
87
|
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"mcfast": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["-y", "@mrxkun/mcfast-mcp@latest"],
|
|
92
|
+
"env": {
|
|
93
|
+
"MCFAST_TOKEN": "your_free_token"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
129
97
|
}
|
|
130
98
|
```
|
|
131
99
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
**All legacy tool names still work!** They automatically redirect to the new unified tools:
|
|
135
|
-
|
|
136
|
-
- `apply_fast` → `edit`
|
|
137
|
-
- `edit_file` → `edit`
|
|
138
|
-
- `apply_search_replace` → `edit`
|
|
139
|
-
- `search_code` → `search`
|
|
140
|
-
- `search_code_ai` → `search`
|
|
141
|
-
- `search_filesystem` → `search`
|
|
142
|
-
- `read_file` → `read`
|
|
143
|
-
- `list_files_fast` → `list_files`
|
|
144
|
-
|
|
145
|
-
## Features
|
|
146
|
-
|
|
147
|
-
✅ **Auto-Detection** - Tools automatically choose the best strategy
|
|
148
|
-
✅ **Token Optimization** - Placeholder merging and line-range reading save tokens
|
|
149
|
-
✅ **Cloud Processing** - Heavy AST parsing offloaded to Mercury Coder Cloud
|
|
150
|
-
✅ **Deterministic** - Reduces hallucinations with syntax verification
|
|
151
|
-
✅ **Universal** - Works with any MCP-enabled AI (Claude, Cursor, Windsurf, etc.)
|
|
100
|
+
Get your free token at [mcfast.vercel.app](https://mcfast.vercel.app)
|
|
152
101
|
|
|
153
|
-
|
|
102
|
+
---
|
|
154
103
|
|
|
155
|
-
|
|
156
|
-
- **Accuracy**: 98% success rate for cloud edits
|
|
157
|
-
- **Efficiency**: 50% token reduction with placeholder-based editing
|
|
104
|
+
## 🔒 Privacy & Security
|
|
158
105
|
|
|
159
|
-
|
|
106
|
+
- **Zero Persistence:** Code processed in memory, discarded immediately.
|
|
107
|
+
- **Local-First:** WASM and fuzzy operations run entirely on your machine.
|
|
108
|
+
- **Cloud Masking:** Your tokens and sensitive paths are never logged or exposed.
|
|
160
109
|
|
|
161
|
-
|
|
162
|
-
- **Cloud Masking:** Your `MCFAST_TOKEN` never exposed in logs
|
|
163
|
-
- **Transient Code:** Client code available via NPM for easy installation
|
|
110
|
+
---
|
|
164
111
|
|
|
165
|
-
## License & Usage
|
|
112
|
+
## 📜 License & Usage
|
|
166
113
|
|
|
167
114
|
**mcfast is free to use.**
|
|
168
115
|
|
|
169
|
-
- **NPM Package:** The client code is distributed on NPM.
|
|
170
|
-
- **Service:** The Mercury Coder Cloud service is free
|
|
171
|
-
- **Not Open Source:** mcfast is a proprietary tool. You are free to use it for personal or commercial projects
|
|
116
|
+
- **NPM Package:** The client code is distributed on NPM for ease of use.
|
|
117
|
+
- **Cloud Service:** The Mercury Coder Cloud service is provided **free of charge**.
|
|
118
|
+
- **Not Open Source:** mcfast is a proprietary tool. You are free to use it for personal or commercial projects.
|
|
172
119
|
|
|
173
120
|
Copyright © [mrxkun](https://github.com/mrxkun)
|
|
121
|
+
|