Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Update src/fastmcp/client/client.py

Jeremiah Lowina19a84e7a891
diff --git a/src/fastmcp/client/client.py b/src/fastmcp/client/client.py
index c0e78a2d5..952a94796 100644
--- a/src/fastmcp/client/client.py
+++ b/src/fastmcp/client/client.py
@@ -533,7 +533,7 @@ class Client(Generic[ClientTransportT]):
serialized_arguments[key] = value
else:
# Use pydantic_core.to_json for consistent serialization
- serialized_arguments[key] = pydantic_core.to_json(value).decode()
+ serialized_arguments[key] = pydantic_core.to_json(value).decode('utf-8')
result = await self.session.get_prompt(
name=name, arguments=serialized_arguments