
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
mcp-pdf-server
Advanced tools
MCP server for secure PDF processing with text extraction, metadata, and page count features
A secure Model Context Protocol (MCP) server built with Node.js/TypeScript that allows AI agents to safely read PDF files and extract text, metadata, or page counts. Uses pdf-parse for reliable PDF processing.
pdf-parse library for consistent resultsGlobal Installation:
npm install -g mcp-pdf-server
Local Installation:
npm install mcp-pdf-server
Run without installing (using npx):
npx mcp-pdf-server --help
npx mcp-pdf-server --working-directory ./pdfs
NPM Package: https://www.npmjs.com/package/mcp-pdf-server
git clone https://github.com/paredezadrian/mcp-pdf-server.git
cd mcp-pdf-server
npm install
npm run build
npm link
Configure your MCP client to use the server:
If installed globally:
{
"mcpServers": {
"pdf-server": {
"command": "mcp-pdf-server",
"args": ["--working-directory", "/path/to/pdfs"],
"name": "PDF Processing Server"
}
}
}
Using npx (no installation required):
{
"mcpServers": {
"pdf-server": {
"command": "npx",
"args": ["mcp-pdf-server", "--working-directory", "/path/to/pdfs"],
"name": "PDF Processing Server"
}
}
}
mcp-pdf-server [OPTIONS]
OPTIONS:
--working-directory, --cwd <path> Set working directory for local files
--max-file-size <bytes> Maximum file size in bytes (default: 52428800)
--timeout <ms> Download timeout in milliseconds (default: 30000)
--help, -h Show help message
--version, -v Show version number
Extract text content from a PDF file.
Parameters:
source (string): PDF file path or URLstartPage (number, optional): Start page number (1-based)endPage (number, optional): End page number (1-based)maxFileSize (number, optional): Maximum file size in bytestimeout (number, optional): Timeout for URL downloads in millisecondsExample:
{
"tool": "extract-text",
"arguments": {
"source": "./documents/report.pdf",
"startPage": 1,
"endPage": 5
}
}
Extract metadata information from a PDF file.
Parameters:
source (string): PDF file path or URLmaxFileSize (number, optional): Maximum file size in bytestimeout (number, optional): Timeout for URL downloads in millisecondsExample:
{
"tool": "extract-metadata",
"arguments": {
"source": "https://example.com/document.pdf"
}
}
Get the total number of pages in a PDF file.
Parameters:
source (string): PDF file path or URLmaxFileSize (number, optional): Maximum file size in bytestimeout (number, optional): Timeout for URL downloads in millisecondsExtract text, metadata, and page count in one operation.
Parameters:
source (string): PDF file path or URLstartPage (number, optional): Start page number (1-based)endPage (number, optional): End page number (1-based)maxFileSize (number, optional): Maximum file size in bytestimeout (number, optional): Timeout for URL downloads in milliseconds.pdf files{
maxFileSize: 50 * 1024 * 1024, // 50MB
allowedExtensions: ['.pdf'],
allowedMimeTypes: ['application/pdf'],
downloadTimeout: 30000, // 30 seconds
allowedProtocols: ['http:', 'https:'],
blockedDomains: [
'localhost', '127.0.0.1', '0.0.0.0', '::1',
'10.', '172.16.', '192.168.'
],
maxUrlLength: 2048
}
MCP_PDF_WORKING_DIR: Default working directoryMCP_PDF_MAX_FILE_SIZE: Maximum file size in bytesMCP_PDF_TIMEOUT: Default timeout in millisecondsgit clone https://github.com/paredezadrian/mcp-pdf-server.git
cd mcp-pdf-server
npm install
npm run dev # Run in development mode
npm run build # Build TypeScript
npm run start # Run built version
npm run test # Run tests
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
MCP server for secure PDF processing with text extraction, metadata, and page count features
We found that mcp-pdf-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.