Log Detective MCP
Cluster big logs into representative snippets and extract Python tracebacks for agents
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.7.0
- Listing updated
- today
Similar MCP servers
About Log Detective MCP
Log Detective MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The tools are meant to shrink huge build or test logs before an agent reasons over them. The Drain3 algorithm groups similar log messages into templates and returns one representative snippet per cluster, and a second tool pulls Python tracebacks, including chained exceptions. It implements core log-analysis pieces of the Log Detective project from the Fedora Copr team, packaged for use by other agents.
Logs can arrive as raw text, a file path on the server's filesystem or an HTTP(S) URL, and exactly one source must be given. Options set the maximum number of clusters (default 8), maximum snippet length (2,000 characters), regex skip patterns, and grep-style context lines from 0 to 50 around each hit.
Input is capped at 100 MB, and compressed files are unpacked transparently: .gz, .bz2, .xz, .lzma, .zip and tar variants, with a 100:1 compression-ratio limit and no nested archives. It needs Python 3.11 or later.
Install
Run in a terminal
claude mcp add logdetective-mcp -- uvx logdetective-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"logdetective-mcp": {
"command": "uvx",
"args": [
"logdetective-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"logdetective-mcp": {
"command": "uvx",
"args": [
"logdetective-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"logdetective-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"logdetective-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"logdetective-mcp": {
"command": "uvx",
"args": [
"logdetective-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"logdetective-mcp": {
"command": "uvx",
"args": [
"logdetective-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- extract_log_snippets
- Extract representative log snippets using Drain3 clustering
- extract_python_tracebacks
- Extract Python tracebacks from the log, including chained exceptions
What it does
- Drain3 clustering
- Groups similar messages and returns one snippet per cluster.
- Traceback extraction
- Finds Python tracebacks, including chained exceptions.
- Three input routes
- Accepts text, a server file path or a URL.
- Context lines
- Adds 0 to 50 surrounding lines like grep -C.
- Archive support
- Reads gzip, bzip2, xz, zip and tar logs.
- Zip-bomb limits
- Caps size at 100 MB and compression ratio at 100:1.
Good for
- Reduce a long CI log before sending it to an agent
- Find the traceback behind a failed Python build
- Skip noisy patterns while summarising logs
- Analyse a compressed log archive by URL
Pricing
Open source
Open source Python package
Log Detective MCP FAQ
What Python version is needed?
Python 3.11 or newer.
How large can a log be?
Downloaded inputs and decompressed archives are limited to 100 MB.
Which archive formats work?
gz, bz2, xz, lzma, zip, tar, tar.gz, tar.bz2 and tar.xz, containing exactly one file.
How do I add it to Claude Code?
Run claude mcp add logdetective -- logdetective-mcp after installing the package.
Is Log Detective MCP free?
Yes. Log Detective MCP is open source, so you can use and self-host it for free.
How do I add Log Detective MCP to Claude Code?
Run this command in your terminal: claude mcp add logdetective-mcp -- uvx logdetective-mcp
What are the best alternatives to Log Detective MCP?
The closest alternatives to Log Detective MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


