Log Reader MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add log-reader -- npx log-reader-mcp init
README.md

AI-powered log access for smarter debugging and analysis

πŸš€ Log Reader Mcp

πŸš€ Stop wasting time copy-pasting logs! 🧠 Let Cursor's AI instantly access, search, and explain your logs β€” no more manual work, just answers.

πŸ“š Table of Contents


✨ Why Log Reader Mcp?

  • πŸ€– AI-powered log access: Give your AI assistant (Cursor, etc.) direct, on-demand access to your app logs.
  • 🧠 Smarter debugging: Let the AI analyze, summarize, and explain logs as you code.
  • ⏱️ Save hours: No more switching terminals, tailing files, or hunting for errorsβ€”get instant feedback and context.
  • πŸ›‘οΈ Safe & isolated: Never pollutes your project, robust CLI and test coverage.
  • ⚑ Plug & Play: One command, zero config, works everywhere.

πŸ‘€ Who is it for?

  • Backend & frontend developers
  • DevOps & SREs
  • Teams using AI-powered editors (Cursor, etc.)
  • Anyone who wants faster, smarter log analysis!

πŸ“¦ Installation

πŸš€ Automatic (recommended)

npx log-reader-mcp init
  • Installs everything, creates .cursor/mcp.json and workflow rules, and sets up your logs folder automatically.

πŸ› οΈ Manual

  1. Install the package

    npm install --save-dev log-reader-mcp
    
  2. Create the config file

    • At the root of your project, create a folder named .cursor (if it doesn't exist).
    • Inside .cursor/, create a file named mcp.json with:
    {
      "mcpServers": {
        "log-reader-mcp": {
          "command": "npx",
          "args": ["-y", "log-reader-mcp"]
        }
      },
      "mcp.enabled": true,
      "mcp.autoStart": true,
      "mcp.showStatusBar": true,
      "mcp.logLevel": "info"
    }
    
    • This tells your editor (Cursor, VSCode, etc.) how to launch and connect to the log reader mcp server for your project.

πŸ–ΌοΈ What does it do?

Log Reader Mcp exposes your application's logs to your AI assistant/editor (like Cursor) via the Model Control Protocol (MCP). This means:

  • The AI can read, filter, and analyze your logs on demand (not streaming)
  • You can ask the AI to fetch logs for a specific period, number of lines, error level, etc.
  • Makes onboarding, debugging, and incident response dramatically faster

πŸ”§ Key Features

  • Simplified Interface: No logPath parameter needed - always uses logs/logs.log in your working directory
  • Automatic Detection: The server automatically finds and reads your log file
  • Time-based Filtering: Filter logs by specific time ranges using ISO 8601 format
  • Line-based Reading: Read the last N lines with automatic validation
  • Structured JSON: Full support for structured logging with metadata

πŸ’‘ Example Prompts for Cursor

Here are some real-world prompts you can use in Cursor (or any MCP-enabled AI) to interact with your logs:

Use Case Example Prompt to Cursor AI
πŸ”’ Last N logs Show me the last 100 log entries
πŸ•’ Logs by time Get all logs between 2024-06-01 and 2024-06-02
⏩ Logs since date Show all logs since 2024-06-01
🚨 Errors only Show only ERROR or CRITICAL logs from the last 50 entries
πŸ” Search message Find all logs containing "database connection failed"
πŸ§‘β€πŸ’» User-specific Show all logs for user_id 12345 in the last 24 hours
πŸ“Š Summary Summarize the main issues found in today's logs
🧹 Clear context Clear the log context and start a new analysis

Note: The tool automatically uses logs/logs.log in your current working directory. The logPath parameter has been removed for maximum simplicity - no need to specify any file path!

Tip: You can combine filters, time ranges, and keywords in your prompts. The AI will use Log Reader Mcp to fetch and analyze the relevant log data for you!


πŸ’‘ Use Cases

| Use Case | How Log Reader Mcp Helps | Time Saved

Tools (1)

read_logsReads and filters application logs from logs/logs.log

Configuration

claude_desktop_config.json
{"mcpServers": {"log-reader-mcp": {"command": "npx", "args": ["-y", "log-reader-mcp"]}}}

Try it

β†’Show me the last 100 log entries
β†’Get all logs between 2024-06-01 and 2024-06-02
β†’Show only ERROR or CRITICAL logs from the last 50 entries
β†’Find all logs containing "database connection failed"
β†’Summarize the main issues found in today's logs

Frequently Asked Questions

What are the key features of Log Reader MCP?

Direct AI access to application logs for on-demand analysis. Automatic detection of logs/logs.log file. Time-based filtering using ISO 8601 format. Support for structured JSON logging. Line-based reading with automatic validation.

What can I use Log Reader MCP for?

Debugging production errors by letting AI analyze log patterns. Summarizing application performance issues during development. Filtering logs for specific user IDs to troubleshoot reported bugs. Rapid incident response by querying logs for specific error levels.

How do I install Log Reader MCP?

Install Log Reader MCP by running: npx log-reader-mcp init

What MCP clients work with Log Reader MCP?

Log Reader MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Log Reader MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare