Major architectural improvements and bug fixes in the v2.0.x series:
## v2.0.5 - Page Range Parsing (Current Release)
- Fix page range parsing bug affecting 6 mixins (e.g., "93-95" or "11-30")
- Create shared parse_pages_parameter() utility function
- Support mixed formats: "1,3-5,7,10-15"
- Update: pdf_utilities, content_analysis, image_processing, misc_tools, table_extraction, text_extraction
## v2.0.4 - Chunk Hint Fix
- Fix next_chunk_hint to show correct page ranges
- Dynamic calculation based on actual pages being extracted
- Example: "30-50" now correctly shows "40-49" for next chunk
## v2.0.3 - Initial Range Support
- Add page range support to text extraction ("11-30")
- Fix _parse_pages_parameter to handle ranges with Python's range()
- Convert 1-based user input to 0-based internal indexing
## v2.0.2 - Lazy Import Fix
- Fix ModuleNotFoundError for reportlab on startup
- Implement lazy imports for optional dependencies
- Graceful degradation with helpful error messages
## v2.0.1 - Dependency Restructuring
- Move reportlab to optional [forms] extra
- Document installation: uvx --with mcp-pdf[forms] mcp-pdf
## v2.0.0 - Official FastMCP Pattern Migration
- Migrate to official fastmcp.contrib.mcp_mixin pattern
- Create 12 specialized mixins with 42 tools total
- Architecture: mixins_official/ using MCPMixin base class
- Backwards compatibility: server_legacy.py preserved
Technical Improvements:
- Centralized utility functions (DRY principle)
- Consistent behavior across all PDF tools
- Better error messages with actionable instructions
- Library-specific adapters for table extraction
Files Changed:
- New: src/mcp_pdf/mixins_official/utils.py (shared utilities)
- Updated: 6 mixins with improved page parsing
- Version: pyproject.toml, server.py → 2.0.5
PyPI: https://pypi.org/project/mcp-pdf/2.0.5/
115 lines
2.7 KiB
TOML
115 lines
2.7 KiB
TOML
[project]
|
|
name = "mcp-pdf"
|
|
version = "2.0.5"
|
|
description = "Secure FastMCP server for comprehensive PDF processing - text extraction, OCR, table extraction, forms, annotations, and more"
|
|
authors = [{name = "Ryan Malloy", email = "ryan@malloys.us"}]
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
requires-python = ">=3.10"
|
|
keywords = [
|
|
"mcp",
|
|
"fastmcp",
|
|
"pdf",
|
|
"ocr",
|
|
"text-extraction",
|
|
"table-extraction",
|
|
"pdf-processing",
|
|
"api",
|
|
"integration"
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Topic :: Text Processing :: General",
|
|
"Topic :: Office/Business",
|
|
]
|
|
dependencies = [
|
|
"fastmcp>=0.1.0",
|
|
"httpx>=0.25.0",
|
|
"pydantic>=2.0.0",
|
|
"python-dotenv>=1.0.0",
|
|
"PyMuPDF>=1.23.0",
|
|
"pdfplumber>=0.10.0",
|
|
"camelot-py[cv]>=0.11.0", # includes opencv-python
|
|
"tabula-py>=2.8.0",
|
|
"pytesseract>=0.3.10",
|
|
"pdf2image>=1.16.0",
|
|
"pypdf>=6.0.0",
|
|
"pandas>=2.0.0",
|
|
"Pillow>=10.0.0",
|
|
"markdown>=3.5.0",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/rsp2k/mcp-pdf"
|
|
Documentation = "https://github.com/rsp2k/mcp-pdf#readme"
|
|
Repository = "https://github.com/rsp2k/mcp-pdf.git"
|
|
Issues = "https://github.com/rsp2k/mcp-pdf/issues"
|
|
Changelog = "https://github.com/rsp2k/mcp-pdf/releases"
|
|
|
|
[project.scripts]
|
|
mcp-pdf = "mcp_pdf.server:main"
|
|
mcp-pdf-legacy = "mcp_pdf.server_legacy:main"
|
|
mcp-pdf-modular = "mcp_pdf.server_refactored:main"
|
|
|
|
[project.optional-dependencies]
|
|
# Form creation features (create_form_pdf, advanced form tools)
|
|
forms = [
|
|
"reportlab>=4.0.0",
|
|
]
|
|
|
|
# All optional features
|
|
all = [
|
|
"reportlab>=4.0.0",
|
|
]
|
|
|
|
# Development dependencies
|
|
dev = [
|
|
"pytest>=7.0.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"black>=23.0.0",
|
|
"ruff>=0.1.0",
|
|
"mypy>=1.0.0",
|
|
"build>=0.10.0",
|
|
"twine>=4.0.0",
|
|
"safety>=3.0.0",
|
|
"pip-audit>=2.0.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
addopts = "-v --tb=short"
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
|
|
[tool.hatchling.build.targets.sdist]
|
|
include = [
|
|
"/src",
|
|
"/tests",
|
|
"/examples",
|
|
"README.md",
|
|
"LICENSE",
|
|
"MANIFEST.in",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pip-audit>=2.9.0",
|
|
"pytest>=8.4.1",
|
|
"pytest-asyncio>=1.1.0",
|
|
"pytest-cov>=6.2.1",
|
|
"reportlab>=4.4.3",
|
|
"safety>=3.2.11",
|
|
"twine>=6.1.0",
|
|
]
|