@bgx4k3p/huly-mcp-server 2.2.2 → 2.2.4

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 +1 -7
  2. package/src/mcp.mjs +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgx4k3p/huly-mcp-server",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "MCP server for Huly issue tracking with stdio and Streamable HTTP transports",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,12 +44,6 @@
44
44
  "version:sync": "node -e \"const{readFileSync:r,writeFileSync:w}=require('fs');const v=r('VERSION','utf-8').trim();const f='package.json';const j=JSON.parse(r(f,'utf-8'));j.version=v;w(f,JSON.stringify(j,null,2)+'\\n');console.log('Synced version '+v+' to package.json')\""
45
45
  },
46
46
  "dependencies": {
47
- "@hcengineering/api-client": "^0.7.3",
48
- "@hcengineering/chunter": "^0.7.0",
49
- "@hcengineering/core": "^0.7.4",
50
- "@hcengineering/tags": "^0.7.0",
51
- "@hcengineering/task": "^0.7.0",
52
- "@hcengineering/tracker": "^0.7.0",
53
47
  "@modelcontextprotocol/sdk": "^1.27.1",
54
48
  "jsdom": "^29.0.0"
55
49
  },
package/src/mcp.mjs CHANGED
@@ -3,7 +3,17 @@
3
3
  * Huly MCP Server - stdio transport entry point for Claude Code.
4
4
  *
5
5
  * Uses the shared MCP server factory from mcpShared.mjs.
6
+ *
7
+ * IMPORTANT: MCP stdio transport requires stdout to carry only JSON-RPC
8
+ * messages. The Huly SDK writes diagnostic lines ("Generate new SessionId",
9
+ * "init DB complete", "Connected to server", "findfull model ...") via
10
+ * console.log, which corrupts framing and causes the client to drop the
11
+ * connection. Route console.log to stderr so the SDK's noise stays out of
12
+ * stdout. Actual JSON-RPC responses are written via process.stdout by the
13
+ * StdioServerTransport and are unaffected.
6
14
  */
15
+ console.log = (...args) => console.error(...args);
16
+ console.info = (...args) => console.error(...args);
7
17
 
8
18
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
9
19
  import { createMcpServer, PKG_VERSION } from './mcpShared.mjs';