|
| 1 | +--- |
| 2 | +title: Deploy Workflows as MCP |
| 3 | +description: Expose your workflows as MCP tools for external AI assistants and applications |
| 4 | +--- |
| 5 | + |
| 6 | +import { Video } from '@/components/ui/video' |
| 7 | +import { Callout } from 'fumadocs-ui/components/callout' |
| 8 | + |
| 9 | +Deploy your workflows as MCP tools to make them accessible to external AI assistants like Claude Desktop, Cursor, and other MCP-compatible clients. This turns your workflows into callable tools that can be invoked from anywhere. |
| 10 | + |
| 11 | +## Creating and Managing MCP Servers |
| 12 | + |
| 13 | +MCP servers group your workflow tools together. Create and manage them in workspace settings: |
| 14 | + |
| 15 | +<div className="mx-auto w-full overflow-hidden rounded-lg"> |
| 16 | + <Video src="static/mcp/mcp-server.mov" width={700} height={450} /> |
| 17 | +</div> |
| 18 | + |
| 19 | +1. Navigate to **Settings → MCP Servers** |
| 20 | +2. Click **Create Server** |
| 21 | +3. Enter a name and optional description |
| 22 | +4. Copy the server URL for use in your MCP clients |
| 23 | +5. View and manage all tools added to the server |
| 24 | + |
| 25 | +## Adding a Workflow as a Tool |
| 26 | + |
| 27 | +Once your workflow is deployed, you can expose it as an MCP tool: |
| 28 | + |
| 29 | +<div className="mx-auto w-full overflow-hidden rounded-lg"> |
| 30 | + <Video src="static/mcp/mcp-deploy-tool.mov" width={700} height={450} /> |
| 31 | +</div> |
| 32 | + |
| 33 | +1. Open your deployed workflow |
| 34 | +2. Click **Deploy** and go to the **MCP** tab |
| 35 | +3. Configure the tool name and description |
| 36 | +4. Add descriptions for each parameter (helps AI understand inputs) |
| 37 | +5. Select which MCP servers to add it to |
| 38 | + |
| 39 | +<Callout type="info"> |
| 40 | +The workflow must be deployed before it can be added as an MCP tool. |
| 41 | +</Callout> |
| 42 | + |
| 43 | +## Tool Configuration |
| 44 | + |
| 45 | +### Tool Name |
| 46 | +Use lowercase letters, numbers, and underscores. The name should be descriptive and follow MCP naming conventions (e.g., `search_documents`, `send_email`). |
| 47 | + |
| 48 | +### Description |
| 49 | +Write a clear description of what the tool does. This helps AI assistants understand when to use the tool. |
| 50 | + |
| 51 | +### Parameters |
| 52 | +Your workflow's input format fields become tool parameters. Add descriptions to each parameter to help AI assistants provide correct values. |
| 53 | + |
| 54 | +## Connecting MCP Clients |
| 55 | + |
| 56 | +Use the server URL from settings to connect external applications: |
| 57 | + |
| 58 | +### Claude Desktop |
| 59 | +Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`): |
| 60 | + |
| 61 | +```json |
| 62 | +{ |
| 63 | + "mcpServers": { |
| 64 | + "my-sim-workflows": { |
| 65 | + "command": "npx", |
| 66 | + "args": ["-y", "mcp-remote", "YOUR_SERVER_URL"] |
| 67 | + } |
| 68 | + } |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +### Cursor |
| 73 | +Add the server URL in Cursor's MCP settings using the same mcp-remote pattern. |
| 74 | + |
| 75 | +<Callout type="warn"> |
| 76 | +Include your API key header (`X-API-Key`) for authenticated access when using mcp-remote or other HTTP-based MCP transports. |
| 77 | +</Callout> |
| 78 | + |
| 79 | +## Server Management |
| 80 | + |
| 81 | +From the server detail view in **Settings → MCP Servers**, you can: |
| 82 | + |
| 83 | +- **View tools**: See all workflows added to a server |
| 84 | +- **Copy URL**: Get the server URL for MCP clients |
| 85 | +- **Add workflows**: Add more deployed workflows as tools |
| 86 | +- **Remove tools**: Remove workflows from the server |
| 87 | +- **Delete server**: Remove the entire server and all its tools |
| 88 | + |
| 89 | +## How It Works |
| 90 | + |
| 91 | +When an MCP client calls your tool: |
| 92 | + |
| 93 | +1. The request is received at your MCP server URL |
| 94 | +2. Sim validates the request and maps parameters to workflow inputs |
| 95 | +3. The deployed workflow executes with the provided inputs |
| 96 | +4. Results are returned to the MCP client |
| 97 | + |
| 98 | +Workflows execute using the same deployment version as API calls, ensuring consistent behavior. |
| 99 | + |
| 100 | +## Permission Requirements |
| 101 | + |
| 102 | +| Action | Required Permission | |
| 103 | +|--------|-------------------| |
| 104 | +| Create MCP servers | **Admin** | |
| 105 | +| Add workflows to servers | **Write** or **Admin** | |
| 106 | +| View MCP servers | **Read**, **Write**, or **Admin** | |
| 107 | +| Delete MCP servers | **Admin** | |
| 108 | + |
0 commit comments