@mrxkun/mcfast-mcp 4.1.6 → 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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +9 -8
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mrxkun/mcfast-mcp",
3
- "version": "4.1.6",
4
- "description": "Ultra-fast code editing with WASM acceleration, fuzzy patching, multi-layer caching, and 8 unified tools. v4.1.6: Critical MCP fix - Redirect stdout to stderr to prevent JSON-RPC stream corruption.",
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,18 +5,19 @@
5
5
  * Proxies code edit requests to mcfast Cloud (Vercel)
6
6
  */
7
7
 
8
- // CRITICAL: Redirect all stdout writes to stderr to prevent JSON parsing errors in MCP
8
+ // CRITICAL: Suppress ALL console output in MCP mode to prevent JSON parsing errors
9
9
  // MCP protocol requires stdout to contain ONLY JSON-RPC messages
10
- const originalStdoutWrite = process.stdout.write.bind(process.stdout);
11
- process.stdout.write = function(chunk, encoding, callback) {
12
- // Redirect all stdout writes to stderr
13
- return process.stderr.write(chunk, encoding, callback);
14
- };
15
10
 
16
- // Also override console.log to use stderr
11
+ // Also override console.log - suppress in MCP mode
17
12
  const originalConsoleLog = console.log;
18
13
  console.log = function(...args) {
19
- console.error(...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
20
21
  };
21
22
 
22
23
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";