MCP Server
Connect AI assistants like Claude to your Oh Dear monitoring data through the Model Context Protocol.
The Oh Dear MCP (Model Context Protocol) server enables AI assistants like Claude to directly access and interact with your monitoring data. This powerful integration allows you to query your monitors, retrieve uptime statistics, analyze broken links, and more through natural language conversations.
What is MCP? #
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. Our MCP server acts as a bridge between AI assistants and your Oh Dear monitoring infrastructure, providing real-time access to your site health data.
Key Capabilities #
With the Oh Dear MCP server, you can:
- List and search monitors - Find monitors by name, URL, or tags, or get details for specific monitors
- Retrieve uptime statistics - Get detailed metrics with custom date ranges and grouping intervals
- Analyze broken links - View all broken links detected during site crawling
- Monitor DNS records - Access DNS history with actual record data and change tracking
- Review Lighthouse reports - Get performance scores, metrics, and optimization suggestions
- Check cron job monitoring - View cron check definitions, status, and ping history
- Examine sitemaps - Access sitemap information, indexes, and URL counts
- Filter by issues - Focus on monitors that need attention
Getting Started #
Prerequisites
Before you begin, you'll need:
- An Oh Dear account with active monitors
- An Oh Dear API token (generate one in your account settings)
- An AI assistant that supports MCP (like Claude Code)
Installation
For Claude Code Users
Claude Code users can use this command to add the Oh Dear MCP server:
claude mcp add --transport http ohdear https://ohdear.app/mcp \ --header "Authorization: Bearer YOUR-API-TOKEN-HERE"
You can verify the server was added successfully with:
claude mcp get ohdear
To remove the server later, use:
claude mcp remove ohdear
Manual Installation
For other MCP-compatible clients, you can install and configure the server manually:
{ "mcpServers": { "ohdear": { "command": "php", "args": ["path/to/ohdear-mcp-server.php"], "env": { "OH_DEAR_API_TOKEN": "your-api-token-here" } } } }
For JavaScript-based clients, configure the MCP server using the following example:
{ "mcpServers": { "ohdear": { "type": "local", "command": [ "npx", "-y", "mcp-remote", "https://ohdear.app/mcp", "--header", "Authorization: ${AUTH_HEADER}" ], "enabled": true, "environment": { "AUTH_HEADER": "Bearer token" } } } }
Authentication
The MCP server uses your Oh Dear API token for authentication. This token provides secure access to your monitoring data while respecting your account's permissions and team boundaries.