pdf-lite-mcp
A simplified Python MCP server for reading PDF files, specifically optimized for Amazon Q CLI usage.
Built as a streamlined alternative to complex PDF processing tools, focusing on clean output and reliable performance.
Features
- Read PDFs from local files or URLs
- Extract specific pages or full content
- Metadata extraction (title, author, page count)
- Batch processing support
- Security-focused with path validation
Installation
From PyPI (recommended)
# Install using uvx (no need to clone repository)
uvx pdf-lite-mcp
# Or install globally
pip install pdf-lite-mcp
From source
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/tsaol/pdf-lite-mcp.git
cd pdf-lite-mcp
uv sync
Amazon Q CLI Configuration
Using PyPI package (recommended)
{
"mcpServers": {
"pdf-lite": {
"command": "uvx",
"args": ["pdf-lite-mcp"],
"disabled": false,
"autoApprove": ["read_pdf"]
}
}
}
Using local development version
{
"mcpServers": {
"pdf-lite": {
"command": "uv",
"args": ["run", "python", "src/main.py"],
"cwd": "/path/to/pdf-lite-mcp",
"env": {
"PYTHONPATH": "."
}
}
}
}
Using Git URL
{
"mcpServers": {
"pdf-lite": {
"command": "uvx",
"args": ["--from", "git+https://github.com/tsaol/pdf-lite-mcp.git", "pdf-lite-mcp"],
"env": {
"PYTHONPATH": "."
}
}
}
}
Usage
Basic PDF Reading
{
"tool_name": "read_pdf",
"arguments": {
"sources": [{"path": "./document.pdf"}],
"include_full_text": true
}
}
Specific Pages
{
"tool_name": "read_pdf",
"arguments": {
"sources": [{"path": "./report.pdf", "pages": [1, 3, 5]}]
}
}
Multiple PDFs
{
"tool_name": "read_pdf",
"arguments": {
"sources": [
{"path": "./doc1.pdf"},
{"url": "https://example.com/doc2.pdf"}
]
}
}
Testing
# Basic tests
uv run python tests/simple_test.py
# Server tests
uv run python tests/test_server.py
# PDF processing tests (requires network)
uv run python tests/test_with_pdf.py
License
MIT License - see LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdf_lite_mcp-1.0.1.tar.gz
(15.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf_lite_mcp-1.0.1.tar.gz.
File metadata
- Download URL: pdf_lite_mcp-1.0.1.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa5cf75c08d4434a59ef94bf93a533f4d3276afc702d66a8aafb1a3021ba5229
|
|
| MD5 |
938313dafd0e083b5c1c860fc21aace2
|
|
| BLAKE2b-256 |
9db5956dc83297d0a032c38bcbe05b44e38888177d86e72c068c2c035ed3990f
|
File details
Details for the file pdf_lite_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pdf_lite_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7baf75ec16845631d2ba86d905611757c9d2c0aaadfb83eaddd19a36bf4080c1
|
|
| MD5 |
494474d3b36964fc75300d4ba4ce5424
|
|
| BLAKE2b-256 |
c8c039a1b6461ce5230d45fa5f4d08a1f23a011563ffd331282c3cad70802d74
|