@@ -121,12 +121,17 @@ temporal operator nexus endpoint create \
121121import asyncio
122122
123123from temporalio.client import Client
124+ from temporalio.contrib.pydantic import pydantic_data_converter
124125from temporalio.worker import Worker
125126from .service_handler import mcp_service_handler, CalculatorHandler
126127
127128async def main ():
128129 # Connect to Temporal (replace host and namespace as needed).
129- client = await Client.connect(" localhost:7233" , namespace = " my-handler-namespace" )
130+ client = await Client.connect(
131+ " localhost:7233" ,
132+ namespace = " my-handler-namespace" ,
133+ data_converter = pydantic_data_converter,
134+ )
130135
131136 async with Worker(
132137 client,
@@ -144,12 +149,17 @@ import asyncio
144149from mcp.server.lowlevel import NotificationOptions, Server
145150from mcp.server.models import InitializationOptions
146151from temporalio.client import Client
152+ from temporalio.contrib.pydantic import pydantic_data_converter
147153from nexusmcp import InboundGateway
148154
149155async def main ():
150156 server = Server(" nexus-mcp-demo" )
151157 # Connect to Temporal (replace host and namespace as needed).
152- client = await Client.connect(" localhost:7233" , namespace = " my-caller-namespace" )
158+ client = await Client.connect(
159+ " localhost:7233" ,
160+ namespace = " my-caller-namespace" ,
161+ data_converter = pydantic_data_converter,
162+ )
153163
154164 # Create the MCP gateway
155165 gateway = InboundGateway(
0 commit comments