hvip-mcp-server 0.2.47 → 0.2.48
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/dist/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36127,6 +36127,7 @@ function registerAllTools(server, auth, readOnly) {
|
|
|
36127
36127
|
}
|
|
36128
36128
|
async function startHttp(server, version2, auth, readOnly, skipped) {
|
|
36129
36129
|
const port = parseInt(process.env.PORT || "3000", 10);
|
|
36130
|
+
const host = process.env.HOST || "127.0.0.1";
|
|
36130
36131
|
const transport = new StreamableHTTPServerTransport({
|
|
36131
36132
|
sessionIdGenerator: void 0
|
|
36132
36133
|
// stateless
|
|
@@ -36173,12 +36174,12 @@ async function startHttp(server, version2, auth, readOnly, skipped) {
|
|
|
36173
36174
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
36174
36175
|
res.end(JSON.stringify({ error: "Not Found" }));
|
|
36175
36176
|
});
|
|
36176
|
-
httpServer.listen(port,
|
|
36177
|
+
httpServer.listen(port, host, () => {
|
|
36177
36178
|
process.stderr.write([
|
|
36178
36179
|
`\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`,
|
|
36179
36180
|
`\u2551 hvip-mcp v${version2} HTTP \u6A21\u5F0F \u2551`,
|
|
36180
|
-
`\u2551 POST http
|
|
36181
|
-
`\u2551 GET http
|
|
36181
|
+
`\u2551 POST http://${host}:${port}/mcp \u2551`,
|
|
36182
|
+
`\u2551 GET http://${host}:${port}/health \u2551`,
|
|
36182
36183
|
`\u2551 \u6A21\u5F0F: ${readOnly ? "\u53EA\u8BFB" : "\u5B8C\u6574"} | \u5DE5\u5177: ${readOnly ? "READ only" : "\u5168\u90E8"} \u2551`,
|
|
36183
36184
|
`\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D`
|
|
36184
36185
|
].join("\n") + "\n");
|
|
@@ -36208,12 +36209,13 @@ async function startStdio(server, version2, auth, readOnly, skipped, skipLog) {
|
|
|
36208
36209
|
process.stderr.write(`[hvip] \u672A\u914D\u7F6E API Key | \u4EC5\u516C\u5F00\u5DE5\u5177\u53EF\u7528 (v${version2})
|
|
36209
36210
|
`);
|
|
36210
36211
|
}
|
|
36211
|
-
|
|
36212
|
+
const wsHost = process.env.WS_BIND_HOST || "127.0.0.1";
|
|
36213
|
+
startAgentHub(parseInt(process.env.WS_AGENT_PORT || "9321"), wsHost, version2);
|
|
36212
36214
|
const transport = new StdioServerTransport();
|
|
36213
36215
|
await server.connect(transport);
|
|
36214
36216
|
}
|
|
36215
36217
|
async function main() {
|
|
36216
|
-
const VERSION = "0.2.
|
|
36218
|
+
const VERSION = "0.2.48";
|
|
36217
36219
|
const auth = getAuth();
|
|
36218
36220
|
const mode = resolveTransportMode();
|
|
36219
36221
|
const exec = resolveExecutionMode();
|
package/package.json
CHANGED