
Log Detective MCP
io.github.fedora-coprPublished by GitHub account fedora-coprv0.7.0Updated Nov 3, 2026
MCP server providing log snippet and Python traceback extraction tools.
Overview
Log Detective's local MCP server; no sign-in required; STDIO.
No AI overview yet: these facts come from the registry entry and the server itself.
Installation
In SourceWeft
- Open Log Detective MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Log Detective MCP
MCP server implementing core log analysis tools of Log Detective for use by other agents.
The server uses the Drain3 algorithm to cluster log messages into templates and extract a representative subset of snippets, reducing large logs to a manageable size for downstream analysis.
Installation
Requires Python 3.11+.
Or with uv:
Usage
Running the server
Or directly:
MCP client configuration
Claude Code
Claude Desktop
Add to your Claude Desktop configuration file:
Tools
extract_log_snippets
Extracts representative log snippets using Drain3 clustering. The tool chunks the log into logical messages, clusters similar messages, and returns one representative snippet per cluster.
Log content can be provided in three ways (exactly one must be used):
The input schema for both tools uses oneOf to require exactly one nonempty
source field. Omitted source fields and fields set to "" do not count as a
source. This matches the rule checked when a tool runs. The advertised tool
definitions conform to the MCP 2025-11-25 Tool schema.
Optional parameters:
Returns a list of Snippet objects, each with line_number (position in the
original log) and text (the extracted snippet content). MCP structured output
wraps this list as {"result": [...]}; the advertised output schema describes
that object.
extract_python_tracebacks
Extracts Python tracebacks from the log, including chained exceptions.
For both extractor tools, context follows grep's -C behavior: the requested
number of surrounding log lines is included on each side when available. The
length limit applies to the extracted snippet or traceback; context lines are
additional, so the returned text can be longer than the limit. With context
enabled, line_number points to the first returned line. Values outside 0-50
are rejected.
If a traceback is truncated, the extractor keeps its beginning and end with a
marker when max_traceback_len permits; smaller limits keep only a prefix.
Following context starts after the original traceback, without restoring its
omitted middle.
If a log line is split into chunks by max_snippet_len, each selected chunk
keeps its own text when context is added. Neighboring lines do not replace it
with the complete long line. Context boundaries follow the chunk's original
source lines, including blank lines omitted from the rendered chunk.
Size limits
All downloaded inputs (via log_url) are limited to 100 MB regardless of format.
Downloads are streamed in chunks and aborted as soon as the limit is exceeded.
Archives read via log_path are also checked against the 100 MB limit during decompression.
Compressed file support
Both tools transparently decompress archived log files. Supported formats:
- Single-file compression:
.gz,.bz2,.xz,.lzma - Archives:
.zip,.tar,.tar.gz,.tar.bz2,.tar.xz
Format is detected from the file extension (or URL path). Archives must contain exactly one file.
Zip bomb protection is enforced via:
- Maximum decompressed size of 100 MB
- Maximum compression ratio of 100:1
- Pre-check of declared sizes in zip/tar headers
- No recursive decompression (nested archives are not unpacked)
Contributing
All changes to this repository must pass pre-commit checks and tests.
To inspect the JSON schemas returned by the installed server, run the check
script with the project's virtual environment. It starts the server over MCP
stdio, validates both tool schemas and structured results, and compares the
returned tool definitions with the files in schemas/:
After an intentional schema change, regenerate those files with:
Source: README.md at commit 9a90d92
Tools
0Version history
4- v0.7.0LatestNov 3, 2026
- v0.6.1Oct 23, 2026
- v0.6.0Oct 23, 2026
- v0.5.2Oct 20, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts