last9 observability.com
last9 observability.com logo

Last9 Observability

Integrates with Last9's observability platform to enable exception retrieval and service dependency analysis for efficie...

Created byApr 22, 2025

Last9 MCP Server

last9 mcp demo
A Model Context Protocol server implementation for Last9 that enables AI agents to seamlessly bring real-time production context logs, metrics, and traces into your local environment to auto-fix code faster.

Status

Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements the following MCP tools:
  • get_exceptions: Get list of exceptions.
  • get_service_graph: Get service graph for an endpoint from the exception.
  • get_logs: Get logs filtered by service name and/or severity level.
  • get_drop_rules: Get drop rules for logs that determine what logs get filtered out at Last9 Control Plane

Tools Documentation

get_exceptions

Retrieves server-side exceptions over a specified time range.
Parameters:
  • limit (integer, optional): Maximum number of exceptions to return. Default: 20.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
  • span_name (string, optional): Name of the span to filter by.

get_service_graph

Gets the upstream and downstream services for a given span name, along with the throughput for each service.
Parameters:
  • span_name (string, required): Name of the span to get dependencies for.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.

get_logs

Gets logs filtered by optional service name and/or severity level within a specified time range.
Parameters:
  • service (string, optional): Name of the service to get logs for.
  • severity (string, optional): Severity of the logs to get.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
  • limit (integer, optional): Maximum number of logs to return. Default: 20.

get_drop_rules

Gets drop rules for logs, which determine what logs get filtered out from reaching Last9.

add_drop_rule

Adds a new drop rule to filter out specific logs at Last9 Control Plane
Parameters:
  • name (string, required): Name of the drop rule.
  • filters (array, required): List of filter conditions to apply. Each filter has:

Installation

You can install the Last9 Observability MCP server using either:

Homebrew

NPM

Configuration

Environment Variables

The service requires the following environment variables:
  • LAST9_AUTH_TOKEN: Authentication token for Last9 MCP server (required)
  • LAST9_BASE_URL: Last9 API URL (required)
  • LAST9_REFRESH_TOKEN: Refresh Token with Write permissions. Needed for accessing control plane APIs (required).
  • Obtain LAST9_BASE_URL and LAST9_AUTH_TOKEN from here.
  • The Write Refresh Token can be obtained from API Access page.

Usage with Claude Desktop

Configure the Claude app to use the MCP server:
  1. Open the Claude Desktop app
  1. Go to Settings, then Developer, click Edit Config
  1. Open the claude_desktop_config.json file
  1. Copy and paste the server config to your existing file, then save
  1. Restart Claude

Usage with Cursor

Configure Cursor to use the MCP server:
  1. Navigate to Settings, then Cursor Settings
  1. Select MCP on the left
  1. Click Add new global MCP server at the top right
  1. Copy and paste the server config to your existing file, then save
  1. Restart Cursor

Usage with Windsurf

Configure Windsurf to use the MCP server:
  1. Open Windsurf
  1. Go to Settings, then Developer
  1. Click Edit Config
  1. Open the windsurf_config.json file
  1. Copy and paste the server config to your existing file, then save
  1. Restart Windsurf

Usage with VS Code

Prerequisites:
  • VS Code version 1.99 or later
Configure VS Code to use the MCP server:
  1. Create .vscode/mcp.json in your workspace or add to VS Code user settings with the following configuration:
  1. Open Chat view ( I on macOS, Ctrl+Alt+I on Windows/Linux)
  1. Select "Agent" mode from dropdown
  1. The Last9 MCP server will now be available in VS Code
Note: Replace placeholder values (<auth_token>, <last9_otlp_host>, and <write_refresh_token>) with your actual Last9 credentials.
For advanced configuration options and alternative setup methods, see the official VS Code MCP documentation.

Last9 MCP Server

last9 mcp demo
A Model Context Protocol server implementation for Last9 that enables AI agents to seamlessly bring real-time production context logs, metrics, and traces into your local environment to auto-fix code faster.

Status

Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot) IDEs. Implements the following MCP tools:
  • get_exceptions: Get list of exceptions.
  • get_service_graph: Get service graph for an endpoint from the exception.
  • get_logs: Get logs filtered by service name and/or severity level.
  • get_drop_rules: Get drop rules for logs that determine what logs get filtered out at Last9 Control Plane

Tools Documentation

get_exceptions

Retrieves server-side exceptions over a specified time range.
Parameters:
  • limit (integer, optional): Maximum number of exceptions to return. Default: 20.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
  • span_name (string, optional): Name of the span to filter by.

get_service_graph

Gets the upstream and downstream services for a given span name, along with the throughput for each service.
Parameters:
  • span_name (string, required): Name of the span to get dependencies for.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.

get_logs

Gets logs filtered by optional service name and/or severity level within a specified time range.
Parameters:
  • service (string, optional): Name of the service to get logs for.
  • severity (string, optional): Severity of the logs to get.
  • lookback_minutes (integer, recommended): Number of minutes to look back from now. Default: 60. Examples: 60, 30, 15.
  • start_time_iso (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to use lookback_minutes.
  • end_time_iso (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
  • limit (integer, optional): Maximum number of logs to return. Default: 20.

get_drop_rules

Gets drop rules for logs, which determine what logs get filtered out from reaching Last9.

add_drop_rule

Adds a new drop rule to filter out specific logs at Last9 Control Plane
Parameters:
  • name (string, required): Name of the drop rule.
  • filters (array, required): List of filter conditions to apply. Each filter has:

Installation

You can install the Last9 Observability MCP server using either:

Homebrew

NPM

Configuration

Environment Variables

The service requires the following environment variables:
  • LAST9_AUTH_TOKEN: Authentication token for Last9 MCP server (required)
  • LAST9_BASE_URL: Last9 API URL (required)
  • LAST9_REFRESH_TOKEN: Refresh Token with Write permissions. Needed for accessing control plane APIs (required).
  • Obtain LAST9_BASE_URL and LAST9_AUTH_TOKEN from here.
  • The Write Refresh Token can be obtained from API Access page.

Usage with Claude Desktop

Configure the Claude app to use the MCP server:
  1. Open the Claude Desktop app
  1. Go to Settings, then Developer, click Edit Config
  1. Open the claude_desktop_config.json file
  1. Copy and paste the server config to your existing file, then save
  1. Restart Claude

Usage with Cursor

Configure Cursor to use the MCP server:
  1. Navigate to Settings, then Cursor Settings
  1. Select MCP on the left
  1. Click Add new global MCP server at the top right
  1. Copy and paste the server config to your existing file, then save
  1. Restart Cursor

Usage with Windsurf

Configure Windsurf to use the MCP server:
  1. Open Windsurf
  1. Go to Settings, then Developer
  1. Click Edit Config
  1. Open the windsurf_config.json file
  1. Copy and paste the server config to your existing file, then save
  1. Restart Windsurf

Usage with VS Code

Prerequisites:
  • VS Code version 1.99 or later
Configure VS Code to use the MCP server:
  1. Create .vscode/mcp.json in your workspace or add to VS Code user settings with the following configuration:
  1. Open Chat view ( I on macOS, Ctrl+Alt+I on Windows/Linux)
  1. Select "Agent" mode from dropdown
  1. The Last9 MCP server will now be available in VS Code
Note: Replace placeholder values (<auth_token>, <last9_otlp_host>, and <write_refresh_token>) with your actual Last9 credentials.
For advanced configuration options and alternative setup methods, see the official VS Code MCP documentation.