@mrxkun/mcfast-mcp 4.1.5 → 4.1.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/package.json +2 -2
- package/src/index.js +15 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxkun/mcfast-mcp",
|
|
3
|
-
"version": "4.1.
|
|
4
|
-
"description": "Ultra-fast code editing with WASM acceleration, fuzzy patching, multi-layer caching, and 8 unified tools. v4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
|
+
"description": "Ultra-fast code editing with WASM acceleration, fuzzy patching, multi-layer caching, and 8 unified tools. v4.1.7: Critical MCP fix - Suppress console output to prevent JSON-RPC stream corruption.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mcfast-mcp": "src/index.js"
|
package/src/index.js
CHANGED
|
@@ -5,6 +5,21 @@
|
|
|
5
5
|
* Proxies code edit requests to mcfast Cloud (Vercel)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
// CRITICAL: Suppress ALL console output in MCP mode to prevent JSON parsing errors
|
|
9
|
+
// MCP protocol requires stdout to contain ONLY JSON-RPC messages
|
|
10
|
+
|
|
11
|
+
// Also override console.log - suppress in MCP mode
|
|
12
|
+
const originalConsoleLog = console.log;
|
|
13
|
+
console.log = function(...args) {
|
|
14
|
+
// Suppress in MCP mode - can enable file logging if needed
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// Override console.error - suppress in MCP mode
|
|
18
|
+
const originalConsoleError = console.error;
|
|
19
|
+
console.error = function(...args) {
|
|
20
|
+
// Suppress in MCP mode - can enable file logging if needed
|
|
21
|
+
};
|
|
22
|
+
|
|
8
23
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
9
24
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
25
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|