---
title: MCP deployment
description: Expose your workflows as MCP tools for external AI assistants and applications
---

import { Image } from '@/components/ui/image'
import { Video } from '@/components/ui/video'
import { Callout } from 'fumadocs-ui/components/callout'
import { FAQ } from '@/components/ui/faq'

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.

## Creating and Managing MCP Servers

MCP servers group your workflow tools together. Create and manage them in workspace settings:

<div className="mx-auto w-full overflow-hidden rounded-lg">
  <Video src="mcp/mcp-server.mp4" width={700} height={450} />
</div>

1. Navigate to **Settings → MCP Servers**

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-servers-settings.png"
    alt="MCP Servers settings page"
    width={700}
    height={450}
    className="my-6"
  />
</div>

2. Click **Add**
3. Enter a name and optional description
4. Choose access: **API Key** (private, requires `X-API-Key` header) or **Public** (no authentication)
5. Optionally select deployed workflows to add as tools immediately

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-server-add-modal.png"
    alt="Add New MCP Server modal"
    width={550}
    height={380}
    className="my-6"
  />
</div>

6. Click **Add Server**
7. Click **Details** to view the MCP server

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-server-details.png"
    alt="MCP Server details view"
    width={700}
    height={450}
    className="my-6"
  />
</div>

8. Copy the server URL for use in your MCP clients
9. View and manage all tools added to the server

## Adding a Workflow as a Tool

Once your workflow is deployed, you can expose it as an MCP tool:

<div className="mx-auto w-full overflow-hidden rounded-lg">
  <Video src="mcp/mcp-deploy-tool.mp4" width={700} height={450} />
</div>

1. Open your deployed workflow
2. Click **Deploy** and go to the **MCP** tab

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-deploy-modal.png"
    alt="Workflow Deployment MCP tab"
    width={380}
    height={470}
    className="my-6"
  />
</div>

3. Configure the tool name and description (the description defaults to the workflow's description)
4. Review the parameter descriptions (prefilled from your Start block inputs) and override any per tool
5. Select which MCP servers to add it to
6. Click **Save Tool**

<Callout type="info">
The workflow must be deployed before it can be added as an MCP tool.
</Callout>

## Tool Configuration

### Tool Name
Use lowercase letters, numbers, and underscores. The name should be descriptive and follow MCP naming conventions (e.g., `search_documents`, `send_email`).

### Description
Write a clear description of what the tool does. This helps AI assistants understand when to use the tool. If you leave it blank, the tool falls back to the workflow's description.

### Parameters
Your workflow's input format fields become tool parameters. Each parameter's description defaults to the description set on that input in the Start block; edit it here to override it for this tool (the Start block stays the default source). Descriptions help AI assistants provide correct values.

<Callout type="info">
Parameter descriptions live on your Start block inputs. A deployed tool picks up Start block changes the next time you redeploy the workflow; use a per-tool override only when a tool needs a different description than the default.
</Callout>

## Connecting MCP Clients

Sim generates a ready-to-paste configuration for every supported client. To get it:

1. Navigate to **Settings → MCP Servers**
2. Click **Details** on your server
3. Under **MCP Client**, select your client — **Cursor**, **Claude Code**, **Claude Desktop**, **VS Code**, or **Sim**
4. Copy the configuration, replacing `$SIM_API_KEY` with your Sim API key

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-client-config.png"
    alt="MCP client configuration panel"
    width={700}
    height={450}
    className="my-6"
  />
</div>

### Cursor

Cursor supports direct URL configuration. Add to your Cursor MCP settings (`.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "my-sim-workflows": {
      "url": "YOUR_SERVER_URL",
      "headers": { "X-API-Key": "$SIM_API_KEY" }
    }
  }
}
```

Cursor also provides a one-click install button in the server detail view.

### Claude Code

Run this command in your terminal:

```bash
claude mcp add "my-sim-workflows" --url "YOUR_SERVER_URL" --header "X-API-Key:$SIM_API_KEY"
```

### Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "my-sim-workflows": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "YOUR_SERVER_URL", "--header", "X-API-Key:$SIM_API_KEY"]
    }
  }
}
```

### VS Code

Add to your VS Code MCP settings (`.vscode/mcp.json`):

```json
{
  "mcpServers": {
    "my-sim-workflows": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "YOUR_SERVER_URL", "--header", "X-API-Key:$SIM_API_KEY"]
    }
  }
}
```

<Callout type="info">
For public servers, omit the `X-API-Key` header and `--header` arguments. Public servers don't require authentication.
</Callout>

<Callout type="warn">
`$SIM_API_KEY` is a placeholder. For Claude Desktop and VS Code configs, replace it with your actual API key since these clients don't expand environment variables in JSON config files. Claude Code and Cursor handle variable expansion natively.
</Callout>

## Server Management

From the server detail view in **Settings → MCP Servers**, you can:

- **View tools**: See all workflows added to a server
- **Copy URL**: Get the server URL for MCP clients
- **Add workflows**: Add more deployed workflows as tools
- **Remove tools**: Remove workflows from the server
- **Delete server**: Remove the entire server and all its tools

## How It Works

When an MCP client calls your tool:

1. The request is received at your MCP server URL
2. Sim validates the request and maps parameters to workflow inputs
3. The deployed workflow executes with the provided inputs
4. Results are returned to the MCP client

Workflows execute using the same deployment version as API calls, ensuring consistent behavior.

## Permission Requirements

| Action | Required Permission |
|--------|-------------------|
| Create MCP servers | **Write** or **Admin** |
| Add workflows to servers | **Write** or **Admin** |
| View MCP servers | **Read**, **Write**, or **Admin** |
| Delete MCP servers | **Admin** |

<FAQ items={[
  { question: "Does my workflow need to be deployed before adding it as an MCP tool?", answer: "Yes. Only deployed workflows can be added as MCP tools. The MCP tool executes the same deployment version as API calls, ensuring consistent behavior between both access methods." },
  { question: "What MCP protocol does Sim implement?", answer: "Sim implements the standard MCP protocol using the official @modelcontextprotocol/sdk types, supporting JSON-RPC 2.0 messages including tools/list and tools/call methods. It handles both requests and notifications per the MCP specification." },
  { question: "How do I authenticate MCP client connections?", answer: "Include your API key in the X-API-Key header when connecting via mcp-remote or other HTTP-based MCP transports. The server validates authentication using hybrid auth that supports both session-based and API key-based access." },
  { question: "Can I add the same workflow to multiple MCP servers?", answer: "Yes. When configuring a workflow as an MCP tool, you can select multiple MCP servers to add it to. Each server exposes its own URL, so you can organize tools into different servers for different use cases or clients." },
  { question: "What naming conventions should I follow for tool names?", answer: "Use lowercase letters, numbers, and underscores only. The name should be descriptive and follow MCP naming conventions, such as search_documents or send_email. This helps AI assistants understand and correctly invoke your tools." },
  { question: "How are workflow inputs mapped to MCP tool parameters?", answer: "Your workflow's input format fields automatically become MCP tool parameters. Each parameter's description defaults to the description set on that input in the Start block, and you can override it per tool in the MCP configuration to help AI assistants understand what values to provide." },
]} />


