MCP (Model Context Protocol)
The Model Context Protocol (MCP) is an open standard that enables you to build secure, two-way connections between your data sources and AI-powered tools. Think of MCP as a universal translator that allows AI Agents to seamlessly communicate with any external system such as databases, file systems, web services, and APIs.
Overview
MCP servers extend your agent's capabilities by providing:
- External Tool Access - Connect to third-party services and APIs
- Data Source Integration - Access databases, file systems, and cloud storage
- Custom Functionality - Add specialized tools for your specific use cases
- Standardized Interface - Use a consistent protocol for all integrations
- Secure Authentication - Support for OAuth 2.0 and custom headers
How It Works
1. MCP Server Connection
When you add an MCP server to your agent:
- Server Registration - The server is registered with your agent configuration
- Tool Discovery - The agent discovers available tools from the MCP server
- Tool Integration - Tools become available to the agent during conversations
- Dynamic Execution - The agent can call these tools as needed
2. Tool Execution Flow
User Query → Agent → MCP Tool Call → MCP Server → External System → Response → Agent → User
3. Multiple Servers
You can configure multiple MCP servers per agent:
- Each server provides its own set of tools
- Tools are prefixed with the server name (e.g.,
sentry_get_errors) - Servers can be enabled or disabled independently
Quick Start
Adding Popular MCP Servers
- Navigate to Agents in the sidebar
- Select or create an agent
- Click Edit to open the agent builder
- Go to the MCP tab
- In the Quick Add Popular Servers section, click on a server tile to add it
Popular Servers
Sentry
Monitor errors and performance issues in your applications.
- URL:
https://mcp.sentry.dev/mcp - Transport: HTTP
- Authentication: OAuth 2.0
- Scopes:
org:read project:write team:write event:write
Capabilities:
- View error reports
- Monitor performance metrics
- Manage projects and teams
- Track events and issues
Video Tutorial
Watch this video to see how to add and configure MCP servers:
Adding Custom MCP Servers
Step 1: Access MCP Configuration
- Navigate to Agents in the sidebar
- Select or create an agent
- Click Edit to open the agent builder
- Go to the MCP tab
- Scroll to the Advanced Configuration section
Step 2: Add New Server
- Click Add Server button
- The server configuration form will appear
Step 3: Configure Server Settings
Server Name
Enter a unique name for your MCP server (e.g., my-custom-server, weather-api, database-connector).
Best Practices:
- Use lowercase letters and hyphens
- Be descriptive but concise
- Avoid special characters
Transport Type
Select how the agent will communicate with the MCP server:
HTTP (streamable_http)
- Standard HTTP requests
- Best for REST APIs and web services
- Supports request/response pattern
SSE (Server-Sent Events)
- Real-time streaming communication
- Best for live data feeds
- Supports one-way server-to-client streaming
Server URL
Enter the endpoint URL for your MCP server:
HTTP Examples:
https://api.example.com/mcphttp://localhost:8000/mcp/https://mcp.example.com/v1
SSE Examples:
https://api.example.com/ssehttps://stream.example.com/events
Step 4: Configure Authentication
No Authentication
Select No Authentication if your MCP server doesn't require authentication.
OAuth 2.0
For OAuth-protected servers:
- Select OAuth 2.0 as the authentication method
- Enter OAuth Scopes (space-separated)
- Example:
read write admin - Example:
org:read project:write team:write
- Example:
OAuth Flow:
- When a user interacts with the agent, they'll be prompted to authorize
- Authorization is handled automatically
- Tokens are securely stored and refreshed as needed
Step 5: Custom Headers (Optional)
If your MCP server requires custom HTTP headers:
- Click Add Header
- Enter the header name (e.g.,
X-API-Key,Authorization) - Enter the header value
- Add additional headers as needed
Common Headers:
X-API-Key:your-api-keyAuthorization:Bearer tokenX-Custom-Header:custom-value
Step 6: Enable/Disable Server
Toggle the Enabled checkbox to control whether the server is active:
- Enabled: Server tools are available to the agent
- Disabled: Server tools are hidden but configuration is preserved
Step 7: Test Connection
- Click the Test button to verify the connection
- Wait for the test result:
- Success: Server is reachable and configured correctly
- Error: Check your configuration and network connectivity
Step 8: Save Configuration
- Click Save to store your MCP server configuration
- The server is now available to your agent
Managing MCP Servers
Viewing Configured Servers
In the MCP tab, you can see:
- Server Count - Number of configured servers
- Server Status - Enabled/disabled status
- Server Names - List of all configured servers
Editing Server Configuration
- Find the server in the Advanced Configuration section
- Click to expand the server configuration
- Modify any settings
- Click Test to verify changes
- Configuration is saved automatically
Removing Servers
- Find the server you want to remove
- Click the Remove icon (trash can)
- Confirm removal
- The server is removed from your agent configuration
Removing an MCP server will make its tools unavailable to the agent. Make sure no active conversations depend on these tools.
Enabling/Disabling Servers
Toggle the Enabled checkbox for any server:
- Enable: Makes server tools available
- Disable: Hides server tools but preserves configuration
This is useful for:
- Temporarily disabling problematic servers
- Testing different server configurations
- Managing server availability without removing configuration
Transport Types
HTTP (streamable_http)
Use When:
- Connecting to REST APIs
- Standard request/response patterns
- Web services and microservices
Configuration:
- URL should point to the MCP endpoint
- Supports standard HTTP methods
- Works with most web services
Example:
URL: https://api.example.com/mcp
Transport: HTTP
SSE (Server-Sent Events)
Use When:
- Real-time data streams
- Live updates and notifications
- One-way server-to-client communication
Configuration:
- URL should point to the SSE endpoint
- Server must support SSE protocol
- Automatic reconnection on disconnect
Example:
URL: https://stream.example.com/sse
Transport: SSE
Authentication Methods
No Authentication
Use when your MCP server doesn't require authentication:
- Public APIs
- Internal services
- Development/testing servers
Configuration:
- Select No Authentication
- No additional configuration needed
OAuth 2.0
Use for secure, user-authorized access:
- Third-party services (Sentry, Canva, etc.)
- User-specific data access
- Scoped permissions
Configuration:
- Select OAuth 2.0
- Enter OAuth scopes (space-separated)
- Users will authorize on first use
OAuth Scopes Examples:
- Sentry:
org:read project:write team:write event:write - Canva:
asset:read asset:write design:read design:write - Custom:
read write admin
OAuth Flow:
- User interacts with agent
- Agent needs MCP tool from OAuth-protected server
- User is prompted to authorize
- Authorization completes automatically
- Token is stored securely
- Future requests use stored token
Custom Headers
Use custom headers for:
- API keys
- Custom authentication tokens
- Service-specific headers
- Request metadata
Adding Headers
- In server configuration, find Custom Headers section
- Click Add Header
- Enter header name (e.g.,
X-API-Key) - Enter header value
- Add more headers as needed
Common Header Patterns
API Key:
Header: X-API-Key
Value: your-api-key-here
Bearer Token:
Header: Authorization
Value: Bearer your-token-here
Custom Service Header:
Header: X-Service-Name
Value: your-service-identifier
Use Cases
Error Monitoring
Sentry MCP Server
Monitor application errors and performance:
{
"server_name": "sentry",
"transport": "streamable_http",
"url": "https://mcp.sentry.dev/mcp",
"auth_type": "oauth",
"oauth_scopes": "org:read project:write team:write event:write"
}
Agent Capabilities:
- "Show me errors from the last 24 hours"
- "What's the error rate for project X?"
- "List all unresolved issues"
Database Access
Custom Database MCP Server
Connect to your database:
{
"server_name": "postgres-db",
"transport": "streamable_http",
"url": "https://mcp.example.com/database",
"auth_type": "oauth",
"headers": {
"X-Database-Name": "production"
}
}
Agent Capabilities:
- "Query the users table"
- "Show me recent orders"
- "Get customer statistics"
File System Access
File System MCP Server
Access files and directories:
{
"server_name": "filesystem",
"transport": "streamable_http",
"url": "https://mcp.example.com/files",
"auth_type": "oauth"
}
Agent Capabilities:
- "List files in the documents folder"
- "Read the config file"
- "Search for files containing 'error'"
Real-Time Data Streams
SSE MCP Server
Connect to live data feeds:
{
"server_name": "live-data",
"transport": "sse",
"url": "https://stream.example.com/sse",
"auth_type": "oauth"
}
Agent Capabilities:
- "Show me live stock prices"
- "Monitor system metrics"
- "Track real-time events"
Best Practices
Server Naming
- Be Descriptive: Use clear, meaningful names
- Use Lowercase: Prefer lowercase with hyphens
- Avoid Special Characters: Stick to letters, numbers, and hyphens
- Be Consistent: Follow a naming convention
Good Examples:
sentry-monitoringpostgres-productionweather-api
Bad Examples:
Server1my_mcp_serverMCP-Server!!!
URL Configuration
- Use HTTPS: Always prefer secure connections
- Include Full Path: Specify the complete endpoint URL
- Test URLs: Verify URLs are accessible before saving
- Document Endpoints: Keep documentation of your endpoints
Authentication
- Use OAuth When Possible: More secure than API keys
- Minimize Scopes: Request only necessary permissions
- Store Securely: Tokens are handled automatically
- Test Authorization: Verify OAuth flow works correctly
Error Handling
- Test Connections: Use the Test button before saving
- Monitor Logs: Check for connection errors
- Handle Failures: Configure fallbacks for critical servers
- Disable Problematic Servers: Temporarily disable if needed
Performance
- Limit Server Count: Too many servers can slow down agents
- Disable Unused Servers: Keep only active servers enabled
- Optimize Headers: Only include necessary custom headers
- Monitor Response Times: Watch for slow MCP server responses
Troubleshooting
Connection Failures
Problem: Test connection fails
Possible Causes:
- Incorrect URL
- Network connectivity issues
- Server not running
- Firewall blocking connection
Solutions:
- Verify URL is correct and accessible
- Check network connectivity
- Ensure server is running
- Review firewall rules
Authentication Errors
Problem: OAuth authentication fails
Possible Causes:
- Incorrect OAuth scopes
- Server doesn't support OAuth
- User hasn't authorized
- Token expired
Solutions:
- Verify OAuth scopes are correct
- Check server OAuth documentation
- Re-authorize the connection
- Check token expiration settings
Tools Not Available
Problem: MCP server tools don't appear
Possible Causes:
- Server is disabled
- Connection not established
- Server not responding
- Tool discovery failed
Solutions:
- Enable the server
- Test the connection
- Verify server is running
- Check server logs
Timeout Errors
Problem: Requests timeout
Possible Causes:
- Slow server response
- Network latency
- Server overloaded
- Incorrect timeout settings
Solutions:
- Check server performance
- Verify network speed
- Reduce server load
- Adjust timeout settings if configurable
Testing MCP Servers
Test Connection
- Configure your MCP server
- Click the Test button
- Wait for results:
- Success: Green indicator with success message
- Error: Red indicator with error details
Test Results
Success Indicators:
- Connection successful message
- Server responding correctly
- Authentication working (if applicable)
Error Indicators:
- Connection timeout
- Authentication failed
- Invalid URL
- Server not responding
Interpreting Results
Success:
✓ Connection successful
MCP server connection tested successfully
Error:
✗ Connection failed
Failed to connect to server: Connection timeout
Security Considerations
OAuth Security
- Token Storage: Tokens are stored securely
- Token Refresh: Automatic token refresh when expired
- Scope Limitation: Request minimum necessary scopes
- User Authorization: Users must explicitly authorize
Custom Headers
- Sensitive Data: Don't put sensitive data in headers if avoidable
- API Keys: Use OAuth when possible instead of API keys
- Header Visibility: Headers are stored in configuration
- Access Control: Limit who can view/edit MCP configurations
Network Security
- HTTPS Only: Always use HTTPS for production servers
- Internal Networks: Use internal URLs for private servers
- Firewall Rules: Configure firewalls appropriately
- VPN Access: Use VPN for secure connections when needed
Examples
Example 1: Sentry Integration
Configuration:
{
"server_name": "sentry",
"transport": "streamable_http",
"url": "https://mcp.sentry.dev/mcp",
"auth_type": "oauth",
"oauth_scopes": "org:read project:write team:write event:write",
"enabled": true
}
Usage:
- Agent can monitor errors
- View performance metrics
- Manage Sentry projects
Example 2: Custom API Integration
Configuration:
{
"server_name": "custom-api",
"transport": "streamable_http",
"url": "https://api.example.com/mcp",
"auth_type": "oauth",
"oauth_scopes": "read write",
"headers": {
"X-Client-ID": "your-client-id"
},
"enabled": true
}
Usage:
- Agent can call custom API endpoints
- Access protected resources
- Use custom headers for identification
Example 3: Internal Service
Configuration:
{
"server_name": "internal-service",
"transport": "streamable_http",
"url": "http://internal-service:8000/mcp",
"auth_type": "none",
"headers": {
"X-Internal-Key": "internal-key-value"
},
"enabled": true
}
Usage:
- Agent can access internal services
- No OAuth required
- Custom header for internal authentication
EKB as an MCP server
Looking for the other direction — driving EKB from Claude, Cursor, or ChatGPT? See EKB as MCP.
Related Features
- Toolkits - Built-in integrations and tools
- Tools - Custom tools and actions
- Agent Configuration - Configure agent behavior
- API Integration - Connect to external APIs
Learn about built-in toolkits and integrations
Support
Need help with MCP servers? Contact support at support@automationanywhere.com.