Add it to Claude Code
claude mcp add log-reader -- npx -y log-reader-mcpMake your agent remember this setup
log-reader's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- 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
Tools 1
read_logsReads and filters application logs from logs/logs.logTry it
Original README from hassansaadfr/log-reader-mcp
🚀 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?
- Installation
- Who is it for?
- MCP Configuration
- Example Prompts for Cursor
- CLI Usage
- Log Format (JSON per line)
- Developer Guide
- Key Advantages
- FAQ
- Getting Help
- Contributing
- License
- Cursor Rule (Workflow)
✨ 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.jsonand workflow rules, and sets up your logs folder automatically.
🛠️ Manual
Install the package
npm install --save-dev log-reader-mcpCreate the config file
- At the root of your project, create a folder named
.cursor(if it doesn't exist). - Inside
.cursor/, create a file namedmcp.jsonwith:
{ "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.
- At the root of your project, create a folder named
🖼️ 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
logPathparameter needed - always useslogs/logs.login 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.login your current working directory. ThelogPathparameter 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