This commit is contained in:
MCP Packages
2026-02-05 10:58:27 +01:00
parent 0d36462241
commit 1bdbbd9d32
4 changed files with 5266 additions and 30 deletions

View File

@@ -2,8 +2,9 @@
## PDF Reader MCP Connection Issue
**Status:** Open
**Reported:** 2026-02-04
**Status:** Resolved
**Reported:** 2026-02-04
**Resolved:** 2026-02-05
**Issue:** The pdf-reader-mcp is in the path, I have enabled it, but it still says connection closed.
@@ -12,6 +13,19 @@
- MCP server has been enabled in configuration
- Connection still fails with "connection closed" error
**Root Cause:**
The package used an `npx` wrapper that fetched `@sylphx/pdf-reader-mcp` from the npm registry at
runtime. On first invocation `npx` needs to download and cache the package before the server process
starts, causing the MCP client to time out and close the connection before the server was ready to
respond to the initial handshake. The pinned version (2.2.0) was also outdated.
**Fix:**
Rewrote `packages/pdf-reader-mcp/package.nix` to use `buildNpmPackage`, following the same pattern
used by `claude-code` in nixpkgs. The npm tarball (v2.3.0) is fetched at build time via `fetchzip`,
a `package-lock.json` is provided for reproducible dependency resolution, and `dontNpmBuild = true`
skips the build step because `dist/` is already included in the published tarball. The resulting
binary starts instantly with no network dependency at runtime.
---
## [Back to top](#issues)