Skip to content

MCP (Model Context Protocol) Integration

Overview

The MCP (Model Context Protocol) integration allows your MyChatBot agent to connect with custom tools and integrations using the Model Context Protocol. This integration uses Composio as the provider and enables your AI assistant to access external services and APIs through custom MCP tools without direct API integration requirements.

Prerequisites

Before setting up MCP integration, you need to:

  1. Login to Composio: Create an account at https://app.composio.dev
  2. Create new project: Click Create New Project button and provide name and optionaly select one of default auth config Prerequisites

Creating Custom MCP Server on Composio

Step 1: Login to Composio

  1. Navigate to https://app.composio.dev
  2. Sign in with your account credentials

Step 2: Create MCP Server

  1. Navigate to MCP Configs tab and click Create MCP Config. Pick all tools that you want to use in your custom MCP server Create MCP Server
  2. Browse or search for the integrations you need (e.g., Google Calendar, Slack, GitHub, etc.) Server Information
  3. Click on the integration you want to add
  4. Click to create auth config of selected toolkit Setup MCP Server
  5. Chose all tools that you want to use from specific integration Setup MCP Server
  6. Click button Create MCP

Step 3: Create New Instance

  1. Click on MCP Configs tab and select your MCP server Create New Instance
  2. Click on Create Instance tab and select your MCP server Create New Instance
  3. Enter user id and press Connect Account button Create New Instance
  4. Pass authentication and after this click Create Server
  5. Create New Instance
  6. Copy MCP URL
  7. Create New Instance

Connecting MCP to MyChatBot

Step 1: Access MyChatBot Integration

  1. Navigate to your MyChatBot dashboard
  2. Go to the Integrations section
  3. Choose the agent you want to connect to the MCP integration

Select Agent

  1. Find MCP in the available integrations list
  2. Click Connect on the MCP integration for your selected agent

Step 2: Configure MCP Integration

  1. Provide the following information:
    • Integration Name: A descriptive name for this MCP integration
    • MCP Server URL: The URL from your deployed Composio MCP tool

Select Agent

  1. Click Submit to create the integration
  2. The system will automatically fetch available tools from your MCP server
  3. Review the tools that will be made available to your agent

Tool List

Configuring MCP Tools

Step 1: Review Available Tools

After connecting your MCP integration:

  1. The system will display all tools available from your MCP server
  2. Each tool will show:
    • Tool name and description
    • Required parameters
    • Optional parameters
    • Expected output format

Step 2: Configure Tool Selection

  1. Review each available tool
  2. Select which tools you want to enable for your agent
  3. Configure any tool-specific settings
  4. Save your configuration

Select Tools

Configuration in Agent Instructions

Basic Tool Usage

Include these examples in your agent's instructions to enable MCP tool usage:

When a customer needs [specific action], use the [tool_name] MCP tool with the following parameters:
- parameter1: [description]
- parameter2: [description]
- Always validate the response and inform the customer of the result

Error Handling

If an MCP tool call fails:
1. Check if the required parameters were provided correctly
2. Retry the operation once if it seems like a temporary issue
3. Inform the customer of any persistent errors
4. Suggest alternative approaches when possible

Multi-Step Operations

For complex workflows involving multiple MCP tools:
1. Use [tool1] to gather initial information
2. Process the data and use [tool2] for the next step
3. Confirm completion with [tool3]
4. Provide a summary of all actions taken

Troubleshooting

Common Issues

  1. MCP Server Unreachable

    • Verify the MCP server URL is correct
    • Check if the Composio tool is properly deployed
    • Ensure network connectivity
  2. Authentication Errors

    • Verify all accounts are properly connected in Composio
    • Check if authentication tokens have expired
    • Re-authenticate with third-party services if needed
  3. Tool Not Found

    • Ensure the tool is properly configured in your MCP server
    • Verify the tool name matches exactly
    • Check if the tool is enabled for your assistant
  4. Parameter Errors

    • Review required vs optional parameters
    • Validate parameter formats and types
    • Check for any special characters or encoding issues

Getting Help

If you encounter issues:

  1. Check the Composio documentation for your specific integrations
  2. Review MCP server logs if available
  3. Test tools individually in the Composio dashboard
  4. Contact support if issues persist

Security Considerations

Data Protection

  • MCP tools process data through Composio's secure infrastructure
  • Ensure you understand what data is being shared with third-party services
  • Review and comply with relevant privacy regulations

Access Control

  • Regularly review connected accounts and permissions
  • Rotate authentication tokens periodically
  • Monitor tool usage for any suspicious activity

Best Practices

  • Use least-privilege principle when setting up integrations
  • Keep MCP server URLs confidential
  • Regularly audit and update connected services
  • Document all integrations and their purposes

Limitations

Current Limitations

  • MCP tools depend on Composio service availability
  • Tool performance depends on third-party API rate limits
  • Some complex workflows may require multiple tool calls
  • Error handling is dependent on the underlying service responses

Rate Limits

  • Each integrated service has its own rate limits
  • Monitor usage to avoid hitting API limits
  • Consider implementing retry logic for rate-limited requests

Updates and Maintenance

Keeping Tools Updated

  1. Regularly check for updates to your Composio integrations
  2. Test tools after any updates to ensure continued functionality
  3. Update your agent instructions if tool interfaces change
  4. Monitor for deprecation notices from integrated services

Monitoring Performance

  1. Track tool success/failure rates
  2. Monitor response times for all MCP tools
  3. Set up alerts for any critical tool failures
  4. Regular review tool usage patterns and optimize as needed