Temporal Workflow Orchestration
STDIOMCP server that bridges AI assistants and Temporal workflows for complex backend orchestration.
MCP server that bridges AI assistants and Temporal workflows for complex backend orchestration.
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.
Get Claude (or similar MCP-enabled AI assistant) talking to your workflows in 5 easy steps:
git clone https://github.com/Mocksi/temporal-mcp.git cd temporal-mcp make build
config.yml
The sample configuration (config.sample.yml
) is designed to work with the Temporal Money Transfer Demo:workflows: AccountTransferWorkflow: purpose: "Transfers money between accounts with validation and notification. Handles the happy path scenario where everything works as expected." input: type: "TransferInput" fields: - from_account: "Source account ID" - to_account: "Destination account ID" - amount: "Amount to transfer" output: type: "TransferOutput" description: "Transfer confirmation with charge ID" taskQueue: "account-transfer-queue" AccountTransferWorkflowScenarios: purpose: "Extended account transfer workflow with various scenarios including human approval, recoverable failures, and advanced visibility features." input: type: "TransferInput" fields: - from_account: "Source account ID" - to_account: "Destination account ID" - amount: "Amount to transfer" - scenario_type: "Type of scenario to execute (human_approval, recoverable_failure, advanced_visibility)" output: type: "TransferOutput" description: "Transfer confirmation with charge ID" taskQueue: "account-transfer-queue"
cd examples ./generate_claude_config.sh
cp examples/claude_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json
Now for the magic part! Talk to your workflows through Claude using natural language:
💬 "Claude, can you transfer $100 from account ABC123 to account XYZ789?"
💬 "What transfer scenarios are available to test?"
💬 "Execute a transfer that requires human approval for $500 between accounts ABC123 and XYZ789"
💬 "Has the transfer workflow completed yet?"
💬 "Run a transfer scenario with recoverable failures to test error handling"
Behind the scenes, Temporal MCP translates these natural language requests into properly formatted workflow executions—no more complex API calls or parameter formatting!
Lights, camera, action—capture your first AI-driven workflow in motion. Share that moment. Inspire others to see Temporal MCP in action.
./
├── cmd/ # Entry points for executables
├── internal/ # Internal package code
│ ├── api/ # MCP API implementation
│ ├── cache/ # Caching layer
│ ├── config/ # Configuration management
│ └── temporal/ # Temporal client integration
├── examples/ # Example configurations and scripts
└── docs/ # Documentation
Command | Description |
---|---|
make build | Builds the binary in ./bin |
make test | Runs all unit tests |
make fmt | Formats code according to Go standards |
make run | Builds and runs the server |
make clean | Removes build artifacts |
Connection Refused
Workflow Not Found
Claude Can't See Workflows
The heart of Temporal MCP is its configuration file, which connects your AI assistants to your workflow engine:
Your config.yml
consists of three key sections:
The sample configuration is designed to work with the Temporal Money Transfer Demo:
# Temporal server connection details temporal: hostPort: "localhost:7233" # Your Temporal server address namespace: "default" # Temporal namespace environment: "local" # "local" or "remote" defaultTaskQueue: "account-transfer-queue" # Default task queue for workflows # Fine-tune connection behavior timeout: "5s" # Connection timeout retryOptions: # Robust retry settings initialInterval: "100ms" # Start with quick retries maximumInterval: "10s" # Max wait between retries maximumAttempts: 5 # Don't try forever backoffCoefficient: 2.0 # Exponential backoff # Define AI-discoverable workflows workflows: AccountTransferWorkflow: purpose: "Transfers money between accounts with validation and notification. Handles the happy path scenario where everything works as expected." workflowIDRecipe: "transfer_{{.from_account}}_{{.to_account}}_{{.amount}}" input: type: "TransferInput" fields: - from_account: "Source account ID" - to_account: "Destination account ID" - amount: "Amount to transfer" output: type: "TransferOutput" description: "Transfer confirmation with charge ID" taskQueue: "account-transfer-queue" activities: - name: "validate" timeout: "5s" - name: "withdraw" timeout: "5s" - name: "deposit" timeout: "5s" - name: "sendNotification" timeout: "5s" - name: "undoWithdraw" timeout: "5s"
💡 Pro Tip: The sample configuration is pre-configured to work with the Temporal Money Transfer Demo. Use it as a starting point for your own workflows.
The purpose
field is your AI assistant's window into understanding what each workflow does. Make it count!
Before: "Gets information about a file."
After: "Retrieves detailed metadata about a file or directory including size, creation time, last modified time, permissions, and type. Performs access validation to ensure the requested file is within allowed directories. Returns formatted JSON with all attributes or an appropriate error message."
Item | Convention | Example |
---|---|---|
Workflow IDs | PascalCase | AccountTransferWorkflow |
Parameter names | snake_case | from_account , to_account |
Parameters with units | Include unit | timeout_seconds , amount |
⚠️ Important Security Notes:
💡 Tip: Create different configurations for development and production environments
We're building this together.
Let's unleash the power of AI and Temporal together!
This project is licensed under the MIT License - see the LICENSE file for details. Contributions welcome!