> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sigmamind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tools Integration

The **MCP Tools Integration** allows you to connect your SigmaMind agents to any Model Context Protocol (MCP) server. This enables your agents to access dynamic tools from platforms like Zapier, Make, Composio, and custom MCP servers without individual API configuration for each tool.

## Overview

MCP (Model Context Protocol) is a standardized protocol for connecting AI agents to external services and tools. By integrating an MCP server with your SigmaMind agent, you can:

* **Access hundreds of pre-built tools** from MCP providers
* **Execute actions dynamically** during agent conversations
* **Avoid repetitive API configuration** for each tool
* **Scale your agent capabilities** instantly

### How MCP Tools Work

```
User Request → Agent → MCP Server → Tool Action → External Service → Response → Agent → User
```

When you add an MCP tool to your agent:

1. SigmaMind connects to the MCP server
2. Available tools from the server are fetched dynamically
3. Agent can invoke any of these tools during conversations
4. Results are returned to the agent and integrated into responses

## Quick Setup

Follow these steps to add an MCP tool to your agent:

### Step 1: Get Your MCP Server URL

Obtain an MCP server URL from your provider:

**Zapier MCP:**

* Visit: [https://mcp.zapier.com/mcp/?client=sigmamind](https://mcp.zapier.com/mcp/?client=sigmamind)
* Generate and copy your MCP server URL

**Make MCP:**

* Log in to Make account
* Go to: Profile > API Access > Tokens
* Click "Add token" and copy the MCP URL

**Composio MCP:**

* Log in to: [https://mcp.composio.dev/dashboard](https://mcp.composio.dev/dashboard)
* Select tools you want to integrate
* Create server and copy the generated URL

**Custom MCP Server:**

* Ensure your MCP server is running
* Obtain the server endpoint URL (e.g., [https://your-server.com/mcp](https://your-server.com/mcp))

### Step 2: Add MCP Tool in SigmaMind

1. Open **Agent Builder**
2. Click **Manage Tools/Apps**
3. Click **Add Custom Tool/App**
4. Enter:
   * **Tool/App name**: "Zapier Integration" (or your provider name)
   * **Description**: "Access to MCP tools from Zapier"
5. Click **Submit Tool/App**

### Step 3: Configure Authentication

1. Click the newly created MCP tool
2. Click **Configure Authentication**
3. Select **Bearer Token** (most common for MCP servers)
4. Paste your MCP server URL as the token
5. Click **Submit Authentication**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/sigmamindai/images/mcp-auth.png" alt="MCP Authentication" />
</Frame>

### Step 4: Add Tool Actions

MCP servers expose tools dynamically. Rather than adding individual actions, the MCP server provides them automatically. However, you can test tool availability:

1. Click **Add Tool Actions**
2. Enter test values to verify connectivity
3. The MCP server responds with available tools

### Step 5: Add to Your Agent

1. Open your agent in **Agent Builder**
2. Click **Add Tool/Function Calls**
3. Select **App Tool Call**
4. Select your MCP tool from the list
5. Click **Submit**

Your agent now has access to all tools from the MCP server!

## Supported MCP Providers

### Zapier MCP

**7,000+ apps and 30,000+ actions**

Zapier's MCP server provides access to thousands of pre-built integrations. Setup:

1. Visit [https://mcp.zapier.com/mcp/?client=sigmamind](https://mcp.zapier.com/mcp/?client=sigmamind)
2. Generate your MCP server URL
3. Add to SigmaMind as MCP tool with Bearer Token authentication
4. Your agent instantly has access to Zapier's full ecosystem

**Available actions include:**

* Send emails
* Create calendar events
* Post to social media
* Update spreadsheets
* And thousands more

### Make MCP

**Custom Scenarios & Workflows**

Make allows you to build custom automations and expose them as MCP tools. Setup:

1. Create your scenarios in Make with defined inputs/outputs
2. Set scenarios to "Schedule on Demand"
3. Get your MCP Token from Profile > API Access > Tokens
4. Add to SigmaMind as MCP tool with Bearer Token authentication

**Use cases:**

* Custom business logic automation
* Multi-app workflows
* Data processing pipelines
* Scheduled tasks triggered by agents

### Composio MCP

**Popular Tool Integrations**

Composio provides pre-built connections to tools like Gmail, Slack, GitHub, Notion, and more. Setup:

1. Log in to [https://mcp.composio.dev/dashboard](https://mcp.composio.dev/dashboard)
2. Select tools you want to integrate (Gmail, Slack, etc.)
3. Complete authentication flows
4. Create server and copy the MCP server URL
5. Add to SigmaMind as MCP tool with Bearer Token authentication

**Supported integrations:**

* Gmail, Outlook (email)
* Slack, Teams (messaging)
* GitHub, GitLab (code)
* Notion, Asana (productivity)
* And many more

### Custom MCP Servers

You can build and deploy your own MCP server to expose custom tools. Setup:

1. Deploy your MCP server and ensure it's accessible
2. Obtain the server endpoint URL
3. Add to SigmaMind as MCP tool
4. Configure any required authentication headers

## Configuration

### Basic MCP Tool Configuration

In the **Manage Tools/Apps** section, configure your MCP tool:

**Tool Setup:**

| Field               | Value                  |
| ------------------- | ---------------------- |
| Tool/App name       | Zapier Integration     |
| Description         | Access to Zapier tools |
| Authentication Type | Bearer Token           |
| Token               | Your MCP server URL    |

### Agent System Prompt

Include guidance in your agent's system prompt about MCP tools:

```
You have access to various integrated tools and services through Zapier and other platforms.

Available capabilities:
- Send emails and messages
- Create and manage calendar events
- Update documents and spreadsheets
- Post to social media
- Manage customer data
- Execute custom automations

When users request actions that require these tools:
1. Determine which tool is appropriate
2. Extract necessary information from the user request
3. Execute the tool with correct parameters
4. Confirm the action was completed
5. If tool fails, explain the issue and suggest alternatives
```

## How MCP Tools Execute

### Execution Flow

When your agent decides to use an MCP tool:

1. **Tool Selection** - Agent determines the appropriate MCP tool for the user's request
2. **Parameter Extraction** - Agent extracts values from conversation context
3. **Server Connection** - SigmaMind connects to the MCP server using your URL
4. **Tool Invocation** - MCP server invokes the requested tool with parameters
5. **Result Processing** - Results are returned to the agent
6. **Response Generation** - Agent incorporates results into its response to the user

### Request Headers

MCP requests include context headers for tracking:

* **X-Call-Id** - Included in voice calls to identify the specific call
* **X-Chat-Id** - Included in chat interactions to identify the chat
* **X-Session-Id** - Included if the chat is part of a session

These headers help track which agent interaction triggered each MCP tool invocation.

## Best Practices

### Security

* Treat MCP server URLs as sensitive credentials
* Store URLs in environment variables, never in code
* Regularly rotate API tokens from MCP providers
* Use HTTPS for all MCP connections

### Agent Instructions

* **Clear Prompts**: Tell your agent when and how to use MCP tools
* **Error Handling**: Include fallback instructions if tools fail
* **Confirmation**: For critical actions, have the agent confirm with users first
* **Transparency**: Inform users which tools are being used

### Performance

* **Test First**: Verify MCP tools work with test requests
* **Monitor Usage**: Track which tools are used and how often
* **Handle Delays**: Be aware MCP calls may take 2-5 seconds
* **Rate Limits**: Check rate limits on MCP provider accounts

## Troubleshooting

### MCP Tool Not Available

**Problem:** Agent can't access MCP tools

**Solutions:**

1. Verify MCP server URL is correct and accessible
2. Check Bearer Token authentication is properly configured
3. Ensure agent has been published after adding MCP tool
4. Refresh the dashboard to see changes

### Tool Execution Fails

**Problem:** MCP tool returns errors

**Solutions:**

1. Test the MCP server independently with cURL:
   ```bash theme={null}
   curl -H "Authorization: Bearer YOUR_MCP_URL" \
     https://your-mcp-server.com/mcp
   ```
2. Verify agent's system prompt provides correct tool names
3. Check MCP provider status page for outages
4. Review error message for specific issues

### Slow Response Times

**Problem:** MCP tools are slow

**Solutions:**

1. MCP calls typically take 2-5 seconds - this is normal
2. Check MCP provider's server status
3. Verify your network connection
4. Consider switching to faster MCP provider if needed

### Authentication Failed

**Problem:** MCP server rejects requests

**Solutions:**

1. Verify the MCP server URL/token is correct
2. Ensure you copied the entire URL without spaces
3. Check if the token has expired (regenerate if needed)
4. Verify Bearer Token is selected as authentication type

## Next Steps

1. Choose your MCP provider (Zapier, Make, Composio, or custom)
2. Generate your MCP server URL from the provider
3. Add MCP tool to SigmaMind with Bearer Token authentication
4. Update your agent's system prompt with tool instructions
5. Test MCP tool with sample user requests
6. Deploy and monitor usage

## Related Documentation

* [Manage Tools Overview](/tools/manage-tools-overview)
* [Add Custom Tools](/tools/add-custom-tool)
* [Authentication Methods](/tools/authentication-methods)
* [Agent Configuration](/agents/configuration)

## Resources

* **Zapier MCP**: [https://mcp.zapier.com](https://mcp.zapier.com)
* **Make MCP**: [https://developers.make.com/mcp-server](https://developers.make.com/mcp-server)
* **Composio MCP**: [https://composio.dev](https://composio.dev)
* **MCP Specification**: [https://modelcontextprotocol.io](https://modelcontextprotocol.io)
