---
title: Using MCP Tools
description: Connect external tools and services using the Model Context Protocol
---

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

The Model Context Protocol ([MCP](https://modelcontextprotocol.com/)) allows you to connect external tools and services using a standardized protocol, enabling you to integrate APIs and services directly into your workflows. With MCP, you can extend Sim's capabilities by adding custom integrations that work seamlessly with your agents and workflows.

## What is MCP?

MCP is an open standard that enables AI assistants to securely connect to external data sources and tools. It provides a standardized way to:

- Connect to databases, APIs, and file systems
- Access real-time data from external services
- Execute custom tools and scripts
- Maintain secure, controlled access to external resources

## Configuring MCP Servers

MCP servers provide collections of tools that your agents can use. Configure them in workspace settings:

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

1. Navigate to your workspace settings
2. Go to the **MCP Servers** section
3. Click **Add MCP Server**
4. Enter the server configuration details
5. Save the configuration

<Callout type="info">
You can also configure MCP servers directly from the toolbar in an Agent block for quick setup.
</Callout>

### Refresh Tools

Click **Refresh** on a server to fetch the latest tool schemas and automatically update any agent blocks using those tools with the new parameter definitions.

## Using MCP Tools in Agents

Once MCP servers are configured, their tools become available within your agent blocks:

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-2.png"
    alt="Using MCP Tool in Agent Block"
    width={700}
    height={450}
    className="my-6"
  />
</div>

1. Open an **Agent** block
2. In the **Tools** section, you'll see available MCP tools
3. Select the tools you want the agent to use
4. The agent can now access these tools during execution

## Standalone MCP Tool Block

For more granular control, you can use the dedicated MCP Tool block to execute specific MCP tools:

<div className="flex justify-center">
  <Image
    src="/static/blocks/mcp-3.png"
    alt="Standalone MCP Tool Block"
    width={700}
    height={450}
    className="my-6"
  />
</div>

The MCP Tool block allows you to:
- Execute any configured MCP tool directly
- Pass specific parameters to the tool
- Use the tool's output in subsequent workflow steps
- Chain multiple MCP tools together

### When to Use MCP Tool vs Agent

**Use Agent with MCP tools when:**
- You want the AI to decide which tools to use
- You need complex reasoning about when and how to use tools
- You want natural language interaction with the tools

**Use MCP Tool block when:**
- You need deterministic tool execution
- You want to execute a specific tool with known parameters
- You're building structured workflows with predictable steps

## Permission Requirements

MCP functionality requires specific workspace permissions:

| Action | Required Permission |
|--------|-------------------|
| Create or update MCP servers | **Write** or **Admin** |
| Delete MCP servers | **Admin** |
| Use MCP tools in agents | **Write** or **Admin** |
| View available MCP tools | **Read**, **Write**, or **Admin** |
| Execute MCP Tool blocks | **Read**, **Write**, or **Admin** |

## Common Use Cases

### Database Integration
Connect to databases to query, insert, or update data within your workflows.

### API Integrations
Access external APIs and web services that don't have built-in Sim integrations.

### File System Access
Read, write, and manipulate files on local or remote file systems.

### Custom Business Logic
Execute custom scripts or tools specific to your organization's needs.

### Real-time Data Access
Fetch live data from external systems during workflow execution.

## Security Considerations

- MCP servers run with the permissions of the user who configured them
- Always verify MCP server sources before installation
- Use environment variables for sensitive configuration data
- Review MCP server capabilities before granting access to agents

## Troubleshooting

### MCP Server Not Appearing
- Verify the server configuration is correct
- Check that you have the required permissions
- Ensure the MCP server is running and accessible

### Tool Execution Failures
- Verify tool parameters are correctly formatted
- Check MCP server logs for error messages
- Ensure required authentication is configured

### Permission Errors
- Confirm your workspace permission level
- Check if the MCP server requires additional authentication
- Verify the server is properly configured for your workspace

import { FAQ } from '@/components/ui/faq'

<FAQ items={[
  { question: "What is the difference between using MCP tools in an Agent block vs. the standalone MCP Tool block?", answer: "When you add MCP tools to an Agent block, the AI decides which tools to use based on the conversation context and its reasoning. This is best for dynamic, conversational workflows. The standalone MCP Tool block executes a specific tool with explicit parameters every time, giving you deterministic, predictable execution. Use Agent blocks for flexible reasoning and MCP Tool blocks for structured, repeatable steps." },
  { question: "Who can configure MCP servers in a workspace?", answer: "Users with Write permission can configure (add and update) MCP servers in workspace settings. Only Admin permission is required to delete MCP servers. Users with Read permission can view available MCP tools and execute them in agents and MCP Tool blocks. This means all workspace members with at least Read access can use MCP tools in their workflows." },
  { question: "Can I use MCP servers from multiple workspaces?", answer: "MCP servers are configured per workspace. Each workspace maintains its own set of MCP server connections. If you need the same MCP server in multiple workspaces, you need to configure it separately in each workspace's settings." },
  { question: "How do I update MCP tool schemas after a server changes its available tools?", answer: "Click the Refresh button on the MCP server in your workspace settings. This fetches the latest tool schemas from the server and automatically updates any agent blocks that use those tools with the new parameter definitions." },
  { question: "Can permission groups restrict access to MCP tools?", answer: "Yes. Organization admins can create permission groups that disable MCP tools for specific members using the disableMcpTools configuration option. When this is enabled, affected users will not be able to add or use MCP tools in their workflows." },
  { question: "What happens if an MCP server goes offline during workflow execution?", answer: "If the MCP server is unreachable during execution, the tool call will fail and return an error. In an Agent block, the AI may attempt to handle the failure gracefully. In a standalone MCP Tool block, the workflow step will fail. Check MCP server logs and verify the server is running and accessible to troubleshoot connectivity issues." },
]} />