Skip to main content
Glama
JustinHabashi

log-ai-optimizer

log-ai-optimizer

Compresses log files into templates + stats (via Drain3) and exposes them to Claude through an MCP server, so AI log monitoring reads compact stats instead of raw lines.

Install

python -m venv .venv
.venv/Scripts/activate        # or: source .venv/bin/activate
pip install -r requirements.txt
pip install -e . --no-deps

Related MCP server: Log Analyzer MCP Server

Configure

cp config.example.yaml config.yaml

Edit config.yaml: list the log file paths to tail, plus DB path and sampling caps.

Run

Start ingestion (tails files, mines templates, writes to SQLite — keep this running):

log-ai-optimizer ingest config.yaml

In a separate process, run the MCP query server (stdio transport):

log-ai-optimizer serve config.yaml

To use it from Claude Desktop/Code, add it as an MCP server pointing at that command, e.g.:

{
  "mcpServers": {
    "log-ai-optimizer": {
      "command": "log-ai-optimizer",
      "args": ["serve", "/path/to/config.yaml"]
    }
  }
}

MCP tools

  • list_sources() — sources with template/line counts

  • get_template_stats(source_id, since?) — templates sorted by count

  • get_anomalies(source_id, window_minutes) — templates new or spiking vs. prior window

  • drill_down(template_id, limit) — sample raw params for a template

  • search_templates(query, source_id?) — substring search over templates

Dev

pip install -r requirements-dev.txt
pip install -e . --no-deps
pytest

See log-compress-spec.md for the full design.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A Python-based MCP server that enables AI-assisted log file analysis with features for filtering, parsing, and interpreting log outputs, plus executing and analyzing test runs with varying verbosity levels.
    Last updated
    12
    11
  • A
    license
    -
    quality
    D
    maintenance
    An MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.
    Last updated
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.
    Last updated
    7
    95
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Aggregates logs from multiple processes and provides an MCP server for AI agents to access, search, and manage logs in real-time.
    Last updated
    84
    90
    BSD 3-Clause

View all related MCP servers

Related MCP Connectors

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustinHabashi/log-ai-optimizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server