Skip to main content
Glama

MCP Log Analyzer

🔍 MCP Log Analyzer

The MCP Log Analyzer is an AI-powered Streamlit app designed to analyze system log files, identify errors and warnings, and recommend fixes. It uses FastMCP, LangGraph ReAct agents, and Anthropic Claude LLM to build a powerful multi-agent system.


📁 Project Structure

├── analyzer.py # MCP server with two tools: analyze_logs & suggest_fix ├── streamlit_ui.py # Streamlit web interface ├── streamlit_client.py # MCP client invoking tools via LangGraph + Claude ├── mcp_config_2.json # JSON config for MCP server commands ├── test_model.py # Placeholder test script ├── README.md # ← You're here ├── temp/ # Temporary files ├── Test logs/ # Sample or uploaded logs ├── Screenshots/ # UI screenshots ├── .venv/ # Python virtual environment

Create Virtual Environment

python -m venv .venv ..venv\Scripts\activate

Install Dependencies

pip install -r requirements.txt

If requirements.txt doesn't exist, here are the needed packages:

pip install streamlit langchain langgraph langchain-anthropic anyio nest_asyncio pip install mcp langchain-mcp-adapters

🧪 Run MCP Tool Server

python analyzer.py

🧠 Run the Streamlit Client App

streamlit run streamlit_ui.py

🧾 Sample mcp_config_2.json

{ "mcpServers": { "LogAnalyzer": { "command": "{Your-directory}\uv.EXE", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "{Your-directory}\analyzer.py" ] } } }

📦 Log File Format

Uploaded logs should be a list of JSON objects like:

[ { "timestamp": "2025-07-26T12:30:01Z", "level": "ERROR", "component": "DataProcessor", "message": "NullPointerException in AuthService", "stack_trace": "java.lang.NullPointerException..." }, ... ]

📌 Notes

Claude API key is required in streamlit_client.py. Replace 'Your-API-Key' with your actual key.

If using TCP transport instead of stdio (recommended on Windows), modify the server and client configs accordingly.

You can customize or add new tools in analyzer.py and expose them via @mcp.tool().

🧠 Credits

Built using:

LangChain MCP :- https://github.com/langchain-ai/langchain/tree/main/libs/langchain-mcp-adapters

Anthropic Claude :- https://www.anthropic.com/

Streamlit :- https://streamlit.io/

LangGraph Agents :- https://github.com/langchain-ai/langgraph

🛠️ Future Improvements

Add support for batch analysis or CSV uploads

Save session history

Enable tool reordering / multiple MCPs

Deploy to Hugging Face / Streamlit Cloud

Screenshots :-

📃 License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

An AI-powered server that analyzes system log files to identify errors/warnings and recommend fixes using FastMCP, LangGraph ReAct agents, and Anthropic Claude.

  1. 📁 Project Structure
    1. Create Virtual Environment
      1. Install Dependencies
        1. If requirements.txt doesn't exist, here are the needed packages:
      2. 🧪 Run MCP Tool Server
        1. 🧠 Run the Streamlit Client App
          1. 🧾 Sample mcp_config_2.json
            1. 📦 Log File Format
              1. 📌 Notes
                1. 🧠 Credits
                  1. 🛠️ Future Improvements
                    1. Screenshots :-
                      1. 📃 License

                        Related MCP Servers

                        • -
                          security
                          F
                          license
                          -
                          quality
                          An MCP server that allows AI assistants to access AWS CloudWatch logs by listing log groups and reading log entries.
                          Last updated -
                          25
                          Python
                        • -
                          security
                          A
                          license
                          -
                          quality
                          A file monitoring server that tracks filesystem events and provides real-time notifications to AI assistants, enabling them to automatically respond to file changes without manual updates.
                          Last updated -
                          15
                          Python
                          MIT License
                        • A
                          security
                          F
                          license
                          A
                          quality
                          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
                          1
                          Python
                        • -
                          security
                          A
                          license
                          -
                          quality
                          A sophisticated server that enables AI assistants to automatically analyze codebases and generate comprehensive, professional documentation.
                          Last updated -
                          3
                          Python
                          MIT License
                          • Linux
                          • Apple

                        View all related MCP servers

                        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/Tushar-Shrivastava/Loganalyzer'

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