Sponsored by Deepsite.site

MCP Server for Logz.io

Created By
jklnr7 months ago
Unofficial mcp server for logz.io
Content

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

ArgumentDescriptionDefaultRequired
apiKey <key>Your Logz.io API key-Yes
region <region>Logz.io region (us, us-west, eu, ca, au, uk)usNo
logzioUrl <url>Custom Logz.io API URL (overrides region)-No
--timeout <ms>Request timeout30000No
--retry-attempts <num>Retry attempts3No
--max-results <num>Max results per query1000No

Supported Regions

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

Region CodeDescriptionAPI Endpoint
usUS East (default)https://api.logz.io
us-westUS Westhttps://api-wa.logz.io
euEuropehttps://api-eu.logz.io
caCanadahttps://api-ca.logz.io
auAustraliahttps://api-au.logz.io
ukUnited Kingdomhttps://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

# Clone the repository
git clone https://github.com/modelcontextprotocol/mcp-server-logzio.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

🙏 Acknowledgments

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.