Docs/Integrations

Oh Dear MCP Server

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"
      }
    }
  }
}

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.

Available Tools #

The Oh Dear MCP server provides comprehensive tools for interacting with your monitoring data:

List Monitors

Search and filter your monitors with optional criteria, or get detailed information about specific monitors:

Examples:

Show me all the monitors in my Oh Dear account
Show me information about Oh Dear monitor example.com
List all monitors with issues
Get details for monitor ID 12345

Get Uptime Statistics

Retrieve detailed uptime metrics with customizable parameters and time ranges:

Examples:

Get uptime stats for example.com for the last 24 hours
Show weekly uptime data for example.com from January 1st to 15th
Get hourly uptime statistics for monitor 12345

View all broken links detected during the latest site crawling:

Examples:

Show me all broken links Oh Dear found on my site example.com
Get broken links for monitor 12345
Check what broken links were detected on my website

DNS Record History

Access DNS history with actual record data and change tracking:

Examples:

Show DNS history for example.com
Check recent DNS changes for example.com
Get the latest DNS records for monitor 12345
Compare current DNS records with previous versions

Lighthouse Performance Reports

Get the latest Lighthouse performance reports with scores, metrics, and optimization suggestions:

Examples:

Show Lighthouse performance reports for example.com
Get the latest performance scores for my website
Check Core Web Vitals for monitor 12345

Cron Check Definitions

View cron check definitions, configuration, status, and recent ping history:

Examples:

Show cron checks for example.com
Get cron job monitoring status for monitor 12345
Check which scheduled tasks are being monitored

Sitemap Information

Access comprehensive sitemap information including indexes, sitemaps, URL counts, and issues:

Examples:

Show sitemap information for example.com
Get sitemap URLs and counts for monitor 12345
Check sitemap issues for my website

Usage Examples #

Here are some practical ways to use the MCP server:

Monitor Health Overview

Get a quick overview of your monitor's health status:

Show me all monitors with issues in my Oh Dear account
Get the latest Lighthouse performance scores for example.com
Check uptime statistics for my main website over the last week

Troubleshooting Website Issues

Investigate specific problems with your sites:

Show me all broken links found on example.com
Check recent DNS changes for my domain
Get cron job monitoring status to see if any scheduled tasks are failing

Performance Analysis

Analyze website performance and optimization opportunities:

Get the latest Core Web Vitals scores for my e-commerce site
Show me Lighthouse performance reports for the last 5 runs
Compare uptime statistics between different time periods
Was this page helpful?

Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!