- Home
- MCP servers
- Log Analyzer
Log Analyzer
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"tushar-shrivastava-loganalyzer": {
"command": "{Your-directory}\\\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"{Your-directory}\\\\analyzer.py"
],
"env": {
"CLAUDE_API_KEY": "YOUR-CLAUDE-API-KEY"
}
}
}
}You can run the MCP Log Analyzer as a local, multi-agent server that processes system logs, detects errors and warnings, and suggests fixes. This setup lets you orchestrate an analysis tool and a Streamlit client through MCP, with explicit tool endpoints for log analysis and fix suggestions.
How to use
You will run the MCP Log Analyzer and connect a client that invokes its analysis tools. The server exposes two tools: analyze_logs and suggest_fix. Start the MCP server locally, then launch the Streamlit client to upload logs and view results. The multi-agent workflow uses LangGraph and Claude to reason about log data and propose actionable fixes. You interact with the system by feeding it log data in the expected JSON format and requesting analyses or suggested fixes.
How to install
Prerequisites: Python, a Node.js runtime is not required for the server itself, but you will run a local MCP server binary and a Python script as part of the workflow.
-
Create a working directory for the MCP Log Analyzer project.
-
Set up a Python virtual environment (recommended) and install dependencies if needed by your environment.
-
Ensure you have the MCP server tooling in place. The sample configuration demonstrates how to run the MCP server and expose its tools. You will configure the MCP server with a stdio-based command pointing to the uv executable and the analyzer script.
-
Prepare the MCP configuration snippet (see the example block below) and place it where your MCP client expects the configuration.
MCP server configuration example
{
"mcpServers": {
"loganalyzer": {
"command": "{Your-directory}\\uv.EXE",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"{Your-directory}\\analyzer.py"
]
}
}
}
Run and usage notes
To start the MCP server locally, run the provided Python analyzer script as part of the MCP pipeline. Then start the Streamlit client interface to interact with the two tools. The client will invoke analyze_logs to inspect uploaded logs and suggest_fix to provide remediation steps.
Notes on environment and API keys
If your Streamlit client integrates with Claude via LangGraph, you will need an Anthropic Claude API key. Set this in the environment for the client as CLAUDE_API_KEY with a value like YOUR-CLAUDE-API-KEY.
Troubleshooting
If you encounter transport issues, ensure the MCP server is reachable via the configured stdio command. If you prefer a different transport, you can modify the server and client configs accordingly. Verify that the analyzer.py script is accessible and that uv.EXE is executable in your environment.
Security and data handling
Uploaded logs should be treated with appropriate data handling policies. Ensure that sensitive information is redacted or handled according to your security requirements before analysis.
Examples and capabilities
Tools available in the server include analyze_logs for parsing and identifying issues in logs and suggest_fix for generating recommended remediation steps. Use these endpoints to build automated incident response or debugging workflows.
License
MIT License
Available tools
analyze_logs
Tool that analyzes a set of log entries to identify errors, warnings, and patterns that indicate root causes or recurring issues.
suggest_fix
Tool that suggests actionable fixes and remediation steps based on analyzed log data and context from multiple agents.