mcp-pdf-server
Verified Safeby johan-gorter
Overview
Provides a Model Context Protocol (MCP) server for extracting plain text content from PDF files, primarily for integration with AI assistants like Claude Desktop, with robust directory access controls.
Installation
npx -y @johangorter/mcp-pdf-server /Users/username/DesktopSecurity Notes
The project demonstrates a strong commitment to security with explicit handling of common attack vectors: - Path Traversal: Prevented by robust path normalization (`path.resolve`, `path.relative`). - Symlink Attacks: Mitigated by resolving real paths (`fs.realpath`) and verifying against allowed directories. - TOCTOU (Time-of-Check-Time-of-Use): Actively prevented by re-validating the file path immediately before file access (`extractPdfText` calls `validatePath` again). - Case Sensitivity Bypasses: Handled with platform-specific case-insensitive comparisons on Windows/macOS. - Hard Link Attacks: The `checkForHardLinkVulnerability` function detects files with multiple hard links (`nlink > 1`) and logs a warning. However, by default, it *does not block* access to such files. The `SECURITY.md` notes this as a 'Known Limitation' and suggests uncommenting a `throw new Error` line for stricter enforcement. This default choice slightly reduces the score from a perfect 10, as it leaves a potential, albeit transparently documented, vulnerability if not explicitly configured for strict mode. No 'eval' or intentional obfuscation was found, and sensitive information is not hardcoded. The server uses standard I/O, minimizing network attack surface.
Similar Servers
deepl-mcp-server
Provides DeepL translation and linguistic capabilities as a Model Context Protocol (MCP) server for integration with AI clients.
claude-faf-mcp
Optimizes AI understanding of software projects by providing persistent context, fixing context-drift, and enabling bi-directional synchronization between project metadata and AI documentation.
pdflens-mcp
This MCP server provides tools for reading and extracting information from PDF files, including text and images, designed for AI clients.
markitdown-mcp
A Model Context Protocol (MCP) server for converting 29+ file formats (e.g., PDF, Office, images, audio) to clean, structured Markdown, designed for integration with AI workflows and MCP clients like Claude Desktop.