
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server that lets MCP clients read and analyze JSON-formatted log files through searching, filtering, aggregation, and statistics tools.
JSON Logs MCP Server is cataloged as an MCP server attributed to mfreeman451. A Model Context Protocol server that lets MCP clients read and analyze JSON-formatted log files through searching, filtering, aggregation, and statistics tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for JSON Logs MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It expects JSON log files with one JSON object per line, including fields such as timestamp, level, message, module, function, and line.
Yes, the log directory can be set via the MCP_JSON_LOGS_DIR environment variable.
README.md · 824aeedc7fe8 · Fetched 2026-11-13 10:36:36 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol (MCP) server that enables Claude Desktop (or any MCP client) to read and analyze JSON-formatted log files. This server provides tools for searching, filtering, aggregating, and analyzing structured log data.
git clone https://github.com/mfreeman451/json-logs-mcp-server.git
cd json-logs-mcp-server
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .
cat > run-json-logs-server.sh << 'EOF'
#!/bin/bash
cd "$(dirname "$0")"
source .venv/bin/activate
exec python json_logs_mcp_server.py
EOF
chmod +x run-json-logs-server.sh
By default, the server looks for logs in the ./logs directory relative to where it's run. You can change this by setting an environment variable or editing the code:
Option 1: Environment Variable
export MCP_JSON_LOGS_DIR="/path/to/your/logs"
Add the server to your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"json-logs": {
"command": "/absolute/path/to/run-json-logs-server.sh",
"args": [],
"env": {
"MCP_JSON_LOGS_DIR": "/path/to/your/logs"
}
}
}
}
Important: Use the absolute path to the wrapper script.
The server expects JSON log files with one JSON object per line. Each log entry should include these fields:
{
"timestamp": "2024-01-15T10:30:45.123456",
"level": "INFO",
"message": "User authentication successful",
"module": "auth.handler",
"function": "authenticate_user",
"line": 42
}
timestamp - ISO format timestamplevel - Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)message - Log messagemodule - Module namefunction - Function nameline - Line numberCreate a file named example.log with the following content to test the server:
{"timestamp": "2024-01-15T10:30:45.123456", "level": "INFO", "message": "Application started successfully", "module": "main", "function": "startup", "line": 15}
{"timestamp": "2024-01-15T10:30:46.234567", "level": "DEBUG", "message": "Loading configuration from config.json", "module": "config.loader", "function": "load_config", "line": 42}
{"timestamp": "2024-01-15T10:30:47.345678", "level": "INFO", "message": "Database connection established", "module": "db.connection", "function": "connect", "line": 78}
{"timestamp": "2024-01-15T10:31:02.456789", "level": "WARNING", "message": "Rate limit approaching: 85% of quota used", "module": "api.ratelimit", "function": "check_limits", "line": 156}
{"timestamp": "2024-01-15T10:32:15.567890", "level": "ERROR", "message": "Failed to authenticate user: Invalid credentials", "module": "auth.handler", "function": "authenticate_user", "line": 203}
{"timestamp": "2024-01-15T10:32:16.678901", "level": "INFO", "message": "Retry attempt 1/3 for user authentication", "module": "auth.handler", "function": "retry_auth", "line": 215}
{"timestamp": "2024-01-15T10:33:45.789012", "level": "CRITICAL", "message": "Database connection lost: Connection timeout", "module": "db.connection", "function": "health_check", "line": 92}
{"timestamp": "2024-01-15T10:33:46.890123", "level": "INFO", "message": "Attempting database reconnection", "module": "db.connection", "function": "reconnect", "line": 105}
{"timestamp": "2024-01-15T10:33:48.901234", "level": "INFO", "message": "Database connection restored", "module": "db.connection", "function": "reconnect", "line": 112}
{"timestamp": "2024-01-15T10:35:22.012345", "level": "DEBUG", "message": "Cache hit for key: user_session_abc123", "module": "cache.manager", "function": "get", "line": 67}
Here's how to configure a Python logger to output in the required format:
import logging
import json
from datetime import datetime
class JSONFormatter(logging.Formatter):
def format(self, record):
log_obj = {
"timestamp": datetime.fromtimestamp(record.created).isoformat(),
"level": record.levelname,
"message": record.getMessage(),
"module": record.module,
"function": record.funcName,
"line": record.lineno
}
return json.dumps(log_obj)
# Configure logger
logger = logging.getLogger()
handler = logging.FileHandler('app.log')
handler.setFormatter(JSONFormatter())
logger.addHandler(handler)
logger.setLevel(logging.INFO)
# Example usage
logger.info("Application started")
logger.error("Something went wrong")
Lists all available log files with metadata.
Example usage in Claude:
Search and filter log entries.
Parameters:
files - List of files to search (optional, defaults to all)level - Filter by log levelmodule - Filter by module namefunction - Filter by function namemessage_contains - Search in message contentstart_time - Start time filter (ISO format)end_time - End time filter (ISO format)limit - Maximum results (default: 100)Example usage in Claude:
Aggregate log data by specified criteria.
Parameters:
files - Files to analyze (optional)group_by - Grouping criteria: "level", "module", "function", or "hour"Example usage in Claude:
Get comprehensive statistics about log files.
Example usage in Claude:
Once configured, you can interact with your logs through Claude Desktop:
You: "Show me all ERROR and CRITICAL logs from the last hour"
Claude: I'll search for ERROR and CRITICAL level logs from the last hour...
[Uses query_logs tool with level and time filters]
You: "Which module is generating the most warnings?"
Claude: Let me analyze the distribution of WARNING logs by module...
[Uses query_logs with level filter, then aggregate_logs grouped by module]
You: "Find all database connection errors and show me what happened right before them"
Claude: I'll search for database connection errors and their context...
[Uses query_logs to find specific errors and surrounding log entries]
You can also run the server standalone for testing (MCP Inspector or other MCP clients):
# With stdio transport (default)
python json_logs_mcp_server.py
python3 --versionpip install -e ..log filespython3 instead of python in your configurationchmod +x run-json-logs-server.shsource .venv/bin/activate && pip listpip install -e ..log extension (files matching *.log* are found)./run-json-logs-server.shlimit parameter in queries to control result sizeContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for JSON Logs MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/json-logs-mcp-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.