Skip to main content
Glama
Mackerel MCP Server

Mackerel MCP Server

Official

Mackerel MCP Server

A Model Context Protocol server for interacting with Mackerel.

Configuration

The MCP server can be run either via Docker or npx.

Running via Docker

{
  "mcpServers": {
    "mackerel": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "MACKEREL_APIKEY",
        "ghcr.io/mackerelio-labs/mcp-server:latest"
      ],
      "env": {
        "MACKEREL_APIKEY": "${MACKEREL_APIKEY}"
      }
    }
  }
}

Related MCP server: metabase-mcp-server

Running via npx

{
  "mcpServers": {
    "mackerel": {
      "command": "npx",
      "args": [
        "-y",
        "@mackerel/mcp-server"
      ],
      "env": {
        "MACKEREL_APIKEY": "${MACKEREL_APIKEY}"
      }
    }
  }
}

Available tools

  • list_alerts - Retrieve alerts.

  • get_alert - Retrieve a specific alert.

  • get_alert_logs - Retrieve logs for a specific alert.

  • list_dashboards - Retrieve dashboards.

  • get_dashboard - Retrieve a specific dashboard.

  • update_dashboard - Update a specific dashboard.

  • list_hosts - Retrieve hosts.

  • get_host_metrics - Retrieve metrics data for a specific host.

  • list_services - Retrieve services.

  • get_service_metrics - Retrieve metrics data for a specific service.

  • list_monitors - Retrieve monitor configurations.

  • get_monitor - Retrieve a specific monitor configuration.

  • get_trace - Retrieve trace data by trace ID for distributed tracing analysis.

  • list_traces: - Search and retrieve traces.

  • list_http_server_stats - Retrieve HTTP server statistics.

  • list_db_query_stats - Retrieve database query statistics.

  • search_logs - Search logs of a service.

Available Tools

17 tools
get_alertGet AlertA
Read-only

Retrieve a specific alert by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Investigate a particular alert

Inputs: alertId (required).

get_alert_logsGet Alert LogsA
Read-only

Retrieve logs for a specific alert by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • View status change history for a specific alert

  • Investigate alert transitions and their reasons

Inputs: alertId (required), limit, nextId.

get_dashboardGet DashboardA
Read-only

Retrieve a specific dashboard by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get details of a specific dashboard

  • View dashboard configuration and widgets

Inputs: dashboardId (required).

get_host_metricsGet Host MetricsA
Read-only

Retrieve metrics data for a specific host from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get metrics data for a specific host

  • Analyze host performance over time

šŸ“Š AVAILABLE METRIC NAMES:

  • Standard metrics (mackerel-agent): loadavg5, cpu.user, memory.used, disk.sda1.reads, network.eth0.rxBytes, etc.

  • Custom metrics: custom.myapp.* (user-defined metrics)

  • AWS integration: ec2.cpu.used, rds.database_connections.used, etc.

  • Azure integration: azure.virtual_machine.cpu.percent, azure.sql_database.cpu.percent, etc.

  • GCP integration: gce.instance.cpu.used, etc.

Get custom metric

get_host_metrics(hostId="host123", name="custom.myapp.response_time", from=1609459200, to=1609462800)

Get AWS EC2 CPU utilization

get_host_metrics(hostId="host123", name="ec2.cpu.used", from=1609459200, to=1609462800)

Inputs: to (required), from (required), name (required), hostId (required).

get_monitorGet MonitorA
Read-only

Retrieve a specific monitor configuration by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get details of a specific monitor

Inputs: monitorId (required).

get_service_metricsGet Service MetricsA
Read-only

Retrieve metrics data for a specific service from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • "Service metrics" are metrics that correspond to a service that consists of multiple hosts and their collective roles

  • The following can be visualized and monitored.

    • The total number of registered users in a service

    • The number of PVs for a website

    • Business related KPIs such as sales or the number of orders received from EC sites

šŸ“Š AVAILABLE METRIC NAMES:

  • Custom metrics: http.response_time, sales.count, analytics.page_view, etc.

Get service page views

get_service_metrics(serviceName="web", name="analytics.page_view", from=1609459200, to=1609462800)

