Model Context Protocol (MCP)
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 Name | Description |
|---|---|
list_services | Get list of available observability services |
list_integrations | Get integrations for a specific observability service |
list_logs | Browse and search logs with advanced filtering and pagination |
get_log_details | Retrieve comprehensive log entry information |
list_services
Get list of available observability services
Parameters: None
Returns: List of available observability services
Example Response:
[
{ "name": "elasticsearch" },
{ "name": "splunk" },
{ "name": "datadog" },
{ "name": "newrelic" },
{ "name": "prometheus" }
]
list_integrations
Get integrations for a specific observability service
Parameters:
service(string, required): Name of the observability service (e.g., "elasticsearch", "splunk", "datadog")
Returns: List of integrations available for the specified service
Example Response:
[
{
"id": "integration-obs-123",
"name": "Production Logging Integration"
},
{
"id": "integration-obs-456",
"name": "Development Environment Logs"
}
]
list_logs
Browse and search logs with advanced filtering and pagination options
Parameters:
integration_id(string, required): Unique identifier for the integrationoffset(integer, optional): Number of records to skip for pagination (default: 0)limit(integer, optional): Maximum number of records to return (default: 20, max: 100)sort(string, optional): Field to sort by, prefixed with '-' for descending order- Valid sort fields:
timestamp,level,source,message - Examples:
-timestamp(newest first),level(ascending),-level(severity order)
- Valid sort fields:
Returns: Paginated list of log entries with filtering applied
Example Response:
{
"status": "success",
"message": "Retrieved 25 logs",
"data": {
"logs": [
{
"id": "log-2024-09-10-14-30-15-abc123",
"level": "ERROR",
"message": "Failed to process payment transaction: Connection timeout after 30s",
"source": "payment-service",
"timestamp": "2024-09-10T14:30:15Z",
"metadata": {
"service": "payment-service",
"environment": "production",
"region": "us-east-1",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"spanId": "b7ad6b7169203331",
"hostname": "payment-service-01",
"version": "1.2.3",
"tags": ["payment", "transaction", "timeout"]
},
"changeLog": {
"createdDateTime": "2024-09-10T14:30:15Z",
"createdBy": {
"id": "system",
"firstName": "System",
"lastName": "Logger"
}
}
},
{
"id": "log-2024-09-10-14-29-45-def456",
"level": "INFO",
"message": "User authentication successful for user ID: 12345",
"source": "auth-service",
"timestamp": "2024-09-10T14:29:45Z",
"metadata": {
"service": "auth-service",
"environment": "production",
"region": "us-east-1",
"traceId": "00-1bf8762827de54ff9559ab302d91827f-c8e4586412b53462-01",
"spanId": "c8e4586412b53462",
"hostname": "auth-service-02",
"version": "2.1.0",
"tags": ["authentication", "success", "user"]
}
}
],
"pagination": {
"total": 1250,
"offset": 0,
"limit": 20,
"next": 20
},
"total_count": 1250
}
}
get_log_details
Get detailed information about a specific log entry
Parameters:
integration_id(string, required): Unique identifier for the integrationlog_id(string, required): Unique identifier of the log entry
Returns: Comprehensive log entry information including all metadata
Example Response:
{
"status": "success",
"message": "Retrieved log details for log-2024-09-10-14-30-15-abc123",
"data": {
"log": {
"id": "log-2024-09-10-14-30-15-abc123",
"level": "ERROR",
"message": "Failed to process payment transaction: Connection timeout after 30s",
"source": "payment-service",
"timestamp": "2024-09-10T14:30:15Z",
"metadata": {
"service": "payment-service",
"environment": "production",
"region": "us-east-1",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01",
"spanId": "b7ad6b7169203331",
"hostname": "payment-service-01",
"version": "1.2.3",
"tags": ["payment", "transaction", "timeout"]
},
"changeLog": {
"createdDateTime": "2024-09-10T14:30:15Z",
"lastUpdatedDateTime": "2024-09-10T14:30:15Z",
"createdBy": {
"href": "/users/system",
"id": "system",
"firstName": "System",
"lastName": "Logger",
"avatar": {
"small": "/avatars/system-small.png"
}
}
}
}
}
}
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",
"https://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:
UNIZO_API_KEY: Your Unizo API key Your Unizo API key
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 IDLOG_SOURCE_NOT_FOUND: The specified log source was not foundMETRIC_NOT_AVAILABLE: Metric is missing or invalidTRACE_NOT_FOUND: Trace ID not found in the systemRATE_LIMIT_EXCEEDED: API rate limit reachedUNAUTHORIZED: Invalid API key or insufficient permissions