Skip to main content
Glama
mackerelio-labs

Mackerel MCP Server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MACKEREL_APIKEYYesYour Mackerel API key

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_alertsA

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)
get_alertA

Retrieve a specific alert by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Investigate a particular alert

get_alert_logsA

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

list_dashboardsA

Retrieve all dashboards from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of dashboards

  • Get ID and title of each dashboard

get_dashboardA

Retrieve a specific dashboard by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get details of a specific dashboard

  • View dashboard configuration and widgets

update_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

list_hostsA

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)
get_host_metricsA

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)
list_servicesA

Retrieve all services from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of services

  • View service names, memos, and roles

get_service_metricsA

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)
list_monitorsA

Retrieve all monitor configurations from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get a list of all monitors

  • View monitor configurations

get_monitorA

Retrieve a specific monitor configuration by ID from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get details of a specific monitor

get_traceA

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)
list_tracesA

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

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
)
list_db_query_statsA

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
)
search_logsA

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>)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

ActivityActive
ResponsivenessNo issues