pdf-reader-mcp
This commit is contained in:
49
README.org
49
README.org
@@ -8,11 +8,12 @@ This repository provides Nix derivations for MCP (Model Context Protocol) server
|
||||
|
||||
* Available Packages
|
||||
|
||||
| Package | Description | Language |
|
||||
|----------------------------+----------------------------------------------------------+----------|
|
||||
| academic-search-mcp-server | Search academic papers via Semantic Scholar and Crossref | Python |
|
||||
| manim-mcp-server | Execute Manim animation code and return videos | Python |
|
||||
| zotero-mcp | Connect Zotero research library with AI assistants | Python |
|
||||
| Package | Description | Language |
|
||||
|----------------------------+----------------------------------------------------------+------------|
|
||||
| academic-search-mcp-server | Search academic papers via Semantic Scholar and Crossref | Python |
|
||||
| manim-mcp-server | Execute Manim animation code and return videos | Python |
|
||||
| pdf-reader-mcp | Production-ready PDF processing with parallel processing | TypeScript |
|
||||
| zotero-mcp | Connect Zotero research library with AI assistants | Python |
|
||||
|
||||
* Usage
|
||||
|
||||
@@ -236,7 +237,7 @@ buildGoModule rec {
|
||||
}
|
||||
#+end_src
|
||||
|
||||
*** Node.js
|
||||
*** Node.js (with package-lock.json)
|
||||
|
||||
#+begin_src nix
|
||||
{ lib, buildNpmPackage, fetchFromGitHub }:
|
||||
@@ -265,6 +266,42 @@ buildNpmPackage rec {
|
||||
}
|
||||
#+end_src
|
||||
|
||||
*** Node.js (wrapper for npm packages without package-lock.json)
|
||||
|
||||
Use this approach when the upstream project uses bun.lock or yarn.lock instead of package-lock.json:
|
||||
|
||||
#+begin_src nix
|
||||
{ lib, stdenvNoCC, nodejs_22, makeWrapper }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "example-mcp-server";
|
||||
version = "1.0.0";
|
||||
|
||||
# No source needed - npx fetches the package
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${nodejs_22}/bin/npx $out/bin/${pname} \
|
||||
--add-flags "--yes" \
|
||||
--add-flags "@scope/package-name@${version}"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Description";
|
||||
homepage = "https://github.com/owner/repo";
|
||||
license = licenses.mit;
|
||||
mainProgram = pname;
|
||||
};
|
||||
}
|
||||
#+end_src
|
||||
|
||||
Note: This approach requires network access on first run as npx downloads the package.
|
||||
|
||||
** Calculating Hashes
|
||||
|
||||
When adding a new package, use =lib.fakeHash= initially:
|
||||
|
||||
17
issues.md
Normal file
17
issues.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Issues
|
||||
|
||||
## PDF Reader MCP Connection Issue
|
||||
|
||||
**Status:** Open
|
||||
**Reported:** 2026-02-04
|
||||
|
||||
**Issue:** The pdf-reader-mcp is in the path, I have enabled it, but it still says connection closed.
|
||||
|
||||
**Details:**
|
||||
- Package is installed and available in PATH
|
||||
- MCP server has been enabled in configuration
|
||||
- Connection still fails with "connection closed" error
|
||||
|
||||
---
|
||||
|
||||
## [Back to top](#issues)
|
||||
@@ -20,6 +20,11 @@
|
||||
"type": "local",
|
||||
"command": ["zotero-mcp"],
|
||||
"enabled": true
|
||||
},
|
||||
"pdf-reader": {
|
||||
"type": "local",
|
||||
"command": ["pdf-reader-mcp"],
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
# Add new packages here:
|
||||
academic-search-mcp-server = pkgs.callPackage ./academic-search-mcp-server/package.nix { };
|
||||
zotero-mcp = pkgs.callPackage ./zotero-mcp/package.nix { };
|
||||
pdf-reader-mcp = pkgs.callPackage ./pdf-reader-mcp/package.nix { };
|
||||
# example-mcp-server = pkgs.callPackage ./example-mcp-server/package.nix { };
|
||||
}
|
||||
|
||||
43
packages/pdf-reader-mcp/package.nix
Normal file
43
packages/pdf-reader-mcp/package.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
# NOTE: This package uses a wrapper approach because the upstream project
|
||||
# uses bun.lock instead of package-lock.json, which buildNpmPackage requires.
|
||||
# The wrapper invokes npx to run the package with its dependencies.
|
||||
# For a fully offline/reproducible build, upstream would need to provide
|
||||
# a package-lock.json file.
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
nodejs_22,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "pdf-reader-mcp";
|
||||
version = "2.2.0";
|
||||
|
||||
# No source needed - we use npx to fetch and run the package
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
# Create wrapper that uses npx to run the package
|
||||
# npx will cache the package after first run
|
||||
makeWrapper ${nodejs_22}/bin/npx $out/bin/${pname} \
|
||||
--add-flags "--yes" \
|
||||
--add-flags "@sylphx/pdf-reader-mcp@${version}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Production-ready MCP server for PDF processing with parallel processing";
|
||||
homepage = "https://github.com/SylphxAI/pdf-reader-mcp";
|
||||
license = licenses.mit;
|
||||
mainProgram = "pdf-reader-mcp";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user