[ All integrations ](https://ohdear.app/third-party-integrations)

# MCP Server

Connect AI assistants like Claude to your Oh Dear monitoring data through the Model Context Protocol.

[ ohdearapp/ohdear-mcp ](https://github.com/ohdearapp/ohdear-mcp)

by [ Oh Dear ](https://ohdear.app)

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? [\#](#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 [\#](#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 [\#](#getting-started)

### Prerequisites [\#](#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](https://ohdear.app/user/api-tokens))
- An AI assistant that supports MCP (like Claude Code)

### Installation [\#](#installation)

#### For Claude Code Users

Claude Code users can use this command to add the Oh Dear MCP server:

```
claude mcp add <span class="hl-attribute">--transport</span> http ohdear https://ohdear.app/mcp \
--header <span class="hl-value">"Authorization: Bearer YOUR-API-TOKEN-HERE"</span>
```

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:

```
<span class="hl-property">{</span>
  <span class="hl-keyword">"mcpServers"</span>: <span class="hl-property">{</span>
    <span class="hl-keyword">"ohdear"</span>: <span class="hl-property">{</span>
      <span class="hl-keyword">"command"</span>: <span class="hl-value">"php"</span>,
      <span class="hl-keyword">"args"</span>: <span class="hl-property">[</span><span class="hl-value">"path/to/ohdear-mcp-server.php"</span><span class="hl-property">]</span>,
      <span class="hl-keyword">"env"</span>: <span class="hl-property">{</span>
        <span class="hl-keyword">"OH_DEAR_API_TOKEN"</span>: <span class="hl-value">"your-api-token-here"</span>
      <span class="hl-property">}</span>
    <span class="hl-property">}</span>
  <span class="hl-property">}</span>
<span class="hl-property">}</span>
```

For JavaScript-based clients, configure the MCP server using the following example:

```
<span class="hl-property">{</span>
  <span class="hl-keyword">"mcpServers"</span>: <span class="hl-property">{</span>
    <span class="hl-keyword">"ohdear"</span>: <span class="hl-property">{</span>
      <span class="hl-keyword">"type"</span>: <span class="hl-value">"local"</span>,
      <span class="hl-keyword">"command"</span>: <span class="hl-property">[</span>
        <span class="hl-value">"npx"</span>,
        <span class="hl-value">"-y"</span>,
        <span class="hl-value">"mcp-remote"</span>,
        <span class="hl-value">"https://ohdear.app/mcp"</span>,
        <span class="hl-value">"--header"</span>,
        <span class="hl-value">"Authorization: ${AUTH_HEADER}"</span>
      <span class="hl-property">]</span>,
      <span class="hl-keyword">"enabled"</span>: true,
      <span class="hl-keyword">"environment"</span>: <span class="hl-property">{</span>
        <span class="hl-keyword">"AUTH_HEADER"</span>: <span class="hl-value">"Bearer token"</span>
      <span class="hl-property">}</span>
    <span class="hl-property">}</span>
  <span class="hl-property">}</span>
<span class="hl-property">}</span>
```

### Authentication [\#](#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.