Inputs: to (required), from (required), name (required), serviceName (required).

get_traceGet TraceA
Read-only

Retrieve trace data by trace ID from Mackerel for distributed tracing analysis.

šŸ” USE THIS TOOL WHEN USERS:

  • Analyze performance bottlenecks in distributed systems

  • Investigate error propagation across microservices

  • Understand request flow and service dependencies

  • Debug latency issues and identify slow operations

  • Generate documentation of system architecture from trace data

Focus on errors only

get_trace(traceId="abc123def456", errorSpansOnly=true)

Filter spans with duration over 100ms

get_trace(traceId="abc123def456", duration=100)

Detailed analysis with attributes

get_trace(traceId="abc123def456", includeAttributes=true, limit=50)

Minimal view for overview

get_trace(traceId="abc123def456", includeEvents=false, limit=10)

Pagination through large traces

get_trace(traceId="abc123def456", limit=20, offset=0)  # First page
get_trace(traceId="abc123def456", limit=20, offset=20) # Second page

Combined filtering and pagination

get_trace(traceId="abc123def456", errorSpansOnly=true, limit=10, offset=0)

Inputs: traceId (required), limit, offset, duration, +3 more.

list_alertsList AlertsA
Read-only

Retrieve alerts from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Check currently active alerts

  • Get a list of alerts including closed alerts

Get all alerts

list_alerts(withClosed=true)

Inputs: limit, nextId, withClosed.

list_dashboardsList DashboardsA
Read-only

Retrieve all dashboards from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of dashboards

  • Get ID and title of each dashboard

Inputs: limit, offset, summary.

list_db_query_statsList Database Query StatisticsA
Read-only

Retrieve database query statistics from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Analyze slow database queries

  • Identify high-frequency queries

  • Investigate database performance issues

  • Monitor query execution patterns

Filter by environment and version

list_db_query_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  environment="production",
  version="v1.2.3"
)

Search for specific queries

list_db_query_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  query="SELECT * FROM users"
)

Pagination

list_db_query_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  page=10,
  perPage=50
)

Inputs: to (required), from (required), serviceName (required), page, +7 more.

list_hostsList HostsA
Read-only

Retrieve hosts from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of hosts

  • Filter hosts by various criteria (service, role, name, etc.)

  • Check host status and information

Get hosts for a specific role

list_hosts(service="web",role=["app"])

Get hosts by status with pagination

list_hosts(status=["working","standby"], limit=10, offset=0)

Get hosts in summary format (reduced response size)

list_hosts(summary=true)

Get next page of hosts

list_hosts(limit=20, offset=20)

Inputs: name, role, limit, offset, +3 more.

list_http_server_statsList HTTP Server StatisticsA
Read-only

Retrieve HTTP server statistics from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Analyze slow HTTP endpoints

  • Identify high-traffic routes

  • Monitor error rates for HTTP requests

  • Investigate API performance issues

Filter by environment and version

list_http_server_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  environment="production",
  version="v1.2.3"
)

Filter by HTTP method and route

list_http_server_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  method="GET",
  route="/api/users"
)

Pagination

list_http_server_stats(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  page=2,
  perPage=50
)

Inputs: to (required), from (required), serviceName (required), page, +8 more.

list_monitorsList MonitorsA
Read-only

Retrieve all monitor configurations from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of all monitors

  • View monitor configurations

Inputs: no named parameters.

list_servicesList ServicesA
Read-only

Retrieve all services from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of services

  • View service names, memos, and roles

Inputs: no named parameters.

list_tracesList TracesA
Read-only

Search and retrieve traces from Mackerel for distributed tracing analysis.

šŸ” USE THIS TOOL WHEN USERS:

  • Search for traces within a time range

  • Find slow traces by latency filtering

  • Filter traces by service, environment, or version

  • Investigate distributed system behavior

Filter by latency

list_traces(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  minLatencyMillis=100,
  maxLatencyMillis=1000
)

Filter by environment and version

list_traces(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  environment="production",
  version="v1.2.3"
)

Search by span name

list_traces(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  spanName="HTTP GET /api/users"
)

Pagination and sorting

list_traces(
  serviceName="my-service",
  from=1700000000,
  to=1700001800,
  page=2,
  perPage=50,
  order={ column: "LATENCY", direction: "DESC" }
)

Inputs: to (required), from (required), serviceName (required), page, +12 more.

search_logsSearch LogsA
Read-only

Search logs of a service from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Investigate errors or incidents by reading application logs

  • Find logs related to a specific trace (traceId)

  • Look for logs containing specific keywords or matching structured (JSON) body fields

šŸ“ KEEPING RESPONSES SMALL:

  • Pass serviceNamespace when the service has one. Without it, only services without a namespace are searched

  • Omit from / to to search relative to the current time (lookbackMinutes, default 60). The response includes the actual timeRange searched

  • Narrow the time range and use severities / keywords / bodyAttributes filters first

  • By default only timestamp, severity, body, traceId and spanId are returned. Use fields to request attributes only when needed

  • Log bodies longer than maxBodyLength are truncated and marked with bodyTruncated: true

  • To get more logs, pass pagination.nextPageCursor as pageCursor as-is with the same filters. The cursor carries the time range and sort order, so from / to / order are not needed. The API allows 1 request per second

Logs in the last 15 minutes

search_logs(serviceName="my-service", serviceNamespace="my-namespace", lookbackMinutes=15)
search_logs(serviceName="my-service", serviceNamespace="my-namespace", from=1700000000, to=1700003600, traceId="0af7651916cd43dd8448eb211c80319c", order="ASC")
search_logs(serviceName="my-service", serviceNamespace="my-namespace", from=1700000000, to=1700003600, keywords=["timeout", "payment"])

Filter JSON bodies: {"res": {"status": 500+}}

search_logs(
  serviceName="my-service",
  serviceNamespace="my-namespace",
  from=1700000000,
  to=1700003600,
  bodyAttributes=[{keyPath: ["res", "status"], value: "500", type: "int", operator: "GTE"}]
)

Include log attributes

search_logs(serviceName="my-service", serviceNamespace="my-namespace", from=1700000000, to=1700003600, fields=["timestamp", "body", "attributes", "resourceAttributes"])

Next page

search_logs(serviceName="my-service", serviceNamespace="my-namespace", severities=["ERROR"], pageCursor=<pagination.nextPageCursor>)

Inputs: serviceName (required), to, from, order, +10 more.

update_dashboardUpdate DashboardA

Update a specific dashboard by ID in Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Modify dashboard title, memo, or URL path

  • Update dashboard widgets configuration

Inputs: memo (required), title (required), urlPath (required), widgets (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a clearly distinct resource and action: alerts, dashboards, hosts, services, monitors, metrics, traces, HTTP stats, DB stats, and logs. Overlaps such as get_trace vs. search_logs or get_host_metrics vs. get_service_metrics are resolved by resource scope and descriptions.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun convention, with list_*, get_*, update_*, and search_* used predictably. The one search_* tool still fits the same readable pattern.

    Tool Count4/5

    Seventeen tools is slightly above the typical 3-15 range, but the server covers a broad monitoring domain with many distinct resource types. Each tool appears to earn its place, though the surface is on the heavier side.

    Completeness3/5

    The read-oriented surface is broad, but lifecycle coverage is incomplete: dashboards have list/get/update but no create/delete, monitors have list/get but no create/update/delete, and hosts/services lack dedicated detail tools. These gaps are workable for monitoring queries but notable for administrative workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables interaction with Datadog's monitoring and observability platform through the MCP protocol. Supports incident management, monitor status checks, log searches, metrics queries, APM traces, dashboard access, RUM analytics, host management, and downtime scheduling.
      13
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Metabase through its API, allowing users to list cards, databases, collections, execute queries, and create cards or bookmarks.
      5
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides comprehensive access to the New Relic observability platform through 55 MCP tools, enabling APM, infrastructure, logs, traces, alerts, dashboards, synthetics, workflows, notifications, service levels, tags, entities, and workloads via a single GraphQL endpoint.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLM clients to manage Uptime Kuma HTTP(S) monitors, groups, tags, and notifications, and to retrieve heartbeats, stats, and incident history through MCP tools.
      MIT