log-ai-optimizer
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@log-ai-optimizercheck for anomalies in main.log over the last 15 minutes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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-depsRelated MCP server: Log Analyzer MCP Server
Configure
cp config.example.yaml config.yamlEdit 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.yamlIn a separate process, run the MCP query server (stdio transport):
log-ai-optimizer serve config.yamlTo 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 countsget_template_stats(source_id, since?)— templates sorted by countget_anomalies(source_id, window_minutes)— templates new or spiking vs. prior windowdrill_down(template_id, limit)— sample raw params for a templatesearch_templates(query, source_id?)— substring search over templates
Dev
pip install -r requirements-dev.txt
pip install -e . --no-deps
pytestSee log-compress-spec.md for the full design.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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