Skip to content

fix: read server description from package.json instead of manifest.json - #55

Merged
mpicciolli merged 1 commit into
mainfrom
fix/manifest-not-in-npm-package
Aug 27, 2026
Merged

fix: read server description from package.json instead of manifest.json#55
mpicciolli merged 1 commit into
mainfrom
fix/manifest-not-in-npm-package

Conversation

@mpicciolli

@mpicciolli mpicciolli commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Problem

npx pcm-mcp@0.4.0 crashes immediately at startup, before any MCP exchange:

Error: ENOENT: no such file or directory, open '.../pcm-mcp/manifest.json'

No pcm_* tool is ever registered, so the server is unusable when installed from npm.

Cause

src/index.ts read ../manifest.json at startup to get the server description, but package.json declares "files": ["dist"]. manifest.json lives at the repo root (for the .mcpb bundle) and is therefore never included in the published npm tarball, which only contains:

package/LICENSE
package/dist/index.js
package/package.json
package/README.md

The .mcpb bundle was unaffected because it ships the repo root, which is why the regression went unnoticed. This is a 0.4.0 regression — 0.3.0 does not read manifest.json at all and starts fine.

Fix

Read both version and description from package.json, which is always present in the npm tarball and in the .mcpb bundle, and already carries the exact same description string. The description exposed over MCP is unchanged.

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 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 00:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a startup crash in the published npm package by removing the runtime dependency on manifest.json (which is not included in the npm tarball) and instead reading the server metadata from package.json, which is always shipped.

Changes:

  • Read both version and description from ../package.json at startup.
  • Remove the startup-time read of ../manifest.json to prevent ENOENT when installed via npm.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mpicciolli
mpicciolli merged commit 7d92dd0 into main Aug 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants