Temporal Durable Mcp Weather Sample
LocalAbout Temporal Durable Mcp Weather Sample
A Python weather MCP server sample that implements tools as Temporal workflows. It is for developers exploring durable tool execution, with workflow state and retries as the central design.
Key features
- 01Weather alerts and forecasts
- 02MCP tools implemented as Temporal workflows
- 03Workflow state and retries
- 04Claude for Desktop setup example
Use cases
- 01Explore durable MCP tool design
- 02Query weather alerts through an MCP client
- 03Retrieve forecasts for a city
MCP support
The server exposes `get_alerts` and `get_forecast` to MCP clients. Each tool is implemented as a Temporal workflow.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMETemporal & Durable MCP
The purpose of this repo is to demonstrate how easy it is to leverage workflows as tools for MCP servers by taking modelcontext.io's weather example and making it durable by implementing the MCP tools as Temporal workflows
Prerequisites:
- Python3+
uv(curl -LsSf https://astral.sh/uv/install.sh | sh)- Temporal Local Setup Guide
- Claude for Desktop
Getting Started
- First step - clone me
cd temporal-durable-mcp-weather-sampleuv venv(create virtual env)source .venv/bin/activateuv pip install pyproject.toml- Start Temporal Server:
temporal server start-dev - Start Worker:
python worker.py - Edit your Claude for Desktop Config:
- Open Claude for Desktop
- Click
Settingsin the toolbar - Click
Developer - Click
Edit Config(this should open up a finder window that points to a file calledclaude_desktop_config.json) - Open the file mentioned above in your editor of choice and modify it to look like the following
-
{ "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/temporal-durable-mcp-weather-sample", "run", "weather.py" ] } } }
-
- Validate that the tools exposed by the server (
get_alerts,get_forecast) show up inSearch and Toolsby clicking the slider icon in the chat box of Claude for Desktop
- Ask Claude for any weather alerts and the forecast for a particular city - it should leverage the tools. If it doesn't, try prompting it again encouraging it to use MCP tools that it has access to.
Results
Here we can see Claude is using the tools intelligently to look for weather alerts while getting me weather information:

What's Cool About This
This demonstrates how tools in MCP can be implemented as workflows, adding durability. Per Claude:
Traditional MCP tool implementations are like having a single phone conversation - if the line cuts out at any point, you lose everything and have to start over from scratch. When an AI agent is performing complex, multi-step operations (like processing a large dataset, coordinating multiple API calls, or handling a lengthy business process), a single failure anywhere in the chain means complete failure.

Temporal workflows act like a detailed journal that remembers exactly where you left off. Think of it as having a conversation with someone who takes meticulous notes - even if you both get interrupted and come back hours later, you can pick up exactly where you left off without missing a beat.

This demonstrates what we're calling "tools as workflows" - a tool is implemented as a Temporal Workflow, with the benefits of durability, state management, and retries built in.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.