Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Log Reader MCPfind all error logs from today and summarize the main issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π 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)
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.
πΌοΈ 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 directoryAutomatic 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 |
|
π Logs by time |
|
β© Logs since date |
|
π¨ Errors only |
|
π Search message |
|
π§βπ» User-specific |
|
π Summary |
|
π§Ή Clear context |
|
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 |
π Real-time debugging | See errors & warnings instantly in Cursor, with AI context | Minutes per bug |
π AI log analysis | Let the AI summarize, filter, and explain log events | Hours per incident |
π¦ Incident response | Quickly surface critical issues to the whole team | Days per outage |
π©βπ» Onboarding | New devs get instant, readable log feedback in their editor | Weeks per new hire |
π Audit & compliance | Structured logs, easy to export and review | Countless hours |
βοΈ MCP Configuration Example
π Place this in
.cursor/mcp.jsonYour editor will auto-detect and use the log server
π₯οΈ CLI Usage
Command | Effect |
| Initialize MCP config and log workflow |
| Show help and CLI options |
| Show the current package version |
| Start the MCP log server (default mode) |
π Log Format (JSON per line)
Each line in logs/logs.log should be a JSON object:
π§βπ» Developer Guide
Release & Versioning: Automated with semantic-release, changelog, and version auto-sync
CI/CD: GitHub Actions (
.github/workflows/)Testing: 100% coverage, CLI test isolation, robust integration
Project Structure:
src/β TypeScript sourcesbin/cli.jsβ CLI entry pointtemplates/β MCP config & workflow templates.github/workflows/β CI/CD
π Key Advantages
π Zero config, zero risk: Never pollutes your project
π§ͺ 100% tested: Full test isolation, robust CI
ποΈ AI-ready: Structured logs, perfect for automated analysis
π Plug & Play: Works with all MCP editors, no setup required
β³ Massive time savings: Focus on code, not on chasing logs
π€ Contributing
Fork & create a branch
Use conventional commits
npm run buildto compilenpm testto verifyOpen a clear, detailed PR
π License
MIT
π Cursor Rule (Workflow)
To help Cursor (or any MCP-compatible AI) understand your log structure and best practices, you can add a workflow rule file:
How to add the Cursor rule
Copy the template
Use the command:
npx log-reader-mcp init(recommended)Or manually copy
templates/mcp-log-server/workflow.mdcto.cursor/log-reader-mcp/workflow.mdcat the root of your project.
What does this rule do?
It describes the log file location, format, and usage standards for your project.
It helps the AI agent (Cursor, etc.) understand how to read, filter, and analyze your logs.
It documents best practices for logging, security, and debugging for your team.
Example (excerpt)
Why add this rule?
π§ For the AI: It enables Cursor to provide smarter, context-aware log analysis and suggestions.
π©βπ» For developers: It ensures everyone follows the same standards and makes onboarding easier.
π For security: It reminds everyone not to log sensitive data and to validate log structure.
Tip: Keeping this rule up to date helps both humans and AI work better with your logs!
β FAQ
Q: Is it compatible with VSCode or only Cursor?
A: Any editor supporting MCP can use it, including Cursor and future tools.
Q: Can I use multiple MCP servers?
A: Yes, just add more entries in .cursor/mcp.json.
Q: What log formats are supported?
A: Only structured JSON logs (one object per line) are supported for full AI analysis.
Q: Is it safe for production?
A: Yes! The tool never modifies your logs, only reads them, and is fully tested.
π¬ Getting Help
Open an issue for bugs or questions
Join the discussion on GitHub Discussions
See the Cursor Rule Template for advanced configuration