samples-python icon indicating copy to clipboard operation
samples-python copied to clipboard

Nexus-backed MCP calls from a workflow

Open dandavison opened this issue 5 months ago • 0 comments

This sample demonstrates how to make MCP calls from a workflow, using the MCP Python SDK. The MCP server can be a standard stdio server, or it can be implemented as a Temporal workflow, giving rise to durable client sessions. The example uses an MCP server with stateful sessions: the sequentialthinking reference MCP server, optionally translated as a Python Temporal workflow.

temporal operator nexus endpoint create \
  --target-namespace default \
  --name mcp-sequential-thinking-nexus-endpoint \
  --target-task-queue mcp-sequential-thinking-task-queue
  
uv sync --group=mcp
uv run mcp_examples/workflow_nexus_transport/app.py --mcp-server-type stdio
uv run mcp_examples/workflow_nexus_transport/app.py --mcp-server-type workflow

dandavison avatar Aug 19 '25 14:08 dandavison