pdf-reader-mcp

This commit is contained in:
MCP Packages
2026-02-04 22:26:10 +01:00
parent 8e0a9cae74
commit 04ea0f69ae
5 changed files with 109 additions and 6 deletions

View File

@@ -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 { };
}

View 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;
};
}