An MCP server for log analysis using the LogAI framework, with optional Grafana and GitHub integrations.
A powerful Model Context Protocol (MCP) server that provides a persistent IPython shell per session. The server only exposes a limited number of tools and at the core of it just exposes the following 2 -
call_cli
execute_python_code
And the rest of the tools are more for supporting the LLM to write the code or call the appropriate cli to complete the task. There are some tools for code retrieval based on tree sitter but thats pretty much it.
For example, installing packages or installing cli. Or doing introspection of variables in the ipython shell.
The server also supports adding external mcp servers. The idea here is you can run mcp servers inside the shell that allows you to persist results in the shell with variables and results etc.
One of the primary things I have noticed is that LLMs mess up when provided with a lot of tools and also as is quite evident by now. There are multiple articles and videos (written and shared by people way more qualified than me) and they main theme across them is the problems with tools overload and context limitation.
This server is my attempt at "solving" that problem.
How you ask ?
Note: The core of this approach is:
- All tool calls are persisted to a variable in the shell and the LLM would then write code to inspect the variable, slice/dice and get the required part out of a "gigantic" payload. My idea was similar to when us engineers work with large data we get them into dataframes and then slice/dice to get the required part out.
- CLI calls are composable and that helps the LLM to get only the required content
Both are ways of not polluting the context with useless info.
Sherlog MCP Server transforms Claude Desktop into a stateful data analysis powerhouse by providing:
Think of it as giving Claude a persistent Python notebook that maintains separate workspaces for different conversations, where every piece of data is immediately available for the next operation.
Sherlog MCP Server supports different deployment scenarios through specialized Docker containers:
A lightweight, general-purpose environment optimized for data analysis and development workflows.
Pre-installed Tools:
gh
) - Complete GitHub integration for repository management, issues, PRs, and workflowsBest For: Data analysis, web scraping, API integrations, general development tasks
A specialized environment for Android development and testing workflows.
Pre-installed Tools:
gh
) - Version control and repository managementBest For: Android app development, device testing, mobile automation, CI/CD pipelines
Sherlog MCP Server includes built-in Google OAuth 2.0 support for accessing Google Workspace services (Gmail, Drive, Calendar) directly within IPython sessions. OAuth tokens are securely stored with encryption and automatically refreshed as needed.
Configure with GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
environment variables. When running with HTTP transport, OAuth endpoints are available at /auth/google/*
for authentication flow.
call_cli
interfaceSherlog MCP supports connecting from remote Claude instances via HTTP transport. See Remote Connection Guide for detailed setup instructions.
# Session Management
export MCP_AUTO_RESET_THRESHOLD=200 # Operations before auto-cleanup (default: 200)
export MCP_AUTO_RESET_ENABLED=true # Enable automatic memory management
export MCP_MAX_OUTPUT_SIZE=50000 # Max output size per buffer (default: 50KB)
export MCP_MAX_SESSIONS=4 # Maximum concurrent sessions (default: 4)
# Logging
export LOG_LEVEL=INFO
Connect any MCP server to execute within the IPython workspace:
export EXTERNAL_MCPS_JSON='{
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "$DATABASE_URL"
}
}
}'
While Sherlog MCP includes many tools natively, you can connect any MCP server to extend functionality. External tools are automatically integrated into the IPython workspace:
external_[server]_[tool]
"-e", "EXTERNAL_MCPS_JSON={\"postgres\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-postgres\"],\"env\":{\"DATABASE_URL\":\"$DATABASE_URL\"}}}"
This MCP server is designed to be deployed on Railway with persistent session storage.
The server automatically persists IPython shell sessions across container restarts using:
/app/data/sessions/
session_metadata.json
for session timing and statesession_registry.json
to restore shells on startupWhen deploying to Railway, the /app/data
directory is automatically persisted through Railway's persistent storage. This ensures that:
No additional configuration is needed for Railway deployment - the persistent volume is automatically mounted.
Claude Desktop
↓
Sherlog MCP Server (http)
↓
Session Middleware (manages shells)
↓
IPython Shells (one per session)
├── Built-in Tools (return DataFrames)
├── External MCP Tools (via proxy)
└── User Code (execute_python_code)
└── User CLI (call_cli)
External MCP tools integrate seamlessly:
Example flow:
Apache License 2.0 - see LICENSE file for details.
Armin's article How to fix your context MCPs are Boring - Recommended using eval as the only tool Alita paper - This paper kind of influenced me as well
Search and access Laravel documentation from version 6.x onwards, with automatic daily updates.
Analyzes audio files and extracts metadata, tailored for game audio development workflows.
Run Python in a code sandbox.
Check software end-of-life (EOL) dates and support status using the endoflife.date API to provide accurate lifecycle and security information.
🍎 MCP server for Xcode's xctrace, xcrun, xcodebuild.
Edit the mcp.json configuration file for tools like AWS Q Developer and Claude Desktop.
Access and manage Grafana resources, including dashboards, datasources, Prometheus, Loki, and alerting.
A server for managing structured project context using SQLite, with support for vector embeddings for semantic search and Retrieval Augmented Generation (RAG).
Analyzes MicroShift test failures from Google Sheets to correlate them with specific MicroShift versions.
A Binary Ninja plugin, MCP server, and bridge that seamlessly integrates Binary Ninja with your favorite MCP client.