# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..14} )
DISTUTILS_USE_PEP517=hatchling

inherit pypi distutils-r1

DESCRIPTION="Model Context Protocol Python SDK"
HOMEPAGE="https://modelcontextprotocol.io https://pypi.org/project/mcp/"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RESTRICT="test"

# Overlay copy: ::gentoo is on mcp-1.x; 2.0.0 is what hermes-agent pins and
# it moved the HTTP stack to httpx2 and split the wire types into mcp-types.

# The sdist resolves its version through the hatchling uv-dynamic-versioning
# plugin (falls back to the PKG-INFO version when building from sdist).
BDEPEND="
	dev-python/uv-dynamic-versioning[${PYTHON_USEDEP}]
"

RDEPEND="
	>=dev-python/anyio-4.9[${PYTHON_USEDEP}]
	dev-python/httpx2[${PYTHON_USEDEP}]
	dev-python/jsonschema[${PYTHON_USEDEP}]
	>=dev-python/mcp-types-2.0.0[${PYTHON_USEDEP}]
	dev-python/opentelemetry-api[${PYTHON_USEDEP}]
	>=dev-python/pydantic-2.12[${PYTHON_USEDEP}]
	dev-python/cryptography[${PYTHON_USEDEP}]
	dev-python/pyjwt[${PYTHON_USEDEP}]
	dev-python/python-multipart[${PYTHON_USEDEP}]
	dev-python/sse-starlette[${PYTHON_USEDEP}]
	>=dev-python/starlette-0.27[${PYTHON_USEDEP}]
	dev-python/typing-extensions[${PYTHON_USEDEP}]
	dev-python/typing-inspection[${PYTHON_USEDEP}]
	>=dev-python/uvicorn-0.31.1[${PYTHON_USEDEP}]
"