
m13253/pdflens-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
An MCP server for reading PDFs, coded by human, designed for AI
概要
An MCP server for reading PDFs, coded by human, designed for AI. Pdflens 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.
README
以下は原文 README の抜粋です。原文を見る。
pdflens-mcp
An MCP server for reading PDFs, coded by human, designed for AI.
⚠️ Out-of-maintenance notice ⚠️
Pdflens 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.
Provided tools
get_pdf_num_pagesread_pdf_as_textread_pdf_page_as_image‡
‡ Not all MCP clients support images.
Usage
-
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-mcpUsually, the program is installed to
$HOME/.cargo/bin/pdflens-mcp. You can usecargo install --root /another/path pdflens-mcpto set a custom installation path. -
Add this MCP server to your MCP client of choice.
(Note: We use
shto expand~to your actual home directory. If you are using Microsoft Windows, please instead put the full path topdflens-mcp.exeto"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"
-
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"pdflens": {
"command": "sh",
"args": ["-c", "exec ~/.cargo/bin/pdflens-mcp"]
}
}
}