Back to MCP Directory
Last9
Model Context Protocol moderate risk

Last9

Last9 MCP server provides AI agents with real-time production context (logs, metrics, traces) to assist in code troubleshooting and automated fixes.

Connections & Capabilities

Connects To

GitHubKubernetesAWS

Capabilities

readwrite

Quickstart

Install

brew install last9-mcp

Config

{
  "mcpServers": {
    "last9": {
      "command": "/opt/homebrew/bin/last9-mcp",
      "env": {
        "LAST9_REFRESH_TOKEN": "<last9_refresh_token>",
        "OTEL_EXPORTER_OTLP_ENDPOINT": "<otel_endpoint_url>",
        "OTEL_EXPORTER_OTLP_HEADERS": "<otel_headers>"
      }
    }
  }
}

Exposed MCP Tools (21)

safe
get_exceptions

Retrieves server-side exceptions within a specified time range.

Read-only operation, retrieves existing data.

safe
get_service_summary

Provides a summary of a service's performance metrics (throughput, error rate, response time) over a given time range.

Read-only operation, retrieves aggregated data.

safe
get_service_environments

Lists available environments for services.

Read-only operation, retrieves environment names.

safe
get_service_performance_details

Retrieves detailed performance metrics for a specific service.

Read-only operation, retrieves performance data.

safe
get_service_operations_summary

Provides a summary of operations within a service, such as HTTP endpoints and database queries.

Read-only operation, retrieves operation summaries.

safe
get_service_dependency_graph

Retrieves a dependency graph showing incoming and outgoing dependencies for a service.

Read-only operation, retrieves dependency information.

safe
prometheus_range_query

Executes a PromQL range query to retrieve metrics data over a specified time range.

Read-only operation, retrieves metrics data.

safe
prometheus_instant_query

Executes a PromQL instant query to retrieve metrics data at a specific point in time.

Read-only operation, retrieves metrics data.

safe
prometheus_label_values

Returns label values for a given label and PromQL filter query.

Read-only operation, retrieves label values.

safe
prometheus_labels

Returns labels for a given PromQL match query.

Read-only operation, retrieves labels.

safe
get_logs

Retrieves logs filtered by service name and/or severity level.

Read-only operation, retrieves log data.

safe
get_drop_rules

Retrieves drop rules for logs, which determine what logs are filtered out.

Read-only operation, retrieves existing drop rules.

moderate
add_drop_rule

Adds a new drop rule to filter out specific logs.

Allows modification of log filtering, potentially hiding critical information.

safe
get_service_logs

Retrieves raw log entries for a specific service over a time range.

Read-only operation, retrieves log data.

safe
get_log_attributes

Retrieves available log attributes (labels) for a specified time window.

Read-only operation, retrieves log attributes.

safe
get_traces

Retrieves traces using JSON pipeline queries for advanced filtering.

Read-only, retrieves trace data.

safe
get_service_traces

Retrieves traces by trace ID or service name with time range filtering.

Read-only, retrieves trace data.

safe
get_trace_attributes

Retrieves available trace attributes (series) for a specified time window.

Read-only, retrieves trace attributes.

safe
get_change_events

Retrieves change events from the last9_change_events Prometheus metric.

Read-only, retrieves change event data.

safe
get_alert_config

Retrieves alert configurations (alert rules) from Last9.

Read-only, retrieves alert configurations.

safe
get_alerts

Retrieves currently active alerts from the Last9 monitoring system.

Read-only, retrieves active alert data.

Safety Assessment

The Last9 MCP server is generally safe for read-only operations. The `add_drop_rule` tool introduces some risk, requiring careful configuration and monitoring. Prometheus queries should be crafted with caution to avoid performance impacts.

  • Most tools are read-only, retrieving observability data.
  • Write operations are limited to adding log drop rules.
  • No direct code execution or system-level access.
  • Clear tool descriptions and parameter definitions.
  • The `add_drop_rule` tool allows modification of log filtering, potentially hiding critical information if misconfigured.
  • Prometheus queries can potentially overload the system if not carefully crafted.
  • Lack of explicit sandboxing for Prometheus queries.
  • Incorrectly configured alert rules could lead to alert fatigue or missed critical issues.