Skip to main content
Glama
Logz.io MCP Server

Logz.io MCP Server

by jklnr

MCP Server for Logz.io

License: MIT Node.js Version TypeScript

Open source Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Logz.io's log management platform. Includes tools for simple log search, Lucene query search, and fetching basic statistics from Logz.io.

πŸš€ 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
      ]
    }
  }
}

Related MCP server: Graylog MCP Server

πŸ› οΈ 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

These are the tools your agent will see.

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

For more advanced search using Lucene queries

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 24.14.0+

  • TypeScript 5.8+

  • Valid Logz.io account and API key

Setup

# Clone the repository
git clone https://github.com/jklnr/logzio-mcp-server.git
cd mcp-server-logzio

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run in development mode
npm run dev

Scripts

  • npm run build - Compile TypeScript

  • npm run dev - Run in development mode

  • npm test - Run test suite

  • npm run format - Format code with Prettier

  • npm run type-check - Type check without emission

πŸ“ Project Structure

mcp-server-logzio/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/           # Logz.io API client and types
β”‚   β”œβ”€β”€ tools/         # MCP tool implementations
β”‚   β”œβ”€β”€ utils/         # Utilities (logging, errors)
β”‚   β”œβ”€β”€ config.ts      # Configuration management
β”‚   β”œβ”€β”€ server.ts      # MCP server implementation
β”‚   └── index.ts       # Entry point
β”œβ”€β”€ tests/             # Test suites
β”œβ”€β”€ examples/          # Usage examples
β”œβ”€β”€ docs/              # Documentation
└── dist/              # Compiled output

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to query and analyze logs from Graylog instances using universal search with relative or absolute time windows, supporting both full result retrieval and lightweight count-only queries.
      70 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and analyze logs in Graylog using three powerful tools: generic log search with Lucene queries, smart UUID/trace ID lookup across multiple fields, and stream-specific message retrieval with automatic field normalization.
      39 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP-compatible AI clients to search and retrieve Elasticsearch application logs through a provided search tool.
      Apache 2.0