Skip to main content

Model Context Protocol (MCP)

Early Access

Try our newest feature! Only available through reach out. Contact us to join the early access program and get priority support.

Unizo offers an MCP server that integrates observability platforms with any LLM provider supporting the MCP protocol. This enables your AI agent to analyze logs, metrics, and traces, investigate issues, and automate monitoring workflows across Datadog, New Relic, Splunk, and other observability tools via a single MCP server.

Supported Tools & Use Cases

The following tools are available in the Observability MCP Server:

Tool NameDescription
search_logsSearch and analyze log data across multiple sources with advanced filtering
query_metricsRetrieve and analyze time-series metrics for performance and security monitoring
trace_requestsFollow distributed traces to understand request flow and identify bottlenecks
list_alertsBrowse and manage active and historical alerts
analyze_anomaliesDetect and investigate anomalous patterns in logs and metrics
create_monitorCreate or update monitoring rules and alerts programmatically

search_logs

Search and analyze log data across multiple sources with advanced filtering

Parameters:

  • integration: Target observability platform integration (required)
  • query: Search query using platform-specific syntax or natural language
  • time_range: Time period to search (e.g., "last_1h", "2024-01-01 to 2024-01-02")
  • service: Filter by specific service or application
  • severity: Filter by log level (error, warning, info, debug)
  • limit: Maximum number of results to return
  • include_context: Include surrounding log entries for context

query_metrics

Retrieve and analyze time-series metrics for performance and security monitoring

Parameters:

  • integration: Target observability platform integration (required)
  • metric: Metric name or pattern to query (required)
  • aggregation: Aggregation method (avg, sum, max, min, count)
  • group_by: Dimensions to group results by
  • time_range: Time period for the query
  • filters: Additional filters for the metric query
  • include_forecast: Include predictive analysis

trace_requests

Follow distributed traces to understand request flow and identify bottlenecks

Parameters:

  • integration: Target observability platform integration (required)
  • trace_id: Specific trace ID to retrieve
  • service: Filter traces by service
  • operation: Filter by specific operation or endpoint
  • duration_threshold: Find traces exceeding duration
  • error_only: Only return traces with errors
  • time_range: Time period to search for traces

list_alerts

Browse and manage active and historical alerts

Parameters:

  • integration: Target observability platform integration (required)
  • status: Filter by alert status (active, resolved, silenced)
  • severity: Filter by severity level (critical, high, medium, low)
  • service: Filter alerts by affected service
  • time_range: Time period for historical alerts
  • include_metrics: Include related metrics with alerts

analyze_anomalies

Detect and investigate anomalous patterns in logs and metrics

Parameters:

  • integration: Target observability platform integration (required)
  • data_source: Type of data to analyze (logs, metrics, traces)
  • baseline_period: Period to use for normal behavior baseline
  • sensitivity: Anomaly detection sensitivity (low, medium, high)
  • dimensions: Specific dimensions to analyze
  • correlation: Enable cross-metric correlation

create_monitor

Create or update monitoring rules and alerts programmatically

Parameters:

  • integration: Target observability platform integration (required)
  • name: Monitor name (required)
  • type: Monitor type (metric, log, composite)
  • query: Monitoring query or condition (required)
  • threshold: Alert threshold values
  • notification_channels: Where to send alerts
  • tags: Tags for organization and filtering

Installation

Prerequisites

  • A Unizo API key
  • An active Observability integration (Datadog, New Relic)
  • Node.js v20 or higher

MCP Configuration

Here is an example configuration for setting up the Unizo Observability MCP server:

{
"mcpServers": {
"unizo-observability": {
"command": "npx",
"args": [
"mcp-remote",
"http://api.unizo.ai/mcp/observability",
"--allow-http",
"--header",
"apikey:${UNIZO_API_KEY}"
],
"env": {
"UNIZO_API_KEY": "your_api_key"
}
}
}
}

Client Setup

For detailed setup instructions with specific AI clients:

Environment Variables

The following environment variables are required:

Error Handling

All tools return errors in a consistent format:

{
"error": {
"code": "LOG_SOURCE_NOT_FOUND",
"message": "Log source 'nginx-error' not found"
}
}

Common error codes:

  • INTEGRATION_NOT_FOUND: Invalid integration ID
  • LOG_SOURCE_NOT_FOUND: The specified log source was not found
  • METRIC_NOT_AVAILABLE: Metric is missing or invalid
  • TRACE_NOT_FOUND: Trace ID not found in the system
  • RATE_LIMIT_EXCEEDED: API rate limit reached
  • UNAUTHORIZED: Invalid API key or insufficient permissions