misc/py-mcp2 2.3.0 MidnightBSD
Python implementation of the Model Context Protocol (MCP) 2.x
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- Port added
- Last update
- Commit
ecbcc61ae5- License
- mit
- Categories
- misc, python
Description
This is the 2.x series of the MCP Python SDK. It installs the same "mcp" Python package as misc/py-mcp (1.x), so the two cannot be installed together.
The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This Python SDK implements the full MCP specification, making it easy to:
- Build MCP clients that can connect to any MCP server
- Create MCP servers that expose resources, prompts and tools
- Use standard transports like stdio and SSE
- Handle all MCP protocol messages and lifecycle events
Version history 1
Upstream's version as each commit to the port's Makefile set it, or as this site first saw it in the system's packages; the tree's own revisions are not versions here.
Install
Binary package:
mport install ${PYTHON_PKGNAMEPREFIX}mcp2
From mports:
cd /usr/mports/misc/py-mcp2 && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mcp2>0:misc/py-mcp2
Dependency graph
Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.
Dependencies
As this port's Makefile names them.
Build 2
${PYTHON_PKGNAMEPREFIX}hatchling>=1.27.0: devel/py-hatchling${PYTHON_PKGNAMEPREFIX}uv-dynamic-versioning>=0.8.2: devel/py-uv-dynamic-versioning
Runtime 14
${PYTHON_PKGNAMEPREFIX}anyio>=4.10: devel/py-anyio${PYTHON_PKGNAMEPREFIX}cryptography>=0: security/py-cryptography${PYTHON_PKGNAMEPREFIX}httpx2>=2.10.0: www/py-httpx2${PYTHON_PKGNAMEPREFIX}jsonschema>=4.20.0: devel/py-jsonschema${PYTHON_PKGNAMEPREFIX}mcp-types>=2.3.0<2.3.1: misc/py-mcp-types${PYTHON_PKGNAMEPREFIX}opentelemetry-api>=1.28.0: devel/py-opentelemetry-api${PYTHON_PKGNAMEPREFIX}pydantic2>=2.12.0: devel/py-pydantic2${PYTHON_PKGNAMEPREFIX}pyjwt>=2.10.1: www/py-pyjwt${PYTHON_PKGNAMEPREFIX}python-multipart>=0.0.9: www/py-python-multipart${PYTHON_PKGNAMEPREFIX}sse-starlette>=3.0.0: www/py-sse-starlette${PYTHON_PKGNAMEPREFIX}starlette>=0.48.0: www/py-starlette${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.13.0: devel/py-typing-extensions${PYTHON_PKGNAMEPREFIX}typing-inspection>=0.4.1: devel/py-typing-inspection${PYTHON_PKGNAMEPREFIX}uvicorn>=0.31.1: www/py-uvicorn
Build dependencies 2
Run dependencies 14
Required by 1
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
- Conflicts with
- ${PYTHON_PKGNAMEPREFIX}mcp
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| mcp-2.3.0.tar.gz | 4.171955e+06 | 8b147a50441cf059dc88c684e0aeed3687f0aa0f39c6cde7b90330effd2b34d8 |
Master sites 1
- PYPI
Commit history 1
| Date | Commit | Credits | Log message |
|---|---|---|---|
ecbcc61ae5 |
Lucas Holt | misc/py-mcp2: new port, MCP Python SDK 2.3.0 ai/py-mistral-vibe 3.0.4 and later need mcp 2.x, but
ai/py-langchain-mcp-adapters (latest upstream 0.3.2) requires
mcp<2.0.0 and uses APIs removed in 2.x (mcp.server.fastmcp,
mcp.client.websocket, ...). Keep misc/py-mcp at 1.x for it and add
the 2.x SDK as a separate port, following the devel/py-pydantic2
pattern (PKGNAMESUFFIX=2).
Both install the "mcp" Python package, so they CONFLICTS_INSTALL.
Run dependencies come from upstream 2.3.0 metadata rather than the
FreeBSD port, which still lists httpx/httpx-sse: 2.x uses httpx2,
python-multipart (www/py-python-multipart) and pyjwt[crypto].
AI-Assisted-by: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Lucas Holt <[email protected]> |