Skip to main content
Glama
MCP Log Analyzer

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

Related MCP server: Log Analyzer MCP

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      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.
      12
      12
      -
    • A
      license
      A
      quality
      D
      maintenance
      An 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.
      14
      67 PyPI
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A security-focused MCP server that enables automated log retrieval and threat analysis using LangGraph orchestration and RAG. It allows users to detect suspicious activity and generate structured security insights by integrating LLM reasoning with log data and runbook documentation.
      -