From dc5ae5bf3440dbd84b9aaf41c791e4331bd475db Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Wed, 26 Aug 2026 20:31:45 -0400 Subject: [PATCH] fix: read server description from package.json The server read ../manifest.json at startup, but package.json declares "files": ["dist"], so manifest.json is never included in the npm tarball. Running `npx pcm-mcp@0.4.0` crashed with ENOENT before the MCP handshake, so no pcm_* tool was ever registered. package.json is present in both the npm tarball and the .mcpb bundle and already carries the same description string, so read it from there. Co-Authored-By: Claude Opus 5 --- src/index.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index fcc3772..0611da4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,13 +4,9 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { registerTools } from "./tools/index"; -const { version } = JSON.parse( +const { version, description } = JSON.parse( readFileSync(join(__dirname, "../package.json"), "utf-8"), -) as { version: string }; - -const { description } = JSON.parse( - readFileSync(join(__dirname, "../manifest.json"), "utf-8"), -) as { description: string }; +) as { version: string; description: string }; const server = new McpServer({ name: "pcm-mcp",