taskr-mcp-client 1.0.1 → 1.0.3
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/debug.log +50 -0
- package/index.js +42 -22
- package/package.json +1 -1
package/debug.log
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[2025-11-04T08:18:04.216Z] MCP HTTP Client started
|
|
2
|
+
[2025-11-04T08:18:04.219Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
3
|
+
[2025-11-04T08:18:04.219Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
4
|
+
[2025-11-04T08:18:04.220Z] MCP_PROJECT_ID: SET
|
|
5
|
+
[2025-11-04T08:18:04.220Z] MCP_USER_API_KEY: SET
|
|
6
|
+
[2025-11-04T08:18:04.225Z] Received request: initialize
|
|
7
|
+
[2025-11-04T08:18:04.440Z] MCP HTTP Client started
|
|
8
|
+
[2025-11-04T08:18:04.442Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
9
|
+
[2025-11-04T08:18:04.443Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
10
|
+
[2025-11-04T08:18:04.450Z] MCP_PROJECT_ID: SET
|
|
11
|
+
[2025-11-04T08:18:04.451Z] MCP_USER_API_KEY: SET
|
|
12
|
+
[2025-11-04T08:18:04.458Z] Received request: initialize
|
|
13
|
+
[2025-11-04T08:18:07.719Z] MCP HTTP Client started
|
|
14
|
+
[2025-11-04T08:18:07.721Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
15
|
+
[2025-11-04T08:18:07.722Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
16
|
+
[2025-11-04T08:18:07.722Z] MCP_PROJECT_ID: SET
|
|
17
|
+
[2025-11-04T08:18:07.723Z] MCP_USER_API_KEY: SET
|
|
18
|
+
[2025-11-04T08:18:07.733Z] Received request: initialize
|
|
19
|
+
[2025-11-04T08:19:07.691Z] Received request: notifications/cancelled
|
|
20
|
+
[2025-11-04T08:24:15.554Z] MCP HTTP Client started
|
|
21
|
+
[2025-11-04T08:24:15.556Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
22
|
+
[2025-11-04T08:24:15.557Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
23
|
+
[2025-11-04T08:24:15.559Z] MCP_PROJECT_ID: SET
|
|
24
|
+
[2025-11-04T08:24:15.560Z] MCP_USER_API_KEY: SET
|
|
25
|
+
[2025-11-04T08:24:15.565Z] Received request: initialize
|
|
26
|
+
[2025-11-04T08:24:15.734Z] MCP HTTP Client started
|
|
27
|
+
[2025-11-04T08:24:15.735Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
28
|
+
[2025-11-04T08:24:15.737Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
29
|
+
[2025-11-04T08:24:15.739Z] MCP_PROJECT_ID: SET
|
|
30
|
+
[2025-11-04T08:24:15.739Z] MCP_USER_API_KEY: SET
|
|
31
|
+
[2025-11-04T08:24:15.749Z] Received request: initialize
|
|
32
|
+
[2025-11-04T08:24:19.040Z] Response status: 429
|
|
33
|
+
[2025-11-04T08:24:19.042Z] Response received, length: 117
|
|
34
|
+
[2025-11-04T08:24:19.043Z] Writing response to stdout
|
|
35
|
+
[2025-11-04T08:24:19.043Z] Response written successfully
|
|
36
|
+
[2025-11-04T08:24:20.574Z] MCP HTTP Client started
|
|
37
|
+
[2025-11-04T08:24:20.575Z] NODE_TLS_REJECT_UNAUTHORIZED: 0
|
|
38
|
+
[2025-11-04T08:24:20.576Z] MCP_API_URL: https://taskr-six.vercel.app/api/mcp
|
|
39
|
+
[2025-11-04T08:24:20.577Z] MCP_PROJECT_ID: SET
|
|
40
|
+
[2025-11-04T08:24:20.577Z] MCP_USER_API_KEY: SET
|
|
41
|
+
[2025-11-04T08:24:20.582Z] Received request: initialize
|
|
42
|
+
[2025-11-04T08:24:21.468Z] Response status: 429
|
|
43
|
+
[2025-11-04T08:24:21.469Z] Response received, length: 117
|
|
44
|
+
[2025-11-04T08:24:21.469Z] Writing response to stdout
|
|
45
|
+
[2025-11-04T08:24:21.470Z] Response written successfully
|
|
46
|
+
[2025-11-04T08:24:23.700Z] Response status: 429
|
|
47
|
+
[2025-11-04T08:24:23.701Z] Response received, length: 117
|
|
48
|
+
[2025-11-04T08:24:23.701Z] Writing response to stdout
|
|
49
|
+
[2025-11-04T08:24:23.702Z] Response written successfully
|
|
50
|
+
[2025-11-04T08:25:20.553Z] Received request: notifications/cancelled
|
package/index.js
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* MCP HTTP Client - stdio to HTTP bridge for MCP servers
|
|
5
|
-
* Bridges stdio-based MCP clients (like Claude Code) to HTTP-only JSON-RPC MCP
|
|
5
|
+
* Bridges stdio-based MCP clients (like Claude Code) to HTTP-only JSON-RPC MCP endpoints
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
// Disable TLS certificate validation to handle Windows certificate revocation check issues
|
|
9
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
|
10
|
+
|
|
8
11
|
const readline = require('readline');
|
|
9
12
|
const https = require('https');
|
|
10
13
|
const http = require('http');
|
|
@@ -41,6 +44,10 @@ rl.on('line', async (line) => {
|
|
|
41
44
|
// Parse JSON-RPC request from stdin
|
|
42
45
|
const jsonrpcRequest = JSON.parse(line);
|
|
43
46
|
|
|
47
|
+
// Check if this is a notification (no id field)
|
|
48
|
+
// Per JSON-RPC 2.0: notifications don't expect responses
|
|
49
|
+
const isNotification = jsonrpcRequest.id === undefined || jsonrpcRequest.id === null;
|
|
50
|
+
|
|
44
51
|
// Forward to HTTP endpoint
|
|
45
52
|
const requestBody = JSON.stringify(jsonrpcRequest);
|
|
46
53
|
const options = {
|
|
@@ -68,37 +75,50 @@ rl.on('line', async (line) => {
|
|
|
68
75
|
|
|
69
76
|
res.on('end', () => {
|
|
70
77
|
try {
|
|
71
|
-
//
|
|
78
|
+
// For notifications, don't forward response to stdout
|
|
79
|
+
// Per JSON-RPC 2.0: notifications MUST NOT receive responses
|
|
80
|
+
if (isNotification) {
|
|
81
|
+
// Silently consume the HTTP response (just acknowledge receipt)
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// For requests with id, write JSON-RPC response to stdout (one line, newline terminated)
|
|
72
86
|
const output = data.trim() + '\n';
|
|
73
87
|
process.stdout.write(output, () => {
|
|
74
88
|
// Flush completed
|
|
75
89
|
});
|
|
76
90
|
} catch (error) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
// Only send error responses for requests, not notifications
|
|
92
|
+
if (!isNotification) {
|
|
93
|
+
const errorResponse = {
|
|
94
|
+
jsonrpc: '2.0',
|
|
95
|
+
id: jsonrpcRequest.id,
|
|
96
|
+
error: {
|
|
97
|
+
code: -32603,
|
|
98
|
+
message: 'Internal error: Failed to parse server response'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
process.stdout.write(JSON.stringify(errorResponse) + '\n', () => {
|
|
102
|
+
// Flush completed
|
|
103
|
+
});
|
|
104
|
+
}
|
|
88
105
|
}
|
|
89
106
|
});
|
|
90
107
|
});
|
|
91
108
|
|
|
92
109
|
req.on('error', (error) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
// Only send error responses for requests, not notifications
|
|
111
|
+
if (!isNotification) {
|
|
112
|
+
const errorResponse = {
|
|
113
|
+
jsonrpc: '2.0',
|
|
114
|
+
id: jsonrpcRequest.id,
|
|
115
|
+
error: {
|
|
116
|
+
code: -32603,
|
|
117
|
+
message: `HTTP request failed: ${error.message}`
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
process.stdout.write(JSON.stringify(errorResponse) + '\n');
|
|
121
|
+
}
|
|
102
122
|
});
|
|
103
123
|
|
|
104
124
|
req.write(requestBody);
|