Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Commit 4921d88

Browse files
committed
Update README.md to use the money-transfer-demo
1 parent 3ece162 commit 4921d88

File tree

2 files changed

+182
-172
lines changed

2 files changed

+182
-172
lines changed

README.md

Lines changed: 131 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,116 @@
1-
# ⏰🧠 Temporal MCP
1+
# ⏰🧠 Temporal-MCP Server
22

3-
> **Empowering AI with Workflow Orchestration**
3+
Temporal MCP is an MCP server that bridges AI assistants (like Claude) and Temporal workflows. It turns complex backend orchestration into simple, chat-driven commands. Imagine triggering stateful processes without writing a line of glue code. Temporal-MCP makes that possible.
44

5-
Temporal MCP is a bridge connecting AI assistants like Claude with the powerful Temporal workflow engine. By implementing the Model Context Protocol (MCP), it allows AI assistants to discover, execute, and monitor complex workflow orchestrations—all through natural language conversations.
5+
## Why Temporal MCP
66

7-
## ✨ What Can It Do?
7+
- **Supercharged AI** — AI assistants gain reliable, long-running workflow superpowers
8+
- **Conversational Orchestration** — Trigger, monitor, and manage workflows through natural language
9+
- **Enterprise-Ready** — Leverage Temporal's retries, timeouts, and persistence—exposed in plain text
810

9-
Temporal MCP transforms how your AI assistants interact with your backend systems:
11+
## ✨ Key Features
1012

11-
- **🔍 Automatic Discovery** — AI assistants can explore available workflows and their capabilities
12-
- **🏃‍♂️ Seamless Execution** — Execute complex workflows with parameters through natural conversations
13-
- **📊 Real-time Monitoring** — Check status of running workflows and get updates
14-
- **⚡ Performance Optimization** — Smart caching of results for faster responses
15-
- **🧠 AI-friendly Descriptions** — Rich metadata helps AI understand workflow purposes and operations
16-
17-
### Why Temporal MCP Exists
18-
19-
AI assistants are powerful for generating content and reasoning, but they lack the ability to execute complex workflows or maintain state across long-running operations. Temporal provides robust workflow orchestration with reliability features like retries, timeouts, and failover mechanisms. By connecting these systems:
20-
21-
- **AI assistants gain workflow superpowers** - Execute complex business processes, data pipelines, and service orchestrations
22-
- **Temporal workflows become conversational** - Trigger and monitor workflows through natural language
23-
- **Enterprise systems become AI-accessible** - Expose existing workflow infrastructure to AI assistants without rebuilding
13+
- **🔍 Automatic Discovery** — Explore available workflows and see rich metadata
14+
- **🏃‍♂️ Seamless Execution** — Kick off complex processes with a single chat message
15+
- **📊 Real-time Monitoring** — Follow progress, check status, and get live updates
16+
- **⚡ Performance Optimization** — Smart caching for instant answers
17+
- **🧠 AI-Friendly Descriptions** — Purpose fields written for both humans and machines
2418

2519
## 🏁 Getting Started
2620

2721
### Prerequisites
2822

