[project]
name = "exult-mcp-docstrange"
version = "0.2.0"
description = "Exult MCP server for PDF document processing via docstrange (Streamable HTTP)."
requires-python = ">=3.11"
dependencies = [
    "mcp>=1.2.0",
    "tiktoken>=0.5.0",
    "docstrange",
    "starlette>=0.37",
    "uvicorn>=0.30",
]

[project.scripts]
# Resolves against the NAMESPACED package created by the wheel build
# below, NOT a bare top-level ``server`` module.
exult-mcp-docstrange = "docstrange_mcp.server:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

# Wheel layout: the repo keeps server.py / __init__.py / __main__.py at
# the dir root so the supervisor can run ``python server.py`` directly,
# but the BUILT wheel rewrites those flat files into a real
# ``docstrange_mcp/`` package. The previous ``packages = ["."]`` config
# would have installed bare ``server`` / ``__init__`` / ``__main__``
# modules straight into ``site-packages`` and poisoned the top-level
# namespace.
#
# ``only-include`` filters the source tree; ``sources`` rewrites the
# in-wheel paths so they land under a real package directory.
[tool.hatch.build.targets.wheel]
only-include = ["server.py", "__init__.py", "__main__.py"]

[tool.hatch.build.targets.wheel.sources]
"" = "docstrange_mcp"
