Skip to content

Latest commit

 

History

History
230 lines (175 loc) · 8.51 KB

File metadata and controls

230 lines (175 loc) · 8.51 KB
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:

  1. Navigate to Settings → MCP Servers
MCP Servers settings page
  1. Click Add
  2. Enter a name and optional description
  3. Choose access: API Key (private, requires X-API-Key header) or Public (no authentication)
  4. Optionally select deployed workflows to add as tools immediately
Add New MCP Server modal
  1. Click Add Server
  2. Click Details to view the MCP server
MCP Server details view
  1. Copy the server URL for use in your MCP clients
  2. 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:

  1. Open your deployed workflow
  2. Click Deploy and go to the MCP tab
Workflow Deployment MCP tab
  1. Configure the tool name and description (the description defaults to the workflow's description)
  2. Review the parameter descriptions (prefilled from your Start block inputs) and override any per tool
  3. Select which MCP servers to add it to
  4. Click Save Tool
The workflow must be deployed before it can be added as an MCP tool.

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.

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.

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
MCP client configuration panel

Cursor

Cursor supports direct URL configuration. Add to your Cursor MCP settings (.cursor/mcp.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:

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):

{
  "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):

{
  "mcpServers": {
    "my-sim-workflows": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "YOUR_SERVER_URL", "--header", "X-API-Key:$SIM_API_KEY"]
    }
  }
}
For public servers, omit the `X-API-Key` header and `--header` arguments. Public servers don't require authentication. `$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.

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." }, ]} />