JSON Logs MCP Server
@mfreeman451
About JSON Logs MCP Server
MCP server for Python JSON logs
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"json-logs": {
"command": "python",
"args": [
"/Users/mfreeman/src/nco/json_logs_mcp_server.py"
],
"cwd": "/Users/mfreeman/src/nco"
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is JSON Logs MCP Server?
A Model Context Protocol (MCP) server that enables Claude Desktop (or any MCP client) to read and analyze JSON-formatted log files. It provides tools for searching, filtering, aggregating, and analyzing structured log data.
How to use JSON Logs MCP Server?
Clone the repository, create a virtual environment, install the package, create a wrapper script, and set the MCP_JSON_LOGS_DIR environment variable to point to your log directory. Add the server to Claude Desktop’s configuration file under mcpServers. Once configured, interact with your logs through Claude Desktop by asking questions like “Show me all ERROR logs from today” or “Group logs by level”.
Key features of JSON Logs MCP Server
- Browse and list JSON log files with metadata
- Search logs by level, module, function, message content, and time range
- Aggregate log data by level, module, function, or hour
- Get comprehensive statistics about log files
- On-demand loading optimized for large log files
Use cases of JSON Logs MCP Server
- Finding all ERROR and CRITICAL logs from the last hour
- Analyzing which module generates the most warnings
- Debugging database connection errors by examining context
- Getting a breakdown of log levels across all files
- Investigating authentication failures in a specific time window
FAQ from JSON Logs MCP Server
Why won't the server start?
Ensure Python 3.8+ is installed, all dependencies are installed (pip install -e .), and the log directory exists and contains .log files.
Tools are not appearing in Claude Desktop?
Restart Claude Desktop after configuration changes, check the "Connect Apps" section, look for error messages in the developer console, and verify the server shows as "Connected".
No logs are found?
Verify log files exist in the configured directory, have a .log extension, are in the correct JSON format (one JSON object per line), and contain all required fields (timestamp, level, message, module, function, line).
I get a "spawn python ENOENT" error?
Use python3 instead of python in your configuration, provide the full absolute path to the wrapper script, and ensure the wrapper script is executable (chmod +x run-json-logs-server.sh).
How are large log files handled?
Log files are loaded on-demand, not all at once. Large files (>100MB) may take a moment to process. Use the limit parameter in queries to control result size. Consider rotating log files to maintain performance.
Frequently asked questions
Why won't the server start?
Ensure Python 3.8+ is installed, all dependencies are installed (`pip install -e .`), and the log directory exists and contains `.log` files.
Tools are not appearing in Claude Desktop?
Restart Claude Desktop after configuration changes, check the "Connect Apps" section, look for error messages in the developer console, and verify the server shows as "Connected".
No logs are found?
Verify log files exist in the configured directory, have a `.log` extension, are in the correct JSON format (one JSON object per line), and contain all required fields (timestamp, level, message, module, function, line).
I get a "spawn python ENOENT" error?
Use `python3` instead of `python` in your configuration, provide the full absolute path to the wrapper script, and ensure the wrapper script is executable (`chmod +x run-json-logs-server.sh`).
How are large log files handled?
Log files are loaded on-demand, not all at once. Large files (>100MB) may take a moment to process. Use the `limit` parameter in queries to control result size. Consider rotating log files to maintain performance.
Basic information
More Developer Tools MCP servers
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
endoflife.ai
endoflife.aiFree MCP server for software end-of-life intelligence: EOL dates, support status, and the 0-100 EOL Risk Score across 485 tracked products. Agents can check a single version, pull a product's full lifecycle schedule, or
Serena
oraiosA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent
MCP-Scan: An MCP Security Scanner
invariantlabs-aiSecurity scanner for AI agents, MCP servers and agent skills.
DevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
Comments