LogAnalyzer MCP Server
LogAnalyzer MCP Server lets you debug logs, scan for errors, run AI-powered root-cause analysis, and monitor log files directly in MCP clients.
rapid_debug: instant triage with root cause, prioritized fixes, and debug commands.quick_scan: ultra-fast local error detection without AI.analyze_log: deeper AI analysis with context lines and format detection.watch_log_file: start monitoring a log file for new errors.stop_watching: stop monitoring a specific file.list_watched_files: list all currently monitored files.get_recent_errors: retrieve recent errors from monitored files.
Supports Docker-ready, cloud-native deployment for containerized log analysis.
Integrates with Google Gemini (gemini-1.5-flash) for intelligent root cause analysis of server logs, providing AI-powered insights and actionable fixes.
Built on Node.js (18+) for log analysis with real-time monitoring capabilities across platforms.
Click on "Deploy 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., "@LogAnalyzer MCP Server rapidly debug these server logs and give me actionable fixes"
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.
LogAnalyzer MCP Server
AI-powered log analysis for your editor. Paste a log or point at a log file, and get the root cause, prioritized fixes, and ready-to-run debug commands, right inside Claude, Cursor, or any other MCP client.
Features
Root-cause analysis: an LLM (Google Gemini or Anthropic Claude) reads your logs and explains what went wrong, with a confidence score.
Actionable fixes: prioritized suggestions plus copy-paste debug commands.
Live monitoring: watch log files and catch new errors as they're written.
Stack trace parsing: Node/V8, Java, and Python traces are parsed into structured fields.
Error history: every analysis is saved to a local SQLite database you can query by file, severity, and date.
Works without an API key: with no key, the server still runs and falls back to local pattern matching.
Related MCP server: Debug MCP
Quick start
You need Node.js 18+ and, for AI analysis, an API key from Google AI Studio or the Anthropic Console.
Claude Code
claude mcp add loganalyzer -e LLM_PROVIDER=anthropic -e ANTHROPIC_API_KEY=your_key -- npx -y loganalyzer-mcpClaude Desktop, Cursor, and other MCP clients
Add this to your client's MCP config (claude_desktop_config.json for Claude Desktop, ~/.cursor/mcp.json for Cursor):
{
"mcpServers": {
"loganalyzer": {
"command": "npx",
"args": ["-y", "loganalyzer-mcp"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key"
}
}
}
}To use Claude instead of Gemini, replace the env block with:
"env": {
"LLM_PROVIDER": "anthropic",
"ANTHROPIC_API_KEY": "your_anthropic_api_key"
}Prefer a global install? Run npm install -g loganalyzer-mcp and use "command": "loganalyzer-mcp" with no args.
Restart your client, then try asking:
Debug these logs and tell me how to fix them: <paste logs>
Start watching /var/log/app.log for errors
Show me all critical errors from the last 24 hoursTools
Tool | What it does | Parameters |
| Fast triage: root cause, prioritized fixes, and debug commands |
|
| Deeper AI analysis with surrounding context |
|
| Local error detection in milliseconds, with no AI call |
|
| Start monitoring a file for new errors |
|
| Stop monitoring a file |
|
| List files being monitored | none |
| Recent errors from monitored files |
|
| Query saved errors with filtering and pagination |
|
The server also exposes three MCP resources: loganalyzer://rapid-debug, loganalyzer://recent-errors, and loganalyzer://watched-files.
Configuration
All settings are environment variables, set in your MCP client's env block or in a .env file.
Variable | Description | Default |
|
|
|
| Required when | none |
| Required when | none |
| Override the model for the selected provider |
|
| Where the SQLite error history is stored |
|
No API key? The server still starts. It logs a warning to stderr, disables AI analysis, and the tools keep working with local pattern matching, file watching, and history.
Troubleshooting
The server exits right away when I run it in a terminal. That's expected. MCP servers talk over stdin/stdout and are started by your MCP client, not run by hand.
Analysis says "AI analysis disabled". No API key matches
LLM_PROVIDER. Check that the key is in your client'senvblock and restart the client.Model not found errors. Your key may not have access to the default model. Set
LLM_MODELto one it does.Install fails while building
better-sqlite3. It's a native module. Make sure you're on a current Node.js LTS release; prebuilt binaries are downloaded for most platforms.File watching doesn't pick anything up. Use an absolute path and check that the file is readable by the user your MCP client runs as.
Development
git clone https://github.com/ChiragPatankar/loganalyzer-mcp.git
cd loganalyzer-mcp
npm ci
npm run build
npm testnpm run dev runs the server from source and npm run analyze <logfile> runs a quick CLI analysis. To test with an MCP client, point it at node /absolute/path/to/loganalyzer-mcp/dist/src/server.js.
More guides:
Contributing
Issues and pull requests are welcome. Please run npm run build && npm test before opening a PR, and open an issue first for larger changes.
License
MIT © Chirag Patankar
Available Tools
7 toolsanalyze_logB
Analyze error logs and provide root cause analysis with AI-powered insights
Inputs: logText (required), contextLines, logFormat.
get_recent_errorsC
Get recent error analysis from monitored files
Inputs: filePath, limit.
list_watched_filesB
List all currently monitored log files
Inputs: no named parameters.
quick_scanB
⚡ Ultra-fast log scan for real-time monitoring (< 1 second)
Inputs: logText (required).
rapid_debugC
🚀 DEBUG SERVER LOGS IN UNDER 30 SECONDS - Instant analysis with actionable fixes and debug commands
Inputs: logText (required).
stop_watchingC
Stop monitoring a specific log file
Inputs: filePath (required).
watch_log_fileC
Start monitoring a log file for real-time error detection
Inputs: filePath (required), pollInterval.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, but 'analyze_log' and 'rapid_debug' could be confused as both involve analyzing logs for debugging, with 'rapid_debug' emphasizing speed and actionable fixes. The other tools like 'list_watched_files', 'stop_watching', and 'watch_log_file' are clearly distinct for file monitoring management.
The naming is mixed with some consistent patterns like verb_noun ('analyze_log', 'watch_log_file', 'stop_watching') but deviations such as 'get_recent_errors' and 'list_watched_files' use different verb styles, and 'quick_scan' and 'rapid_debug' include emojis and marketing language, breaking consistency.
With 7 tools, the count is well-scoped for a log analysis server, covering core operations like analysis, monitoring, and file management without being excessive or too sparse, fitting typical MCP server ranges.
The tool set covers key log analysis workflows including monitoring (watch/stop/list), analysis (analyze/scan/debug), and error retrieval, but lacks explicit tools for configuration management or historical data export, which could be minor gaps in a comprehensive logging system.
Maintenance
Related MCP Connectors
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
The Jam MCP server provides AI tools with instant bug context without manual prompting, enabling a streamlined workflow from bug identification to ticket creation and pull request generation without switching between tools.
Bug fixing for AI-built apps: plain-English diagnosis + a ready fix, in your editor.
Errors, logs and AI-call costs for apps on Node.js, Next.js, Cloudflare Workers or the browser. Ask your AI what’s broken, why, and how to fix it, right inside Cursor or Claude.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn AI-powered server that analyzes system log files to identify errors/warnings and recommend fixes using FastMCP, LangGraph ReAct agents, and Anthropic Claude.1MIT
- AlicenseAqualityDmaintenanceAn intelligent debugging assistant that automates the debugging process by analyzing bugs, injecting HTTP-based debug logs into code across multiple environments (browser, Node.js, mobile, etc.), and iteratively fixing issues based on real-time feedback.8MIT
- AlicenseAqualityCmaintenanceAn MCP server for AI-powered log analysis that enables parsing, searching, and debugging across nine log formats directly within Claude. It features automated error extraction, sensitive data scanning, and streaming support for large log files.1434 PyPI5MIT
- FlicenseNot gradedqualityDmaintenanceAn AI-powered server for code analysis, requirements validation, and automated fix proposals with human-in-the-loop confirmation. It supports multiple LLM providers and ensures safe file modifications through automatic backups and path validation.-