Skip to main content
Cloud deployments turn every tool decorator and workflow definition into a first-class MCP endpoint. This page explains how each decorator maps onto the managed runtime, how Temporal keeps work durable, and how to observe long-running runs in production. Temporal workflow execution timeline for an mcp-agent deployment

Three building blocks

All three share the same contextual features:
  • Access to context.server_registry, context.logger, and configured MCP servers.
  • agent.attach_llm(...) to work with Augmented LLMs.
  • Token counting when tracing is enabled.
  • Human input via await context.request_human_input(...).

Example: synchronous vs async tool

Callers experience:

Workflow classes

For intricate flows you can define a workflow class with reusable steps, activities, and signals. This pattern gives you access to the full Temporal API (signals, queries, child workflows, timers).
Temporal executes each @app.task as an activity. Tasks can run in parallel, include retries/backoff, or call await self.context.request_human_input(...) to pause.

Monitoring and control

Use the workflow commands to introspect long-running operations:
Logs and traces remain available while the workflow executes:
  • mcp-agent cloud logger tail app_abc123 --follow
  • Configure OTEL exporters in mcp_agent.config.yaml or via mcp-agent cloud logger configure.
  • Temporal metadata (start time, attempt count, memo fields) is surfaced in workflows describe.

Best practices

Anything that might exceed the default request timeout for clients should be an async tool. Claude Desktop and Cursor expect quick responses; returning {run_id} lets them switch to a progress UI.
Use context.logger.info for status updates and context.signal_notification (custom signals) if you need to push progress to the caller. Future versions will surface these in the console.
await context.request_human_input(prompt="...") pauses the workflow and stores state in Temporal. Users resume via mcp-agent cloud workflows resume … --payload.
Attach lightweight metadata (WorkflowResult(metadata=...)) to make filtering easier (--status, custom reports). Memo values show up in workflows runs.
Set unique temporal.task_queue values per application to control worker placement and concurrency. For large deployments you can run additional workers using mcp-agent cloud app workers.

Further reading