From ea58fbc97aa3817ac6c7b66772f87aae0f57ccc3 Mon Sep 17 00:00:00 2001 From: Andrew Hoh <129882602+andrew-lastmile@users.noreply.github.com> Date: Fri, 12 Sep 2025 00:35:18 -0400 Subject: [PATCH 1/2] Make workflow_orchestrator_worker cloud ready --- .../workflows/workflow_orchestrator_worker/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/workflows/workflow_orchestrator_worker/main.py b/examples/workflows/workflow_orchestrator_worker/main.py index 71f41c2f7..092057d72 100644 --- a/examples/workflows/workflow_orchestrator_worker/main.py +++ b/examples/workflows/workflow_orchestrator_worker/main.py @@ -89,8 +89,14 @@ app = MCPApp(name="assignment_grader_orchestrator") - -async def example_usage(): +@app.tool +async def example_usage()->str: + ''' + this example function/tool call will use an orchestrator workflow + to dynamically plan and execute across a number of agents to grade + a short story. + ''' + result="" async with app.run() as orchestrator_app: logger = orchestrator_app.logger @@ -177,6 +183,7 @@ async def example_usage(): summary = await orchestrator_app.get_token_summary() print(f"\nTotal Cost: ${summary.cost:.4f}") print("=" * 60) + return result def display_node_tree( From 6b5a008363c00f98ad8ca01539465938e1c419c5 Mon Sep 17 00:00:00 2001 From: Andrew Hoh <129882602+andrew-lastmile@users.noreply.github.com> Date: Fri, 12 Sep 2025 00:39:24 -0400 Subject: [PATCH 2/2] Updating README for MCP-Agent Cloud --- .../workflow_orchestrator_worker/README.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/examples/workflows/workflow_orchestrator_worker/README.md b/examples/workflows/workflow_orchestrator_worker/README.md index e623d98c3..25da21361 100644 --- a/examples/workflows/workflow_orchestrator_worker/README.md +++ b/examples/workflows/workflow_orchestrator_worker/README.md @@ -66,3 +66,68 @@ Run your MCP Agent app: ```bash uv run main.py ``` + + +## `4` [Beta] Deploy to the cloud + +### `a.` Log in to [MCP Agent Cloud](https://docs.mcp-agent.com/cloud/overview) + +```bash +uv run mcp-agent login +``` + +### `b.` Update your `mcp_agent.secrets.yaml` to mark your developer secrets (keys) + +```yaml +openai: + api_key: !developer_secret +anthropic: + api_key: !developer_secret +# Other secrets as needed +``` + +### `c.` Deploy your agent with a single command +```bash +uv run mcp-agent deploy workflow-orchestrator-server +``` + +### `d.` Connect to your deployed agent as an MCP server through any MCP client + +#### Claude Desktop Integration + +Configure Claude Desktop to access your agent servers by updating your `~/.claude-desktop/config.json`: + +```json +"my-agent-server": { + "command": "/path/to/npx", + "args": [ + "mcp-remote", + "https://[your-agent-server-id].deployments.mcp-agent-cloud.lastmileai.dev/sse", + "--header", + "Authorization: Bearer ${BEARER_TOKEN}" + ], + "env": { + "BEARER_TOKEN": "your-mcp-agent-cloud-api-token" + } +} +``` + +#### MCP Inspector + +Use MCP Inspector to explore and test your agent servers: + +```bash +npx @modelcontextprotocol/inspector +``` + +Make sure to fill out the following settings: + +| Setting | Value | +|---|---| +| *Transport Type* | *SSE* | +| *SSE* | *https://[your-agent-server-id].deployments.mcp-agent-cloud.lastmileai.dev/sse* | +| *Header Name* | *Authorization* | +| *Bearer Token* | *your-mcp-agent-cloud-api-token* | + +> [!TIP] +> In the Configuration, change the request timeout to a longer time period. Since your agents are making LLM calls, it is expected that it should take longer than simple API calls.