Appearance
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:
- Login to Composio: Create an account at https://app.composio.dev
- Create new project: Click Create New Project button and provide name and optionaly select one of default auth config
Creating Custom MCP Server on Composio
Step 1: Login to Composio
- Navigate to https://app.composio.dev
- Sign in with your account credentials
Step 2: Create MCP Server
- Navigate to MCP Configs tab and click Create MCP Config. Pick all tools that you want to use in your custom MCP server
- Browse or search for the integrations you need (e.g., Google Calendar, Slack, GitHub, etc.)
- Click on the integration you want to add
- Click to create auth config of selected toolkit
- Chose all tools that you want to use from specific integration
- Click button Create MCP
Step 3: Create New Instance
- Click on MCP Configs tab and select your MCP server
- Click on Create Instance tab and select your MCP server
- Enter user id and press Connect Account button
- Pass authentication and after this click Create Server
- Copy MCP URL
Connecting MCP to MyChatBot
Step 1: Access MyChatBot Integration
- Navigate to your MyChatBot dashboard
- Go to the Integrations section
- Choose the agent you want to connect to the MCP integration
- Find MCP in the available integrations list
- Click Connect on the MCP integration for your selected agent
Step 2: Configure MCP Integration
- Provide the following information:
- Integration Name: A descriptive name for this MCP integration
- MCP Server URL: The URL from your deployed Composio MCP tool
- Click Submit to create the integration
- The system will automatically fetch available tools from your MCP server
- Review the tools that will be made available to your agent
Configuring MCP Tools
Step 1: Review Available Tools
After connecting your MCP integration:
- The system will display all tools available from your MCP server
- Each tool will show:
- Tool name and description
- Required parameters
- Optional parameters
- Expected output format
Step 2: Configure Tool Selection
- Review each available tool
- Select which tools you want to enable for your agent
- Configure any tool-specific settings
- Save your configuration
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
MCP Server Unreachable
- Verify the MCP server URL is correct
- Check if the Composio tool is properly deployed
- Ensure network connectivity
Authentication Errors
- Verify all accounts are properly connected in Composio
- Check if authentication tokens have expired
- Re-authenticate with third-party services if needed
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
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:
- Check the Composio documentation for your specific integrations
- Review MCP server logs if available
- Test tools individually in the Composio dashboard
- 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
- Regularly check for updates to your Composio integrations
- Test tools after any updates to ensure continued functionality
- Update your agent instructions if tool interfaces change
- Monitor for deprecation notices from integrated services
Monitoring Performance
- Track tool success/failure rates
- Monitor response times for all MCP tools
- Set up alerts for any critical tool failures
- Regular review tool usage patterns and optimize as needed