pdf-tools-mcp is a FastAPI-based server for reading and manipulating PDF documents. It provides a RESTful API for common PDF operations like splitting, merging, extracting pages, adding content, watermarking, converting, compression, and OCR. The current version is 0.1.4, and its release cadence is irregular, driven by feature additions and maintenance.
pip install pdf-tools-mcpVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install and run the `pdf-tools-mcp` server, and how to perform a basic health check using `curl` or a Python `requests` client. Remember to run the `python -m pdf_tools_mcp.main` command in a separate terminal to start the server before making API requests. The server typically runs on `http://127.0.0.1:8000` by default.
Run the server using `python -m pdf_tools_mcp.main` and interact with it via HTTP requests (e.g., using `requests` in Python or `curl`).
Install the package with the required extras: `pip install pdf-tools-mcp[ocr,weasyprint,reportlab]` for full functionality. Check the `pyproject.toml` or `README` for specific feature-to-extra mappings.
Ensure your Python environment is version 3.12 or higher. Consider using `pyenv` or `conda` to manage multiple Python versions if needed.
Refer to FastAPI's documentation on `UploadFile` and `requests` library documentation on file uploads for correct client-side implementation. Example: `files = {'file': ('my_document.pdf', open('my_document.pdf', 'rb'), 'application/pdf')}`.