tg2ai-mcp 0.1.0 → 0.1.1

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 -1
  2. package/src/index.js +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg2ai-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TG2AI Commercial Remote MCP Bridge Client",
5
5
  "private": false,
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -117,8 +117,18 @@ rl.on("line", (line) => {
117
117
  "Content-Length": Buffer.byteLength(line)
118
118
  }
119
119
  }, (res) => {
120
- // Consume response stream
121
- res.on("data", () => {});
120
+ // Buffer and process response body to handle synchronous tool listings and direct results
121
+ let body = "";
122
+ res.setEncoding("utf-8");
123
+ res.on("data", (chunk) => {
124
+ body += chunk;
125
+ });
126
+ res.on("end", () => {
127
+ const trimmed = body.trim();
128
+ if (trimmed && trimmed.includes("jsonrpc")) {
129
+ process.stdout.write(trimmed + "\n");
130
+ }
131
+ });
122
132
  });
123
133
 
124
134
  postReq.on("error", (err) => {