| Crates.io | pdflens-mcp |
| lib.rs | pdflens-mcp |
| version | 0.3.3 |
| created_at | 2025-11-17 11:24:15.412633+00 |
| updated_at | 2025-12-19 11:04:38.235061+00 |
| description | An MCP server for reading PDFs, coded by human, designed for AI. |
| homepage | |
| repository | https://github.com/m13253/pdflens-mcp |
| max_upload_size | |
| id | 1936624 |
| size | 91,550 |
An MCP server for reading PDFs, coded by human, designed for AI.

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 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\"]}"
Continue.dev
mcpServers:
- name: pdflens
command: sh
args:
- -c
- exec ~/.cargo/bin/pdflens-mcp
Codex
[mcp_servers.pdflens]
command = "sh"
args = ["-c", "exec ~/.cargo/bin/pdflens-mcp"]
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"
}
}
}
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.