MCP Integration
Learn how to integrate Bareuptime with MCP-compatible AI coding assistants like Cline, Claude Desktop, and other vibe-coding tools.
What is MCP?
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely access external tools and data sources. Bareuptime provides MCP integration so your AI coding assistant can help you manage monitors directly from your development environment.
Prerequisites
- Generate API Key: Visit https://app.bareuptime.co/api-keys
- MCP-compatible AI Assistant: Such as Cline, Claude Desktop, or other MCP-enabled tools
- Node.js 18+ (for running the MCP server)
MCP Server Connection
Bareuptime provides a hosted MCP server at mcp.bareuptime.co, so you don't need to install or run your own server. Simply configure your AI assistant to connect to our hosted service.
Server Details
- Host:
mcp.bareuptime.co - Port:
443(HTTPS) - Protocol: WebSocket Secure (WSS)
- Authentication: API Key required
AI Assistant Configuration
Claude Desktop
Add the Bareuptime MCP server to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bareuptime": {
"transport": {
"type": "sse",
"url": "https://mcp.bareuptime.co/sse"
},
"env": {
"BAREUPTIME_API_KEY": "YOUR_API_KEY"
}
}
}
}
Cline (VS Code Extension)
In your Cline settings, add the MCP server:
{
"mcp": {
"servers": [
{
"name": "bareuptime",
"transport": {
"type": "sse",
"url": "https://mcp.bareuptime.co/sse"
},
"env": {
"BAREUPTIME_API_KEY": "YOUR_API_KEY"
}
}
]
}
}
Available MCP Tools
The Bareuptime MCP server provides these tools for AI assistants:
1. create_monitor
Creates a new uptime monitor.
Parameters:
name(required): Monitor nameurl(required): URL to monitorcheck_interval(optional): Check interval ("1min", "5min", "10min", "20min", "30min", "1hr", default: "5min")type(optional): Monitor type ("get", "post", "put", "patch", "delete", default: "get")request_body(optional): Request body for POST/PUT/PATCH requestsrequest_headers(optional): Custom HTTP headers as newline-separated string (e.g., "Authorization: Bearer token\nContent-Type: application/json")
2. list_monitors
Lists all monitors in your account.
Parameters:
limit(optional): Number of monitors to return (default: 50)offset(optional): Number of monitors to skip (default: 0)tags(optional): Filter by tags (comma-separated)
3. get_monitor
Gets details of a specific monitor.
Parameters:
monitor_id(required): The monitor ID
4. update_monitor
Updates an existing monitor.
Parameters:
monitor_id(required): The monitor ID- Same optional parameters as
create_monitor
5. delete_monitor
Deletes a monitor.
Parameters:
monitor_id(required): The monitor ID
6. get_monitor_status
Gets the current status of a monitor.
Parameters:
monitor_id(required): The monitor ID
7. get_monitor_stats
Gets statistics for a monitor.
Parameters:
monitor_id(required): The monitor IDperiod(optional): Time period ("1h", "24h", "7d", "30d", default: "24h")
Example AI Conversations
Creating a Monitor
You: "Create a monitor for my website https://mycompany.com that checks every 5 minutes"
AI Assistant: I'll create a monitor for your website that checks every 5 minutes (300 seconds). Let me set that up for you.
(AI calls create_monitor tool with appropriate parameters)
AI Assistant: ✅ Successfully created monitor "MyCompany Website" for https://mycompany.com
- Monitor ID: mon_abc123
- Check interval: 5 minutes
- Monitoring locations: Iowa, Germany
- Expected status: 200 OK
Monitoring API Health
You: "Set up monitoring for our API health endpoint with authentication"
AI Assistant: I'll create a monitor for your API health endpoint. What's the URL of your health endpoint, and what authentication headers do you need?
You: "https://api.mycompany.com/health with Bearer token abc123"
AI Assistant: Perfect! I'll set up monitoring for your API health endpoint with authentication.
(AI calls create_monitor with request_headers: "Authorization: Bearer abc123")
Bulk Monitor Management
You: "Show me all monitors tagged with 'production' and their current status"
AI Assistant: I'll get all your production monitors and check their current status.
(AI calls list_monitors filtered by 'production' tag, then gets status for each)
AI Assistant: Here are your production monitors:
-
Company Website (mon_abc123) - ✅ UP
- Last check: 2 minutes ago
- Response time: 145ms
-
API Health Check (mon_def456) - ⚠️ SLOW
- Last check: 1 minute ago
- Response time: 2.1s (warning threshold)
Advanced Usage Examples
Multi-Environment Setup
You: "Create monitors for all our environments - staging, production, and development"
AI Assistant: I'll create monitors for all three environments. Let me know the URLs for each:
You:
- Production: https://myapp.com
- Staging: https://staging.myapp.com
- Development: https://dev.myapp.com
AI Assistant: Perfect! I'll create monitors for all three environments with appropriate tags and intervals.
(AI creates three monitors with different intervals and tags)
API Endpoint Monitoring
You: "Monitor our REST API endpoints with proper health checks"
AI Assistant: I'll help you set up comprehensive API monitoring. Let me create monitors for your key API endpoints with proper health check validation.
Status Dashboard Creation
You: "Check the status of all our critical services"
AI Assistant: Let me check the status of all monitors tagged as 'critical' and provide you with a status dashboard.
(AI gets all critical monitors and their current status)
Error Handling
The MCP server handles various error scenarios:
Authentication Errors
Error: Invalid API key. Please check your Bareuptime API key.
Rate Limiting
Error: Rate limit exceeded. Please wait 60 seconds before trying again.
Validation Errors
Error: Invalid URL format for monitor creation.
Resources
- MCP Specification: https://modelcontextprotocol.io/
- Bareuptime API Docs: API Reference
- Bareuptime Support: https://bareuptime.co/contact
- MCP Server Status: https://status.bareuptime.co/mcp
The hosted MCP server is continuously updated with new features and improvements.