@rog0x/mcp-log-tools
A set of MCP tools for parsing, filtering, analyzing, formatting, and computing stats on logs in common formats (JSON, Apache/Nginx, syslog, structured, custom regex).
README
@rog0x/mcp-log-tools
Log analysis and processing tools for AI agents, exposed via the Model Context Protocol (MCP).
Tools
parse_logs
Parse log content in common formats: JSON logs, Apache/Nginx access logs, syslog, and structured logs. Supports custom regex patterns with named capture groups. Extracts timestamp, level, message, source, and additional structured fields.
filter_logs
Filter parsed log entries by:
- Log level (ERROR, WARN, INFO, DEBUG)
- Date range (ISO 8601)
- Keyword search (case-insensitive)
- Regex pattern matching
- Source/logger name
Returns matched entries along with level occurrence counts.
analyze_logs
Analyze log patterns to surface operational insights:
- Top 10 most frequent errors (normalized)
- Error rate over time (hourly buckets)
- Request volume per hour
- Slowest endpoints (from HTTP access logs)
- Anomaly detection (sudden spikes or drops using standard deviation)
format_logs
Convert between log formats and produce reports:
- JSON to plain text, plain to JSON, CSV, or table
- ANSI colorization by log level
- Structured field extraction
- Summary report generation
log_stats
Compute comprehensive log statistics:
- Total and non-empty line counts
- Level distribution with percentages
- Date range coverage
- Unique IP addresses and request counts
- Top user agents
- HTTP status code distribution
- Throughput (entries per second)
Setup
npm install
npm run build
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"log-tools": {
"command": "node",
"args": ["path/to/mcp-log-tools/dist/index.js"]
}
}
}
Supported Log Formats
| Format | Example |
|---|---|
| JSON | {"timestamp":"2024-01-15T10:30:00Z","level":"ERROR","message":"Connection failed"} |
| Apache/Nginx | 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /index.html HTTP/1.1" 200 2326 |
| Syslog | Jan 1 00:00:00 hostname process[1234]: Something happened |
| Structured | 2024-01-15T10:30:00.000Z [ERROR] [ModuleName] Something failed |
| Custom | Any format using a regex with named capture groups |
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.