@dyno181cm.nexsoft/zentao_mcp 1.2.6 → 1.2.7
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/index.js +4 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3,12 +3,15 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { registerTools } from "./tools.js";
|
|
5
5
|
import * as dotenv from "dotenv";
|
|
6
|
+
import { readFileSync } from "fs";
|
|
6
7
|
// Initialize environment variables from .env file
|
|
7
8
|
dotenv.config();
|
|
9
|
+
// Read package.json to get the version dynamically
|
|
10
|
+
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
8
11
|
// Create the MCP server instance
|
|
9
12
|
const server = new McpServer({
|
|
10
13
|
name: "Zentao MCP Server",
|
|
11
|
-
version:
|
|
14
|
+
version: pkg.version
|
|
12
15
|
});
|
|
13
16
|
// Register all Zentao-specific tools onto the server
|
|
14
17
|
registerTools(server);
|