@hatchbox/hatchbox-mcp 0.8.0 → 0.8.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.
- package/build/server.js +5 -1
- package/package.json +1 -1
package/build/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
1
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
3
|
import { registerAccountsTools } from "./tools/accounts.js";
|
|
3
4
|
import { registerMeTools } from "./tools/me.js";
|
|
@@ -12,10 +13,13 @@ import { registerServersTools } from "./tools/servers.js";
|
|
|
12
13
|
import { registerBackupsTools } from "./tools/backups.js";
|
|
13
14
|
import { registerLogsTools } from "./tools/logs.js";
|
|
14
15
|
import { registerFirewallRulesTools } from "./tools/firewallRules.js";
|
|
16
|
+
// Read from package.json rather than repeating the number here. npm always ships package.json
|
|
17
|
+
// regardless of the `files` allowlist, so this resolves in the published package too.
|
|
18
|
+
const { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
15
19
|
export function createServer(client) {
|
|
16
20
|
const server = new McpServer({
|
|
17
21
|
name: "hatchbox-mcp",
|
|
18
|
-
version
|
|
22
|
+
version,
|
|
19
23
|
});
|
|
20
24
|
registerAccountsTools(server, client);
|
|
21
25
|
registerMeTools(server, client);
|