MCP Server for Logz.io

by jklnr

220 downloads
Not rated
GitHub

About

MCP Server for Logz.io is a Model Context Protocol server that enables AI assistants like Claude to interact with Logz.io’s log management platform. It translates natural language requests into log searches, Lucene queries, and aggregated statistics.

Details

Author
jklnr
Downloads
220
Categories
Other

- Search logs with simple text and time filters
- Execute advanced Lucene queries for precise analysis
- Retrieve aggregated log statistics and metrics
- Supports six geographic regions (us, us-west, eu, ca, au, uk)
- Configurable timeout, retry attempts, and max results
- Built with TypeScript and Node.js 18+

Add the server to your Claude/Cursor/etc configuration using npx with your Logz.io API key and optional region. Example: "command": "npx", "args": ["-y", "mcp-server-logzio", "apiKey", "YOUR_LOGZIO_API_KEY"]. The US region is the default; for other regions add "region", "eu" (or another region code). Use logzioUrl for a custom API endpoint.

MCP Server for Logz.io

License: MIT
Node.js Version
TypeScript

A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Logz.io's log management platform. Search logs, execute complex queries, and retrieve statistics - all through natural language interactions.

✨ Features

- 🔍 Search Logs: Simple text searches with time ranges and filters
- 🧮 Advanced Queries: Execute powerful Lucene queries for precise log analysis
- 📊 Statistics: Retrieve aggregated log metrics and trends

🚀 Quick Start

Add this to your Claude/Cursor/etc configuration file:

{
  "mcpServers": {
    
    # other servers ...
    
    "logzio": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-logzio", 
        "apiKey", "YOUR_LOGZIO_API_KEY"
      ]
    }
  }
}

US is the default region. For other regions:

{
  "mcpServers": {
    
    # other servers ...
    
    "logzio": {
      "command": "npx", 
      "args": [
        "-y",
        "mcp-server-logzio",
        "apiKey", "YOUR_LOGZIO_API_KEY",
        "region", "eu" # add this for example
      ]
    }
  }
}

🛠️ Advanced Configuration

Command Line Arguments

| Argument | Description | Default | Required |
|----------|-------------|---------|----------|
| apiKey <key> | Your Logz.io API key | - | Yes |
| region <region> | Logz.io region (us, us-west, eu, ca, au, uk) | us | No |
| logzioUrl <url> | Custom Logz.io API URL (overrides region) | - | No |
| --timeout <ms> | Request timeout | 30000 | No |
| --retry-attempts <num> | Retry attempts | 3 | No |
| --max-results <num> | Max results per query | 1000 | No |

Supported Regions

The server automatically maps region codes to the correct Logz.io API endpoints:

| Region Code | Description | API Endpoint |
|-------------|-------------|--------------|
| us | US East (default) | https://api.logz.io |
| us-west | US West | https://api-wa.logz.io |
| eu | Europe | https://api-eu.logz.io |
| ca | Canada | https://api-ca.logz.io |
| au | Australia | https://api-au.logz.io |
| uk | United Kingdom | https://api-uk.logz.io |

Finding Your Region: Log into your Logz.io account and check the URL in your browser:
- https://app.logz.io → use region us
- https://app-eu.logz.io → use region eu
- https://app-ca.logz.io → use region ca
- etc.

🔧 Available Tools

search_logs

Search through logs with simple queries and filters.

Parameters:
- query (required): Search query string
- timeRange: Time range (1h, 6h, 12h, 24h, 3d, 7d, 30d)
- from/to: Custom time range (ISO 8601)
- logType: Filter by log type
- severity: Filter by severity level
- limit: Maximum results (1-1000)
- sort: Sort order (asc/desc)

query_logs

Execute advanced Lucene queries for precise log analysis.

Parameters:
- luceneQuery (required): Lucene query string
- from/to: Time range (ISO 8601)
- size: Maximum results (1-1000)
- sort: Sort order (asc/desc)

get_log_stats

Retrieve aggregated log statistics and metrics.

Parameters:
- timeRange: Time range (1h, 6h, 12h, 24h, 3d, 7d, 30d)
- from/to: Custom time range (ISO 8601)
- groupBy: Fields to group by

🏗️ Development, if you want to mess with the code

Prerequisites

- Node.js 18+
- TypeScript 5.3+
- Valid Logz.io account and API key

Setup

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.