@@ -152,6 +152,81 @@ uv run client.py
152152uv run client.py --custom-fastmcp-settings
153153```
154154
155+ ### [ Beta] Deploying to mcp-agent cloud
156+
157+ You can deploy your MCP-Agent app as a hosted mcp-agent app in the Cloud.
158+
159+ 1 . Update the * mcp_agent.secrets.yaml* file specifying deployed secrets:
160+
161+ ```
162+ openai:
163+ api_key: !developer_secret
164+
165+ anthropic:
166+ api_key: !developer_secret
167+ ```
168+
169+ 2 . In your terminal, authenticate into mcp-agent cloud by running:
170+ ```
171+ uv run mcp-agent login
172+ ```
173+
174+ 3 . You will be redirected to the login page, create an mcp-agent cloud account through Google or Github
175+
176+ 4 . Set up your mcp-agent cloud API Key and copy & paste it into your terminal
177+
178+ ```
179+ andrew_lm@Mac sdk-cloud % uv run mcp-agent login
180+ INFO: Directing to MCP Agent Cloud API login...
181+ Please enter your API key 🔑:
182+ ```
183+
184+ 5 . In your terminal, deploy the MCP app:
185+ ```
186+ uv run mcp-agent deploy mcp_agent_server -c /absolute/path/to/your/project
187+ ```
188+
189+ 6 . In the terminal, ou will then be prompted to specify your OpenAI and/or Anthropic keys:
190+
191+ Once the deployment is successful, you should see the following:
192+ ```
193+ andrew_lm@Mac sdk-cloud % uv run mcp-agent deploy basic_agent_server -c /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/
194+ ╭─────────────────────────────────────────────────── MCP Agent Deployment ────────────────────────────────────────────────────╮
195+ │ Configuration: /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/mcp_agent.config.yaml │
196+ │ Secrets file: /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/mcp_agent.secrets.yaml │
197+ │ Mode: DEPLOY │
198+ ╰──────────────────────────────────────────────────────── LastMile AI ────────────────────────────────────────────────────────╯
199+ INFO: Using API at https://mcp-agent.com/api
200+ INFO: Checking for existing app ID for 'basic_agent_server'...
201+ SUCCESS: Found existing app with ID: app_dd3a033d-4f4b-4e33-b82c-aad9ec43c52f for name 'basic_agent_server'
202+ INFO: Processing secrets file...
203+ INFO: Found existing transformed secrets to use where applicable:
204+ /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/mcp_agent.deployed.secrets.yaml
205+ INFO: Loaded existing secrets configuration for reuse
206+ INFO: Reusing existing developer secret handle at 'openai.api_key': mcpac_sc_83d412fd-083e-4174-89b4-ecebb1e4cae9
207+ INFO: Transformed config written to /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/mcp_agent.deployed.secrets.yaml
208+
209+ Secrets Processing Summary
210+ ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
211+ ┃ Type ┃ Path ┃ Handle/Status ┃ Source ┃
212+ ┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
213+ │ Developer │ openai.api_key │ mcpac_sc...b1e4qwe9 │ ♻️ Reused │
214+ └───────────┴────────────────┴─────────────────────┴──────────┘
215+
216+ Summary: 0 new secrets created, 1 existing secrets reused
217+ SUCCESS: Secrets file processed successfully
218+ INFO: Transformed secrets file written to /Users/andrew_lm/Documents/GitHub/mcp-agent/examples/mcp_agent_server/asyncio/mcp_agent.deployed.secrets.yaml
219+ ╭───────────────────────────────────────── Deployment Ready ───────────────────────────────────────────────╮
220+ │ Ready to deploy MCP Agent with processed configuration │
221+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
222+ WARNING: Found a __main__ entrypoint in main.py. This will be ignored in the deployment.
223+ ▰▰▰▰▰▰▱ ✅ Bundled successfully
224+ ▹▹▹▹▹ Deploying MCP App bundle...INFO: App ID: app_ddde033d-21as-fe3s-b82c-aaae4243c52f
225+ INFO: App URL: https://770xdsp22y321prwv9rasdfasd9l5zj5.deployments.mcp-agent-cloud.lastmileai.dev
226+ INFO: App Status: OFFLINE
227+ ▹▹▹▹▹ ✅ MCP App deployed successfully!
228+ ```
229+
155230## Receiving Server Logs in the Client
156231
157232The server advertises the ` logging ` capability (via ` logging/setLevel ` ) and forwards its structured logs upstream using ` notifications/message ` . To receive these logs in a client session, pass a ` logging_callback ` when constructing the client session and set the desired level:
0 commit comments