pdflens-mcp
An MCP server for reading PDFs, coded by human, designed for AI.

Agenten stärken
Installation vom Herausgeber. Kein PlugMCP-Endpunkt.
Host a copy with our keys and logs.
Noch kein paketiertes Release in der Registry. Folgen Sie der README des Repositorys.
Remote-URL oder ein Befehl auf Ihrem Rechner? Worin sich die beiden Installationen unterscheiden
Auf PlugMCP ausführen
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
StartenPdflens MCP is designed to use the MCP Root mechanism for privacy and security boundary within workspaces, so the user can auto-approve all Pdflens MCP tool calls, knowing that LLMs will not accidentally upload PDF contents outside user’s workspaces to LLM inference providers.
However, MCP decided to deprecate the Root mechanism (SEP-2577), and will remove it at around June 2027. The documentation also states that my approach to use MCP Root for access control is wrong.
Until MCP provides an alternative mechanism (e.g., SEP-1708), maintaining the core functionality of this MCP Server is impossible. Therefore, I am pausing the maintenance of this project until I find any alternative method to allow auto-approved PDF reading. Current coding agents may still be able to use Pdflens MCP for now, but newer coding agents will eventually be incompatible with it.
When the day comes, please try other options, for example, running pdftotext and pdftoppm commands inside terminal sandboxes. VS Code supports sandboxes since 1.109, and Zed since 1.14.2. For OCR requirements, please check Firecrawl/pdf-inspector.
get_pdf_num_pagesread_pdf_as_textread_pdf_page_as_image‡‡ Not all MCP clients support images.
Install Rust compiler: https://rustup.rs/
Download and build pdflens-mcp from crates.io
cargo install --git https://codeberg.org/m13253/pdflens-mcp.git pdflens-mcp
Usually, the program is installed to $HOME/.cargo/bin/pdflens-mcp. You can use cargo install --root /another/path pdflens-mcp to set a custom installation path.
Add this MCP server to your MCP client of choice.
(Note: We use sh to expand ~ to your actual home directory. If you are using Microsoft Windows, please instead put the full path to pdflens-mcp.exe to "command" and leave "args" empty.)
If your MCP client supports mcp.json:
{
"mcpServers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"]
}
}
}
Visual Studio Code:
code --add-mcp "{\"name\": \"pdflens\", \"command\": \"sh\", \"args\": [\"-c\", \"exec ~/.cargo/bin/pdflens-mcp\"]}"
Codex
[mcp_servers.pdflens]
command = "sh"
args = ["-c", "exec ~/.cargo/bin/pdflens-mcp"]
Continue.dev
mcpServers:
- name: pdflens
command: sh
args:
- -c
- exec ~/.cargo/bin/pdflens-mcp
Kilo Code
{
"mcpServers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"],
"alwaysAllow": [
"get_pdf_num_pages",
"read_pdf_as_text"
],
"disabledTools": ["read_pdf_page_as_image"]
}
}
}
Roo Code
{
"mcpServers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"],
"alwaysAllow": [
"get_pdf_num_pages",
"read_pdf_as_text",
"read_pdf_page_as_image"
]
}
}
}
Zed
{
"agent": {
"tool_permissions": {
"tools": {
"mcp:pdflens:get_pdf_num_pages": {"default": "allow"},
"mcp:pdflens:read_pdf_as_text": {"default": "allow"},
"mcp:pdflens:read_pdf_page_as_image": {"default": "allow"}
}
}
},
"context_servers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"],
"remote": true,
"enabled": true,
}
}
}
Pdflens is designed to only read PDFs located within the user’s workspace directories, also called MCP root directories.
Each time before reading the PDFs, it checks the file path after resolving any symbolic links. If the PDF exists but is outside any user’s workspace directories, pdflens will return an error, asking the user to check the root path settings.
If your MCP client doesn’t specify a root path, pdflens will fallback to the current directory it is started in.
{
"mcpServers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"],
"cwd": "/path/to/workspace/if/root/path/is/unsupported"
}
}
}
Some IDEs and editors allows you to specify where pdflens-mcp runs, so it can access remote files.
On Visual Studio Code, write the MCP configuration on remote workspace settings.
On Zed, specify "remote": true.
This project is developed mainly with human effort. I have throughoutly read and checked every piece of code in this repository to ensure its quality.
An MCP server for reading PDFs, coded by human, designed for AI
Tools
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
Pdflens läuft lokal über stdio.
Zuletzt geprüft: 2026-11-05. An MCP server for reading PDFs, coded by human, designed for AI