Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 67 additions & 37 deletions docs/cloud/agent-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,41 @@ When you expose an agent as an MCP server, the framework:
3. Provides standard workflow management tools
4. Handles protocol communication

## Default MCP Tools
## Tools via Decorators

### @app.tool - Synchronous Tools

Synchronous tools execute immediately and return results:

```python
@app.tool
def calculate_sum(a: int, b: int) -> int:
"""Add two numbers together."""
return a + b
```

This creates a single MCP tool `calculate_sum` that executes synchronously.

### @app.async_tool - Asynchronous Tools

Asynchronous tools run as durable workflows:

```python
@app.async_tool
async def research_topic(topic: str) -> str:
"""Research a topic using multiple sources."""
# Long-running research operation
results = await gather_information(topic)
return results
```

This creates:
- `research_topic`: Starts the workflow
- Status tracking via `workflows-get_status`
- Cancellation via `workflows-cancel`


## Built-in MCP Tools

Every agent server automatically provides these workflow management tools:

Expand Down Expand Up @@ -79,39 +113,6 @@ Cancels a running workflow instance.
- `run_id`: The run instance ID
- `workflow_name`: Workflow identifier

## Custom Tools via Decorators

### @app.tool - Synchronous Tools

Synchronous tools execute immediately and return results:

```python
@app.tool
def calculate_sum(a: int, b: int) -> int:
"""Add two numbers together."""
return a + b
```

This creates a single MCP tool `calculate_sum` that executes synchronously.

### @app.async_tool - Asynchronous Tools

Asynchronous tools run as durable workflows:

```python
@app.async_tool
async def research_topic(topic: str) -> str:
"""Research a topic using multiple sources."""
# Long-running research operation
results = await gather_information(topic)
return results
```

This creates:
- `research_topic`: Starts the workflow
- Status tracking via `workflows-get_status`
- Cancellation via `workflows-cancel`

## Server Configuration

### Basic Setup
Expand Down Expand Up @@ -145,13 +146,25 @@ uv run mcp-agent serve --app my_agent:app
uv run mcp-agent serve --app my_agent:app --transport sse
```

#### Deploying to **mcp-agent cloud**
Update your secrets
```yaml mcp_agent.secrets.yaml
openai:
api_key: !developer_secret
```

```bash
uv run mcp-agent login
uv run mcp-agent deploy my_agent
```

## Client Configuration

### Claude Desktop

Add to `claude_desktop_config.json`:
For local mcp servers, add to `claude_desktop_config.json`:

```json
```json claude_desktop_config.json
{
"mcpServers": {
"my-agent": {
Expand All @@ -162,6 +175,23 @@ Add to `claude_desktop_config.json`:
}
```

For **mcp-agent cloud**, add to `claude_desktop_config.json`:

```json claude_desktop_config.json
"my_agent": {
"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"
}
}
```

### Programmatic Access

```python
Expand Down Expand Up @@ -301,4 +331,4 @@ def process_data(

- [Configuration Guide](/configuration)
- [Workflow Patterns](/workflows/overview)
- [Cloud Deployment](/cloud/getting-started)
- [Cloud Deployment](/cloud/getting-started)
15 changes: 7 additions & 8 deletions docs/cloud/deploying-mcp-servers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: "Deploy standard MCP servers to MCP Agent Cloud infrastructure"

## Overview

MCP Agent Cloud can deploy both AI agents **and** standard MCP servers. Since agents deployed to MCP Agent Cloud are exposed as MCP servers themselves, the platform naturally supports deploying any MCP-compatible server implementation.
**mcp-agent cloud** can deploy both AI agents **and** standard MCP servers. Since agents deployed to **mcp-agent cloud** are exposed as MCP servers themselves, the platform naturally supports deploying any MCP-compatible server implementation.

This means you can use MCP Agent Cloud to:
This means you can use **mcp-agent cloud** to:
- Deploy regular MCP servers built with FastMCP or other frameworks
- Host tool servers that don't use AI workflows
- Deploy resource servers for data access
Expand Down Expand Up @@ -44,7 +44,7 @@ async def current_weather_resource():
"""Provide current weather data."""
return {"temperature": 72, "condition": "sunny"}

# Deploy with MCP Agent Cloud
# Deploy with mcp-agent cloud
# mcp-agent deploy my-weather-server
```

