@llmpedia/mcp 0.2.0 → 0.2.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/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, join } from "node:path";
2
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
7
  import { z } from "zod";
@@ -103,7 +106,11 @@ const pageObject = z
103
106
  translationGroupId: z.string().optional(),
104
107
  })
105
108
  .passthrough();
106
- const server = new McpServer({ name: "llmpedia", version: "0.1.0" });
109
+ // Read the version straight from package.json (one level up from this compiled
110
+ // file in dist/) instead of hardcoding it here, so the two can never drift again.
111
+ const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
112
+ const { version: packageVersion } = JSON.parse(readFileSync(packageJsonPath, "utf8"));
113
+ const server = new McpServer({ name: "llmpedia", version: packageVersion });
107
114
  server.registerTool("whoami", {
108
115
  title: "Who am I",
109
116
  description: "Return the authenticated account, plan, topic quota, and write budget.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmpedia/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MCP server for creating and maintaining LLMpedia wiki pages with your own AI agent.",
5
5
  "license": "MIT",
6
6
  "type": "module",