@mrxkun/mcfast-mcp 1.0.6 → 1.0.7
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 +1 -1
- package/package.json +1 -1
- package/src/index.js +14 -2
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ mcfast provides built-in strategies for AI agents (Claude Desktop, etc) to use t
|
|
|
91
91
|
## 🔒 Privacy & Security
|
|
92
92
|
|
|
93
93
|
- **Zero Persistence:** Code is processed in-memory and discarded immediately
|
|
94
|
-
- **Open Source Client:** Audit the source at [github.com/ndpmmo/mcfast](https://github.com/ndpmmo/mcfast). Current stable version: `1.0.
|
|
94
|
+
- **Open Source Client:** Audit the source at [github.com/ndpmmo/mcfast](https://github.com/ndpmmo/mcfast). Current stable version: `1.0.7`.
|
|
95
95
|
- **Token Masking:** Your `MCFAST_TOKEN` is never logged
|
|
96
96
|
|
|
97
97
|
---
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -14,9 +14,9 @@ import path from "path";
|
|
|
14
14
|
const API_URL = "https://mcfast.vercel.app/api/v1";
|
|
15
15
|
const TOKEN = process.env.MCFAST_TOKEN;
|
|
16
16
|
|
|
17
|
+
// Token validation moved to request handlers for better UX (prevents server crash)
|
|
17
18
|
if (!TOKEN) {
|
|
18
|
-
console.error("
|
|
19
|
-
process.exit(1);
|
|
19
|
+
console.error("⚠️ Warning: MCFAST_TOKEN is missing. Tools will fail until configured.");
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const server = new Server(
|
|
@@ -285,6 +285,12 @@ async function handleEditFile({ path: filePath, content, instruction = "" }) {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
async function handleApplyFast({ instruction, files, dryRun }) {
|
|
288
|
+
if (!TOKEN) {
|
|
289
|
+
return {
|
|
290
|
+
content: [{ type: "text", text: "❌ Error: MCFAST_TOKEN is missing. Please set it in your MCP config." }],
|
|
291
|
+
isError: true
|
|
292
|
+
};
|
|
293
|
+
}
|
|
288
294
|
try {
|
|
289
295
|
const response = await fetch(`${API_URL}/apply`, {
|
|
290
296
|
method: "POST",
|
|
@@ -347,6 +353,12 @@ async function handleApplyFast({ instruction, files, dryRun }) {
|
|
|
347
353
|
}
|
|
348
354
|
|
|
349
355
|
async function handleSearchCodeAI({ query, files, contextLines = 2 }) {
|
|
356
|
+
if (!TOKEN) {
|
|
357
|
+
return {
|
|
358
|
+
content: [{ type: "text", text: "❌ Error: MCFAST_TOKEN is missing. Please set it in your MCP config." }],
|
|
359
|
+
isError: true
|
|
360
|
+
};
|
|
361
|
+
}
|
|
350
362
|
try {
|
|
351
363
|
const response = await fetch(`${API_URL}/search-ai`, {
|
|
352
364
|
method: "POST",
|