Mackerel MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mackerel MCP Server show current alerts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 toolsget_alertGet AlertARead-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 LogsARead-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 DashboardARead-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 MetricsARead-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 MonitorARead-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 MetricsARead-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 TraceARead-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 pageCombined filtering and pagination
get_trace(traceId="abc123def456", errorSpansOnly=true, limit=10, offset=0)Inputs: traceId (required), limit, offset, duration, +3 more.
list_alertsList AlertsARead-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 DashboardsARead-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 StatisticsARead-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 HostsARead-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 StatisticsARead-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 MonitorsARead-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 ServicesARead-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 TracesARead-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 LogsARead-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
serviceNamespacewhen the service has one. Without it, only services without a namespace are searchedOmit
from/toto search relative to the current time (lookbackMinutes, default 60). The response includes the actualtimeRangesearchedNarrow the time range and use severities / keywords / bodyAttributes filters first
By default only timestamp, severity, body, traceId and spanId are returned. Use
fieldsto request attributes only when neededLog bodies longer than
maxBodyLengthare truncated and marked withbodyTruncated: trueTo get more logs, pass
pagination.nextPageCursoraspageCursoras-is with the same filters. The cursor carries the time range and sort order, sofrom/to/orderare 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)Logs related to a trace in chronological order
search_logs(serviceName="my-service", serviceNamespace="my-namespace", from=1700000000, to=1700003600, traceId="0af7651916cd43dd8448eb211c80319c", order="ASC")Keyword search
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
Scored across 17 tools
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.
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.
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.
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
Related MCP Connectors
Monitor websites, APIs, and servers: create monitors, triage incidents, and query uptime stats.
Manage Cronitor monitors, issues, status pages, and metrics for jobs, uptime, and sites.
Cron, uptime, DNS, SSL and domain monitoring. Manage checks, dashboards and alerts; read incidents.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables 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.13Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Metabase through its API, allowing users to list cards, databases, collections, execute queries, and create cards or bookmarks.5MIT
- FlicenseNot gradedqualityCmaintenanceProvides 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.-
- AlicenseNot gradedqualityBmaintenanceEnables 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