MCP.so
ログイン

JSON Logs MCP Server

@mfreeman451

基本情報

カテゴリ

開発者ツール

ライセンス

MIT-0

トランスポート

stdio

作者

mfreeman451

JSON Logs MCP Server について

MCP server for Python JSON logs

JSON Logs MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "json-logs": {
      "command": "python",
      "args": [
        "/Users/mfreeman/src/nco/json_logs_mcp_server.py"
      ],
      "cwd": "/Users/mfreeman/src/nco"
    }
  }
}

JSON Logs MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

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

よくある質問

1

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.

2

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".

3

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).

4

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`).

5

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.

コメント

「開発者ツール」の他のコンテンツ