From 74c49c2906d1af8ae4c2dae7c022e59405aabf33 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Sun, 10 Nov 2024 20:14:41 +0000 Subject: [PATCH 1/3] Bump v0.6.0 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 242bce38..44a0d560 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "mcp-python" -version = "0.6.0.dev" +version = "0.6.0" description = "Model Context Protocol implementation for Python" readme = "README.md" requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index 27d231dd..281f0061 100644 --- a/uv.lock +++ b/uv.lock @@ -163,7 +163,7 @@ wheels = [ [[package]] name = "mcp-python" -version = "0.6.0.dev0" +version = "0.6.0" source = { editable = "." } dependencies = [ { name = "anyio" }, From 935fe5d1a037648462e0b630a379503dfdee127e Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Sun, 10 Nov 2024 21:47:26 +0000 Subject: [PATCH 2/3] Make call_tool() return value covariant `list` is invariant, hence handlers can't just return `list[str]`. We need to use Sequence here. --- mcp_python/server/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcp_python/server/__init__.py b/mcp_python/server/__init__.py index f3183fdb..a9c1744f 100644 --- a/mcp_python/server/__init__.py +++ b/mcp_python/server/__init__.py @@ -2,7 +2,7 @@ import contextvars import logging import warnings from collections.abc import Awaitable, Callable -from typing import Any +from typing import Any, Sequence from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream from pydantic import AnyUrl @@ -337,7 +337,7 @@ class Server: def decorator( func: Callable[ - ..., Awaitable[list[str | types.ImageContent | types.EmbeddedResource]] + ..., Awaitable[Sequence[str | types.ImageContent | types.EmbeddedResource]] ], ): logger.debug("Registering handler for CallToolRequest") From aec2ca5270177e20af8428047413f76189577506 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Sun, 10 Nov 2024 21:48:39 +0000 Subject: [PATCH 3/3] v0.6.1 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 44a0d560..18655730 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "mcp-python" -version = "0.6.0" +version = "0.6.1" description = "Model Context Protocol implementation for Python" readme = "README.md" requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index 281f0061..54d5cd69 100644 --- a/uv.lock +++ b/uv.lock @@ -163,7 +163,7 @@ wheels = [ [[package]] name = "mcp-python" -version = "0.6.0" +version = "0.6.1" source = { editable = "." } dependencies = [ { name = "anyio" },