{"_id":"@fabriqa.ai/pdf-reader-mcp","_rev":"6-cee4d9fc0a10a1c7ad2a6c155a569568","name":"@fabriqa.ai/pdf-reader-mcp","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.0":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.0","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"url":"https://cengizhan.com","name":"Cengiz Han"},"license":"MIT","_id":"@fabriqa.ai/pdf-reader-mcp@1.0.0","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"bin":{"pdf-reader-mcp":"index.js"},"dist":{"shasum":"85dce56ef718cb964203b77849ebfe034769333e","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.0.tgz","fileCount":4,"integrity":"sha512-yc0+gY+Ib9tdjLNCRLjSalHWx9iZVsrGCedYBKZonJiGZ0uMfaUppPakj/LOelnLnp6xr7hfFgbelweqHII+ug==","signatures":[{"sig":"MEQCIHQIwxbolauBlrihRRk5lYcHdTOC5eCdwLQlLrn2+UNQAiBX8MlZOlBgCuoR2cMWnk7iFqjQold6noHIl5qHVUptgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18075},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"cb7937c9f492abedbc726dd1547f6949ba869a60","scripts":{"test":"node test-server.js","start":"node index.js"},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"repository":{"url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git","type":"git"},"_npmVersion":"11.6.0","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","directories":{},"_nodeVersion":"24.7.0","dependencies":{"pdf-parse":"^1.1.1","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pdf-reader-mcp_1.0.0_1761653600838_0.6793480210842597","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.1","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"url":"https://cengizhan.com","name":"Cengiz Han"},"license":"MIT","_id":"@fabriqa.ai/pdf-reader-mcp@1.0.1","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"bin":{"pdf-reader-mcp":"index.js"},"dist":{"shasum":"dc5cd228cb51604d26db3659a2469c979d2dec8d","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.1.tgz","fileCount":4,"integrity":"sha512-Rx9UeYr1gp+zs1usIYMjDIVVGuSdeVoDWIwjQxYJw6obh+vuxaS2T0Wveml3aR/gTxkaDIukLiwYIlnv6r6CSg==","signatures":[{"sig":"MEQCIFNQCVNsF+9OKgCWzn8bzX5+dudDDcti9G0pYqyV07OLAiAmbrc8ReM4276qss/xIB/zkJEaaR8bLPR041PfOzuMXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18195},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"cb7937c9f492abedbc726dd1547f6949ba869a60","scripts":{"test":"node test-server.js","start":"node index.js"},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"repository":{"url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git","type":"git"},"_npmVersion":"11.6.0","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","directories":{},"_nodeVersion":"24.7.0","dependencies":{"pdf-parse":"^1.1.1","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pdf-reader-mcp_1.0.1_1761653700143_0.5812010440468245","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.2","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"url":"https://cengizhan.com","name":"Cengiz Han"},"license":"MIT","_id":"@fabriqa.ai/pdf-reader-mcp@1.0.2","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"bin":{"pdf-reader-mcp":"index.js"},"dist":{"shasum":"b4697c39780dfa354337c6f6f8f53502b22777ad","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.2.tgz","fileCount":4,"integrity":"sha512-BKs7cNkrLsjikzFg+7e5J5dP73gMe3R0e2ovEtTDlxvho1Gqn4LJO/bp1MWASNGPsgM8MPCLDGx9KibFkRRyaQ==","signatures":[{"sig":"MEYCIQD0HdmXPaSKR2rSDfBoUSftsCQ3DEHoEABnwjE/ayeFhwIhAJQ/8phN3fcfHb+P24KFhdNaHXye+xmiqzU6mpaAdzmu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18429},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"98f7e2929de382cea392051a2f167d8124f26f34","scripts":{"test":"node test-server.js","start":"node index.js"},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"repository":{"url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git","type":"git"},"_npmVersion":"11.6.0","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","directories":{},"_nodeVersion":"24.7.0","dependencies":{"pdf-parse":"^1.1.1","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-reader-mcp_1.0.2_1761654981832_0.6189504213934769","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.4","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"url":"https://cengizhan.com","name":"Cengiz Han"},"license":"MIT","_id":"@fabriqa.ai/pdf-reader-mcp@1.0.4","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"bin":{"pdf-reader-mcp":"index.js"},"dist":{"shasum":"2f1fdf55ae56c40930d14239733207a0f85500b8","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.4.tgz","fileCount":4,"integrity":"sha512-CBT09ifyHhvdtxOvwtr7W3qimXtZFtClXOHcdT0p+JfR651QdB65WGEoda+lOjRPduSg9/xtoE1WcCf3PmZHEQ==","signatures":[{"sig":"MEYCIQDWm7QAel3MjkLXS1ctXUzR3YnSv9S4y5plsOkmMDnDNAIhANFKIVNW0/sawOaJru/BxQAZUPlpqaROeQhdsCamP/HI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18237},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"0172f4c666e75cd75209d20dde122e695c6f8321","scripts":{"test":"node test-server.js","start":"node index.js"},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"repository":{"url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git","type":"git"},"_npmVersion":"11.6.0","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","directories":{},"_nodeVersion":"24.7.0","dependencies":{"pdf-parse":"^1.1.1","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-reader-mcp_1.0.4_1761656113248_0.937208137612985","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.5","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"url":"https://cengizhan.com","name":"Cengiz Han"},"license":"MIT","_id":"@fabriqa.ai/pdf-reader-mcp@1.0.5","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"bin":{"pdf-reader-mcp":"index.js"},"dist":{"shasum":"6c758348e3b90191119addd6d559e46c06490ce1","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.5.tgz","fileCount":4,"integrity":"sha512-zFRpZM0IFvAS24l4OR79c5SEyIkaDG0MFToWXaKG+iAJ+wG5SAD1DUslBoy8qAbJmYfao0UgGCnlBDzQdXDI5A==","signatures":[{"sig":"MEUCIQCHtyaRHLqVeQjPFVM5FP1pXu2HZ3KeANjqHP1v0w5OHwIgCSl2kcse8/etGaAnjok8fJXp0Nnrs09G4JrlqC7EOHY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18444},"main":"index.js","type":"module","engines":{"node":">=16.0.0"},"gitHead":"99d08b8fbd5c33962794b4ab90cd4c3aecb5fe2e","scripts":{"test":"node test-server.js","start":"node index.js"},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"repository":{"url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git","type":"git"},"_npmVersion":"11.6.0","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","directories":{},"_nodeVersion":"24.7.0","dependencies":{"pdf-parse":"^1.1.1","@modelcontextprotocol/sdk":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-reader-mcp_1.0.5_1761656741081_0.13196753765669222","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@fabriqa.ai/pdf-reader-mcp","version":"1.0.7","description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","type":"module","main":"index.js","bin":{"pdf-reader-mcp":"index.js"},"scripts":{"start":"node index.js","test":"node test-server.js"},"keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"author":{"name":"Cengiz Han","url":"https://cengizhan.com"},"repository":{"type":"git","url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git"},"bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","license":"MIT","engines":{"node":">=16.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","pdf-parse":"^1.1.1"},"devDependencies":{"ajv":"^8.17.1","ajv-formats":"^3.0.1"},"_id":"@fabriqa.ai/pdf-reader-mcp@1.0.7","gitHead":"bf9e2e167e0dba35c372961d92724a313cf563c5","_nodeVersion":"24.7.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-5I/aHi53dPUdduyrgB70sOF1eCMSybdAyuc+Zf+dm0dzYAht1/Hj/esLPpZS8Ut3mNBDagCHmmcb2abISaL1RA==","shasum":"326622be51a63ecda2e7daf20364dfe4ab2a2187","tarball":"https://registry.npmjs.org/@fabriqa.ai/pdf-reader-mcp/-/pdf-reader-mcp-1.0.7.tgz","fileCount":4,"unpackedSize":18770,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDdvh8cRiLGIuIgqnwV3ACQgc5NZmGNGvxtclu9DSVz8QIgXUow0Wk6tYB35Z+xzP7rhFkO1drUAuiYz5mQByPzsJ8="}]},"_npmUser":{"name":"hancengiz","email":"cengiz@cengizhan.com"},"directories":{},"maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdf-reader-mcp_1.0.7_1761657662419_0.6855704378070417"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-28T12:13:20.779Z","modified":"2025-10-28T13:21:03.825Z","1.0.0":"2025-10-28T12:13:21.042Z","1.0.1":"2025-10-28T12:15:00.363Z","1.0.2":"2025-10-28T12:36:22.019Z","1.0.4":"2025-10-28T12:55:13.427Z","1.0.5":"2025-10-28T13:05:41.296Z","1.0.7":"2025-10-28T13:21:02.615Z"},"bugs":{"url":"https://github.com/hancengiz/read_pdf_as_text_mcp/issues"},"author":{"name":"Cengiz Han","url":"https://cengizhan.com"},"license":"MIT","homepage":"https://github.com/hancengiz/read_pdf_as_text_mcp#readme","keywords":["mcp","mcp-server","pdf","pdf-reader","text-extraction","pdf-parse","claude","claude-code","ai","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/hancengiz/read_pdf_as_text_mcp.git"},"description":"MCP server for efficient PDF text extraction, search, and metadata retrieval for Claude Code","maintainers":[{"name":"hancengiz","email":"cengiz@cengizhan.com"}],"readme":"# PDF Reader MCP Server\n\n[![npm version](https://badge.fury.io/js/@fabriqa.ai%2Fpdf-reader-mcp.svg)](https://www.npmjs.com/package/@fabriqa.ai/pdf-reader-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@fabriqa.ai/pdf-reader-mcp.svg)](https://www.npmjs.com/package/@fabriqa.ai/pdf-reader-mcp)\n\nA Model Context Protocol (MCP) server that provides efficient PDF text extraction capabilities for Claude Code. This server allows you to read, search, and extract metadata from PDF files without loading the entire content into Claude's context window.\n\n**npm package**: [@fabriqa.ai/pdf-reader-mcp](https://www.npmjs.com/package/@fabriqa.ai/pdf-reader-mcp)\n**Author**: [Cengiz Han](https://cengizhan.com)\n**Blog Post**: [How I Built This Tool to Save My Context](https://www.cengizhan.com/p/vibe-coded-a-pdf-reader-mcp-tool)\n\n## Features\n\n- **Read PDF Files**: Extract full text content from PDF files with optional text cleaning\n- **Search PDFs**: Search for specific text within PDFs with context-aware results\n- **Extract Metadata**: Get detailed metadata including title, author, page count, dates, etc.\n- **Efficient Context Usage**: Process large PDFs without consuming excessive Claude Code context\n- **Flexible Options**: Support for page ranges, case-sensitive search, and more\n\n## Installation\n\n### Option A: Install from npm (Recommended)\n\n```bash\nnpm install -g @fabriqa.ai/pdf-reader-mcp\n```\n\nAfter installation, the server will be available globally. You can configure it by running:\n\n```bash\n# The package will be installed in your global node_modules\n# Typically: /usr/local/lib/node_modules/@fabriqa.ai/pdf-reader-mcp\n```\n\n### Option B: Install from source\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/hancengiz/read_pdf_as_text_mcp.git\ncd read_pdf_as_text_mcp\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n## Configuration\n\n### If installed via npm (Recommended):\n\n#### Option 1: Using Claude Code CLI (Easiest)\n```bash\n# Add the MCP server\nclaude mcp add pdf-reader npx @fabriqa.ai/pdf-reader-mcp\n\n# Or use the convenience script\nnpx @fabriqa.ai/pdf-reader-mcp/update-config.js\n```\n\n#### Option 2: Manual Configuration\nAdd to your `~/.claude.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"pdf-reader\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"@fabriqa.ai/pdf-reader-mcp\"\n      ]\n    }\n  }\n}\n```\n\nThis uses `npx` to automatically run the globally installed package without needing to specify paths.\n\n### Quick Setup Script (Optional):\n\nAfter installing via npm, you can use the included configuration script to automatically update your `~/.claude.json`:\n\n```bash\nnpx @fabriqa.ai/pdf-reader-mcp/update-config.js\n```\n\nOr if installed from source:\n```bash\nnode update-config.js\n```\n\nThis will automatically add the MCP server using `npx`, making it available machine-wide across all your projects.\n\n### Manual Configuration:\n\nFor **Claude Desktop**, edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"pdf-reader\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"@fabriqa.ai/pdf-reader-mcp\"\n      ]\n    }\n  }\n}\n```\n\n## Usage\n\nOnce configured, restart Claude Code. The following tools will be available:\n\n### 1. read-pdf\n\nExtract text content from a PDF file.\n\n**Parameters:**\n- `file` (required): Path to the PDF file\n- `pages` (optional): Page range (e.g., '1-5', '1,3,5', 'all'). Default: 'all'\n- `clean_text` (optional): Clean and normalize extracted text. Default: false\n- `include_metadata` (optional): Include PDF metadata in output. Default: true\n\n**Example:**\n```\nCan you read the PDF at /path/to/document.pdf?\n```\n\n### 2. search-pdf\n\nSearch for specific text within a PDF file.\n\n**Parameters:**\n- `file` (required): Path to the PDF file\n- `query` (required): Text to search for\n- `case_sensitive` (optional): Case sensitive search. Default: false\n- `whole_word` (optional): Match whole words only. Default: false\n\n**Example:**\n```\nSearch for \"machine learning\" in /path/to/document.pdf\n```\n\n### 3. pdf-metadata\n\nExtract metadata from a PDF file.\n\n**Parameters:**\n- `file` (required): Path to the PDF file\n\n**Example:**\n```\nGet metadata from /path/to/document.pdf\n```\n\n## Example Workflow\n\nHere's how you might use this MCP server with Claude Code:\n\n1. **Extract metadata first** to understand the document:\n   ```\n   What's the metadata for ~/Documents/research-paper.pdf?\n   ```\n\n2. **Search for specific topics** without reading the entire file:\n   ```\n   Search for \"neural networks\" in ~/Documents/research-paper.pdf\n   ```\n\n3. **Read specific sections** when you know what you're looking for:\n   ```\n   Read pages 10-15 from ~/Documents/research-paper.pdf with cleaned text\n   ```\n\n## Benefits\n\n- **Context Efficiency**: Process large PDF files without loading everything into Claude's context\n- **Faster Analysis**: Search and extract only what you need\n- **Better Performance**: Reduce token usage when working with multiple or large PDFs\n- **Flexible Extraction**: Choose what information to extract and how to format it\n\n## Technical Details\n\n- Built with the [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk)\n- Uses [pdf-parse](https://www.npmjs.com/package/pdf-parse) for PDF text extraction\n- Runs as a local Node.js process communicating via stdio\n- Supports all PDF versions that pdf-parse can handle\n\n## Troubleshooting\n\n### Server not appearing in Claude Code\n\n1. Verify the path in your configuration file is correct\n2. Ensure Node.js is installed and in your PATH\n3. Check that dependencies are installed: `npm install`\n4. Restart Claude Code completely\n5. Check Claude Code logs for any error messages\n\n### PDF not found errors\n\n- Use absolute paths to PDF files\n- Verify file permissions\n- Ensure the PDF file exists at the specified location\n\n### Text extraction issues\n\n- Some PDFs (scanned images) may not contain extractable text\n- Try enabling `clean_text` option for better formatting\n- Complex layouts may affect text extraction quality\n\n## Development\n\nTo modify or extend the server:\n\n1. Edit `index.js` to add new tools or modify existing ones\n2. Update the `ListToolsRequestSchema` handler to register new tools\n3. Add corresponding handlers in the `CallToolRequestSchema` handler\n4. Restart the server (restart Claude Code) to test changes\n\n## License\n\nMIT\n\n## Author\n\nCreated by [Cengiz Han](https://cengizhan.com)\n\n## Contributing\n\nFeel free to submit issues or pull requests to improve this MCP server.\n","readmeFilename":"README.md"}