Install this version:
emerge -a =dev-python/mcp-2.0.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-python/mcp-2.0.0
Or alternatively:
emerge --autounmask-write -a =dev-python/mcp-2.0.0
# 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}]
"
>=dev-python/anyio-4.9[] dev-python/httpx2[] dev-python/jsonschema[] >=dev-python/mcp-types-2.0.0[] dev-python/opentelemetry-api[] >=dev-python/pydantic-2.12[] dev-python/cryptography[] dev-python/pyjwt[] dev-python/python-multipart[] dev-python/sse-starlette[] >=dev-python/starlette-0.27[] dev-python/typing-extensions[] dev-python/typing-inspection[] >=dev-python/uvicorn-0.31.1[]
dev-python/uv-dynamic-versioning[]