PDF Reader MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PDF Reader MCP Server for VS Code
An MCP server that enables VS Code to view and analyze PDF documents using the Model Context Protocol (MCP).
This project was created using the Model Context Protocol Python SDK based on FastMCP.
Features
Open and read PDF documents
Extract text from PDFs (whole document or specific pages)
View PDF metadata
Generate summaries of PDF content
Extract text from specific pages or page ranges
Analyze PDF content and answer questions about it
Related MCP server: PDF Reader MCP Server
Installation
Ensure you have Python 3.13+ installed
Clone this repository
Create a virtual environment:
uv venv .venv
source .venv/bin/activateInstall dependencies:
uv pip install -e .Docker
You can also run this MCP server using Docker:
Build the Docker Image
docker build -t pdf-reader-mcp .Run the Container
docker run --name pdf-reader-mcp -it pdf-reader-mcpUse with VS Code or Claude Desktop
When using Docker, update your MCP configuration to use the Docker container:
VS Code Configuration (Docker)
{
"servers": {
"pdf-reader": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"pdf-reader-mcp"
]
}
}
}Claude Desktop Configuration (Docker)
{
"mcpServers": {
"pdf-reader-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"pdf-reader-mcp"
]
}
}
}Usage
This MCP server integrates with VS Code's MCP client to provide PDF reading capabilities. See the Tools and Prompts section below for details on available functionality.
Examples
MCP Tools in VS Code Copilot
This image shows the PDF Reader tools available in VS Code through the MCP protocol:

Example Usage
Here's an example of using the PDF Reader to analyze a document:

VS Code Configuration
The server is configured to run in VS Code through the .vscode/mcp.json file. VS Code must have the MCP extension installed to use this server.
To install the VS Code MCP extension:
Open VS Code
Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
Search for "Model Context Protocol"
Install the extension from Microsoft
Once the extension is installed, VS Code will be able to communicate with this MCP server according to the configuration in your .vscode/mcp.json file. You can use the MCP server through VS Code's Copilot or any other MCP client built into VS Code.
Development
To make changes to this project:
Modify the code in the
src/pdf_reader_mcpdirectoryInstall in development mode:
uv pip install -e .Test your changes in VS Code
Requirements
Python 3.13+
PyPDF2 3.0.0+
MCP SDK 1.9.0+ (from github.com/modelcontextprotocol/python-sdk)
VS Code with MCP extension
Tools and Prompts
Tools
The server implements the following tools:
open-pdf: Open a PDF file
Takes
pathas a required string argumentReturns a unique PDF ID for referencing in other operations
close-pdf: Close an open PDF file
Takes
pdf_idas a required string argument
list-pdf-metadata: View metadata of an open PDF
Takes
pdf_idas a required string argument
get-pdf-page-count: Get the total number of pages in a PDF
Takes
pdf_idas a required string argument
get-pdf-page-text: Get the text content of a specific page in a PDF
Takes
pdf_idas a required string argumentTakes
page_numberas a required integer argument (0-based index)
pdf-to-text: Extract all text from a PDF document
Takes
pdf_idas a required string argumentOptional
include_page_numbersas a boolean (default: true)Optional
start_pageandend_pageas integers to extract a specific range
Prompts
The server provides the following prompts:
summarize-pdf: Generate a summary of a PDF document
Required
pdf_idargument that identifies the PDFOptional
styleargument to control detail level (brief/detailed)
extract-text-from-pdf: Extract text from specific pages or page ranges
Required
pdf_idargumentOptional page or page range arguments (
page,start_page,end_page)
analyze-pdf: Analyze a PDF and answer questions about its content
Required
pdf_idargumentRequired
questionargument specifying what to analyzeOptional
page_rangeargument to focus on specific pages
Quickstart
Install
VS Code
Configure VS Code to use the MCP server by editing .vscode/mcp.json in your project:
{
"servers": {
"pdf-reader": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"python",
"-c",
"from pdf_reader_mcp import main; main()"
]
}
}
}{
"servers": {
"pdf-reader": {
"type": "stdio",
"command": "pdf-reader-mcp"
}
}
}Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"pdf-reader-mcp": {
"command": "uv",
"args": [
"--directory",
"${workspaceFolder}",
"run",
"pdf-reader-mcp"
]
}
}
}{
"mcpServers": {
"pdf-reader-mcp": {
"command": "uvx",
"args": [
"pdf-reader-mcp"
]
}
}
}Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENOr username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory "${workspaceFolder}" run pdf-reader-mcpUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Contributing
Fork the repo
Create a new branch (
feature-branch)Commit your changes
Push to your branch and submit a PR!
License
This project is licensed under the MIT License.
Contact
For questions or support, reach out via GitHub Issues.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Parse, extract, split, and ask over digital PDFs (text layer, no OCR) from Cursor and Claude.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
PDF tools for AI agents: validate, extract, merge, split, compress, OCR, sign and redact.
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Related MCP Servers
- AlicenseBqualityAmaintenanceEmpowers AI agents to securely read and extract information (text, metadata, page count) from PDF files within project contexts using a flexible MCP tool.11,074MIT
- AlicenseAqualityDmaintenanceEnables AI agents to securely read and extract information from PDF files including text content, metadata, and page counts from both local files and URLs within the project context.1MIT
- AlicenseAqualityDmaintenanceEnables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.3681 npm1MIT
- AlicenseAqualityCmaintenanceEnables AI agents to parse PDFs and search local document context through multimodal extraction and vector-based retrieval, all exposed as MCP tools.7MIT