Expand Down Expand Up @@ -168,7 +168,7 @@ async def create_ticket(title: str, description: str) -> dict:
The deployment process is identical whether you're deploying a simple MCP server or a full agent:

```bash
# 1. Authenticate with MCP Agent Cloud
# 1. Authenticate with mcp-agent cloud
mcp-agent cloud auth login

# 2. Deploy your server
Expand All @@ -181,18 +181,17 @@ mcp-agent cloud servers describe <deployment-id>
mcp-agent configure <server-url> --client claude
```

## Benefits of Using MCP Agent Cloud
## Benefits of Using **mcp-agent cloud**

Even for simple MCP servers, MCP Agent Cloud provides:
Even for simple MCP servers, **mcp-agent cloud** provides:

### Infrastructure Management
- Automatic SSL/TLS termination
- Load balancing and auto-scaling
- Regional deployment options
- High availability

### Security
- Secure secrets management via Vault
- Secure secrets management
- Authentication and authorization
- End-to-end encryption
- Audit logging
Expand Down
21 changes: 11 additions & 10 deletions docs/cloud/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Getting Started with MCP Agent Cloud
title: Getting Started with mcp-agent cloud
description: "Deploy your first agent to the cloud in under 5 minutes"
---

<Info>
MCP Agent Cloud is currently in open beta. Follow the instructions below to get started. For feedback, issues and feature requests, visit https://github.com/lastmile-ai/mcp-agent/issues or join our Discord at https://lmai.link/discord/mcp-agent.
mcp-agent cloud is currently in open beta. Follow the instructions below to get started. For feedback, issues and feature requests, visit our [github issues](https://github.com/lastmile-ai/mcp-agent/issues) or join [our Discord](https://lmai.link/discord/mcp-agent).
</Info>

## Prerequisites
Expand All @@ -31,7 +31,7 @@ Before you begin, make sure you have:

<Steps>
<Step title="Authenticate">
Log in to MCP Agent Cloud:
Log in to **mcp-agent cloud**:

```bash
mcp-agent login
Expand All @@ -44,7 +44,7 @@ Before you begin, make sure you have:
Ensure your project has the required configuration files:

```yaml mcp_agent.config.yaml
execution_engine: temporal # Cloud uses Temporal
execution_engine: temporal
logger:
transports: [console]
level: info
Expand All @@ -61,7 +61,9 @@ Before you begin, make sure you have:
default_model: gpt-4o
```

> [!IMPORTANT] Swap your api_key with !developer_secret to mark what keys will be saved as secrets within mcp-agent cloud.
<Note>
Swap your api_key with !developer_secret to mark what keys will be saved as secrets within mcp-agent cloud.
</Note>

```yaml mcp_agent.secrets.yaml
openai:
Expand All @@ -81,8 +83,8 @@ Before you begin, make sure you have:

The deployment process will:
1. Check for existing app with this name or create a new one
2. Process your secrets file (transforming !developer_secret tags to secure handles)
3. Bundle and upload your code using Wrangler
2. Process your secrets file (transforming `!developer_secret` tags to secure handles)
3. Bundle and upload your code
4. Deploy to MCP Agent Cloud's managed infrastructure

You'll see output like:
Expand Down Expand Up @@ -224,7 +226,7 @@ Your agent is now available as an MCP server. Here's how to use it:

Then add to your Claude Desktop config (`~/.claude-desktop/config.json`):

```json
```json .claude-desktop/config.json
{
"servers": {
"web-summarizer": {
Expand Down Expand Up @@ -334,8 +336,7 @@ MCP_API_KEY="your-key" mcp-agent deploy my-agent

MCP Agent Cloud securely handles secrets through the `mcp_agent.secrets.yaml` file:

```yaml
# mcp_agent.secrets.yaml
```yaml mcp_agent.secrets.yaml
openai:
api_key: !developer_secret # Will be stored securely

Expand Down
Loading
Loading