# mcp-server [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/mackerelio-labs/mcp-server  
**GitHub Stars:** 7  
**npm Downloads (last month):** 814  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-server-180

## Description
Local MCP (Model Context Protocol) server for integrating LLMs with Mackerel.

## Tools
Capabilities this server exposes over MCP:

- **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.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `MACKEREL_APIKEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-server does

The mcp-server MCP server gives an MCP-compatible AI client access to Mackerel monitoring data and selected dashboard operations. It is intended for local use and communicates with the client through the MCP server configuration. Authentication uses the `MACKEREL_APIKEY` environment variable.

The available operations cover several areas of Mackerel. Agents can retrieve alert lists, inspect an individual alert, and obtain logs for that alert. They can list dashboards, read a specific dashboard, or update one. Host and service inventory can be listed, with metric data available for an individual host or service. Monitor configurations can also be listed and retrieved.

For observability and performance analysis, the mcp-server MCP server can retrieve a trace by trace ID, search and retrieve traces, and return HTTP server statistics or database query statistics. This places the project in the 📊 Monitoring category and makes it relevant when an agent needs to inspect Mackerel state rather than only answer from static documentation.

## How it works

The server is registered under an MCP client’s `mcpServers` configuration. The client starts either a Docker process or the package through npx, then passes the API key through the process environment. Requests from the agent are mapped to the listed Mackerel operations, such as `list_alerts`, `get_host_metrics`, or `update_dashboard`.

Docker runs the published `ghcr.io/mackerelio-labs/mcp-server:latest` image with interactive input enabled and removes the container after it exits. The npx configuration invokes `@mackerel/mcp-server` with the package-download flag. Both examples use the same environment variable for authentication.

## Setup and configuration

Choose Docker when the runtime should use the published container image, or npx when Node package execution is preferred. Add an `mcpServers` entry to the MCP client configuration and set `MACKEREL_APIKEY` to the Mackerel API key available to that client.

The Docker command uses `docker run --rm -i` and passes `MACKEREL_APIKEY` into the container. The npx command uses `npx -y @mackerel/mcp-server`. The provided configuration does not define additional server options, endpoints, or environment variables.

## Tools and capabilities

The mcp-server MCP server exposes these tools:

- `list_alerts`, `get_alert`, and `get_alert_logs` for alert retrieval and alert log inspection.
- `list_dashboards`, `get_dashboard`, and `update_dashboard` for dashboard access and updates.
- `list_hosts` and `get_host_metrics` for host inventory and metrics.
- `list_services` and `get_service_metrics` for service inventory and metrics.
- `list_monitors` and `get_monitor` for monitor configuration access.
- `get_trace` and `list_traces` for trace lookup and search.
- `list_http_server_stats` for HTTP server statistics.
- `list_db_query_stats` for database query statistics.

## Limitations and notes

The documented configuration requires a Mackerel API key, and the supplied material does not describe narrower permissions, key scopes, regional settings, or other authentication methods. Dashboard updates are the only explicitly listed write operation; the remaining documented tools retrieve alerts, configurations, metrics, traces, or statistics. The README does not document client-specific setup beyond the generic MCP configuration examples.

_Full upstream README: https://allmcps.com/mcp/mcp-server-180/readme_