29-
Before you dive in, make sure you have:
30-
3123
- **Go 1.21+** — For building and running the MCP server
3224
- **Temporal Server** — Running locally or remotely (see [Temporal docs](https://docs.temporal.io/docs/server/quick-install/))
3325

34-
### Installation
26+
### Quick Install
27+
28+
1. Run your Temporal server and workers
29+
In this example, we'll use the [Temporal Money Transfer Demo](https://github.com/temporal-sa/money-transfer-demo/tree/main).
30+
3531

36-
Let's get you up and running in just a few minutes:
32+
#### MCP Setup
33+
Get Claude (or similar MCP-enabled AI assistant) talking to your workflows in 5 easy steps:
3734

38-
1. **Clone the repository**
35+
2. **Build the server**
3936
```bash
40-
git clone https://github.com/yourusername/temporal-mcp.git
37+
git clone https://github.com/Mocksi/temporal-mcp.git
4138
cd temporal-mcp
39+
make build
4240
```
4341

44-
2. **Build the project**
45-
```bash
46-
make build
42+
2. **Define your workflows** in `config.yml`
43+
The sample configuration (`config.sample.yml`) is designed to work with the [Temporal Money Transfer Demo](https://github.com/temporal-sa/money-transfer-demo/tree/main):
44+
45+
```yaml
46+
workflows:
47+
AccountTransferWorkflow:
48+
purpose: "Transfers money between accounts with validation and notification. Handles the happy path scenario where everything works as expected."
49+
input:
50+
type: "TransferInput"
51+
fields:
52+
- from_account: "Source account ID"
53+
- to_account: "Destination account ID"
54+
- amount: "Amount to transfer"
55+
output:
56+
type: "TransferOutput"
57+
description: "Transfer confirmation with charge ID"
58+
taskQueue: "account-transfer-queue"
59+
60+
AccountTransferWorkflowScenarios:
61+
purpose: "Extended account transfer workflow with various scenarios including human approval, recoverable failures, and advanced visibility features."
62+
input:
63+
type: "TransferInput"
64+
fields:
65+
- from_account: "Source account ID"
66+
- to_account: "Destination account ID"
67+
- amount: "Amount to transfer"
68+
- scenario_type: "Type of scenario to execute (human_approval, recoverable_failure, advanced_visibility)"
69+
output:
70+
type: "TransferOutput"
71+
description: "Transfer confirmation with charge ID"
72+
taskQueue: "account-transfer-queue"
4773
```
4874
49-
3. **Configure your workflows**
50-
Copy the sample config and customize it for your environment:
75+
3. **Generate Claude's configuration**
5176
```bash
52-
cp config.sample.yml config.yml
53-
# Edit config.yml with your favorite editor
77+
cd examples
78+
./generate_claude_config.sh
5479
```
5580

56-
4. **Launch the server**
81+
4. **Install the configuration**
5782
```bash
58-
./bin/temporal-mcp --config ./config.yml
83+
cp examples/claude_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json
5984
```
6085

61-
> 💡 **Tip:** For development, you can use `make run` to build and run in one step!
86+
5. **Start Claude** with this configuration
87+
88+
### Conversing with Your Workflows
89+
90+
Now for the magic part! Talk to your workflows through Claude using natural language:
91+
92+
> 💬 "Claude, can you transfer $100 from account ABC123 to account XYZ789?"
93+
94+
> 💬 "What transfer scenarios are available to test?"
95+
96+
> 💬 "Execute a transfer that requires human approval for $500 between accounts ABC123 and XYZ789"
97+
98+
> 💬 "Has the transfer workflow completed yet?"
99+
100+
> 💬 "Run a transfer scenario with recoverable failures to test error handling"
101+
102+
Behind the scenes, Temporal MCP translates these natural language requests into properly formatted workflow executions—no more complex API calls or parameter formatting!
103+
104+
## Core Values
105+
106+
1. **Clarity First** — Use simple, direct language. Avoid jargon.
107+
2. **Benefit-Driven** — Lead with "what's in it for me".
108+
3. **Concise Power** — Less is more—keep sentences tight and memorable.
109+
4. **Personality & Voice** — Bold statements, short lines, a dash of excitement.
110+
111+
## Ready to Showcase
112+
113+
Lights, camera, action—capture your first AI-driven workflow in motion. Share that moment. Inspire others to see Temporal MCP in action.
62114

63115
## Development
64116

@@ -102,70 +154,9 @@ cp config.sample.yml config.yml
102154
- ✓ Verify claude_config.json is in the correct location
103155
- ✓ Restart Claude after configuration changes
104156

105-
## 📜 License
106-
107-
This project is licensed under the MIT License - see the LICENSE file for details.
108-
109-
## 🤖 Using with AI Assistants
110-
111-
One of the most exciting features of Temporal MCP is how it bridges the gap between natural language and complex workflow orchestration using the [Model Context Protocol (MCP)](https://github.com/anthropics/anthropic-cookbook/tree/main/mcp).
112-
113-
### Setting Up Claude
114-
115-
Let's get Claude talking to your workflows in 5 easy steps:
116-
117-
1. **Build the server** (if you haven't already)
118-
```bash
119-
make build
120-
```
121-
122-
2. **Define your workflows** in `config.yml`
123-
Here's an example of a workflow definition that Claude can understand:
124-
125-
```yaml
126-
workflows:
127-
data-processing-workflow:
128-
purpose: "Processes data from various sources with configurable parameters."
129-
input:
130-
type: "DataProcessingRequest"
131-
fields:
132-
- source_type: "The type of data source to process."
133-
- batch_size: "The number of records to process in each batch."
134-
output:
135-
type: "ProcessingResult"
136-
description: "Results of the data processing operation."
137-
```
138-
139-
3. **Generate Claude's configuration**
140-
```bash
141-
cd examples
142-
./generate_claude_config.sh
143-
```
144-
145-
4. **Install the configuration**
146-
```bash
147-
cp examples/claude_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json
148-
```
149-
150-
5. **Start Claude** with this configuration
151-
152-
### Conversing with Your Workflows
153-
154-
Now for the magic part! You can talk to your workflows through Claude using natural language:
155-
156-
> 💬 "Claude, can you run the data processing workflow on the customer database with a batch size of 500?"
157-
158-
> 💬 "What workflows are available for me to use?"
159-
160-
> 💬 "Execute the billing workflow for customer ABC123 with the April invoice data"
161-
162-
> 💬 "Has the daily analytics workflow completed yet?"
163-
164-
Behind the scenes, Temporal MCP translates these natural language requests into properly formatted workflow executions—no more complex API calls or parameter formatting!
165-
166157
## ⚙️ Configuration
167158

168-
The heart of Temporal MCP is its configuration file, which connects your AI assistants to your workflow engine. Let's break it down:
159+
The heart of Temporal MCP is its configuration file, which connects your AI assistants to your workflow engine:
169160

170161
### Configuration Architecture
171162

@@ -177,15 +168,15 @@ Your `config.yml` consists of three key sections:
177168

178169
### Example Configuration
179170

180-
Here's a complete example with annotations to guide you:
171+
The sample configuration is designed to work with the Temporal Money Transfer Demo:
181172

182173
```yaml
183174
# Temporal server connection details
184175
temporal:
185176
hostPort: "localhost:7233" # Your Temporal server address
186177
namespace: "default" # Temporal namespace
187178
environment: "local" # "local" or "remote"
188-
defaultTaskQueue: "executions-task-queue"
179+
defaultTaskQueue: "account-transfer-queue" # Default task queue for workflows
189180

190181
# Fine-tune connection behavior
191182
timeout: "5s" # Connection timeout
@@ -195,31 +186,35 @@ temporal:
195186
maximumAttempts: 5 # Don't try forever
196187
backoffCoefficient: 2.0 # Exponential backoff
197188

198-
# Optimize performance with caching
199-
cache:
200-
enabled: true # Turn caching on/off
201-
databasePath: "./workflow_cache.db" # Where to store cache
202-
ttl: "24h" # Cache entries expire after 24h
203-
maxCacheSize: 104857600 # 100MB max cache size
204-
cleanupInterval: "1h" # Automatic maintenance
205-
206189
# Define AI-discoverable workflows
207190
workflows:
208-
data-analysis-workflow: # Workflow ID in kebab-case
209-
purpose: "Analyzes a dataset and generates insights with comprehensive error handling and validation. Processes data through extraction, transformation, analysis stages and returns formatted results with visualizations."
210-
input: # What the workflow needs
211-
type: "AnalysisRequest" # Input type name
212-
fields: # Required parameters
213-
- dataset_id: "ID of the dataset to analyze."
214-
- metrics: "List of metrics to compute."
215-
- format: "Output format (json, csv, etc)."
216-
output: # What the workflow returns
217-
type: "AnalysisResult" # Output type name
218-
description: "Analysis results with computed metrics and visualizations."
219-
taskQueue: "analysis-queue" # Optional custom task queue
191+
AccountTransferWorkflow:
192+
purpose: "Transfers money between accounts with validation and notification. Handles the happy path scenario where everything works as expected."
193+
workflowIDRecipe: "transfer_{{.from_account}}_{{.to_account}}_{{.amount}}"
194+
input:
195+
type: "TransferInput"
196+
fields:
197+
- from_account: "Source account ID"
198+
- to_account: "Destination account ID"
199+
- amount: "Amount to transfer"
200+
output:
201+
type: "TransferOutput"
202+
description: "Transfer confirmation with charge ID"
203+
taskQueue: "account-transfer-queue"
204+
activities:
205+
- name: "validate"
206+
timeout: "5s"
207+
- name: "withdraw"
208+
timeout: "5s"
209+
- name: "deposit"
210+
timeout: "5s"
211+
- name: "sendNotification"
212+
timeout: "5s"
213+
- name: "undoWithdraw"
214+
timeout: "5s"
220215
```
221216
222-
> 💡 **Pro Tip:** Copy `config.sample.yml` as your starting point and customize from there.
217+
> 💡 **Pro Tip:** The sample configuration is pre-configured to work with the [Temporal Money Transfer Demo](https://github.com/temporal-sa/money-transfer-demo/tree/main). Use it as a starting point for your own workflows.
223218
224219
## 💎 Best Practices
225220
@@ -249,9 +244,9 @@ The `purpose` field is your AI assistant's window into understanding what each w
249244

250245
| Item | Convention | Example |
251246
|------|------------|----------|
252-
| Workflow IDs | kebab-case | `financial-report-generator` |
253-
| Parameter names | snake_case | `account_id`, `start_date` |
254-
| Parameters with units | Include unit | `timeout_seconds`, `batch_size` |
247+
| Workflow IDs | PascalCase | `AccountTransferWorkflow` |
248+
| Parameter names | snake_case | `from_account`, `to_account` |
249+
| Parameters with units | Include unit | `timeout_seconds`, `amount` |
255250

256251
### Security Guidelines
257252

@@ -271,3 +266,17 @@ The `purpose` field is your AI assistant's window into understanding what each w
271266
3. **Improved Debugging** - Clear descriptions help identify issues when workflows don't behave as expected
272267
4. **Better Developer Experience** - New team members can understand your system more quickly
273268
5. **Documentation As Code** - Purpose fields serve as living documentation that stays in sync with the codebase
269+
270+
## Contribute & Collaborate
271+
272+
We're building this together.
273+
- Share your own workflow configs
274+
- Improve descriptions
275+
- Share your demos (video or GIF) in issues
276+
277+
Let's unleash the power of AI and Temporal together!
278+
279+
## 📜 License
280+
281+
This project is licensed under the MIT License - see the LICENSE file for details.
282+
Contributions welcome!

0 commit comments

Comments
 (0)