Local Logs MCP Server

by mariosss

Not rated
GitHub

About

MCP for monitoring local application logs with real-time tailing, error tracking, and log search capabilities.

Details

Author
mariosss
Categories
Developer Tools, Search, Knowledge Base

Setup

Install Local Logs MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mariosss/local-logs-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

AModel Context Protocol (MCP) serverfor monitoring local application logs with real-time tailing, error tracking, and log search capabilities.

Perfect for monitoring Node.js applications, web servers, or any application that writes to log files.

- πŸ“Log File Discovery- Automatically finds and lists available log files
- πŸ“œReal-time Log Tailing- Get the last N lines from any log file
- ⚠️Error Monitoring- Quickly check error logs for issues
- πŸ“ŠServer Status- Get server status summary from log analysis
- πŸ‘€Log Watching- Monitor log files for changes
- πŸ”Log Search- Search for specific text patterns in logs
- πŸ”§Configurable- Supports custom log directories and file extensions
- πŸš€Easy Setup- Works with Cursor, Claude Desktop, VS Code Copilot, and more

curl -sSL https://raw.githubusercontent.com/mariosss/local-logs-mcp-server/main/install-new.js | node
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/mariosss/local-logs-mcp-server/main/install-new.js" | Invoke-Expression

That's it!The installation script will download the server file directly and configure Cursor automatically. Just restart Cursor and you're ready to go!

npm install -g https://github.com/mariosss/local-logs-mcp-server local-logs-setup
npm install -g local-logs-mcp-server local-logs-setup
git clone https://github.com/mariosss/local-logs-mcp-server.git cd local-logs-mcp-server npm install -g .

The package automatically configures Cursor for you! No manual setup needed.

Add to your.cursor/mcp.json(project-specific) or global MCP config:

{ "mcpServers": { "local-logs": { "command": "npx", "args": ["-y", "local-logs-mcp-server"], "env": { "LOGS_DIR": "./logs" } } } }

Add to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.jsonon Mac):

{ "mcpServers": { "local-logs": { "command": "npx", "args": ["-y", "local-logs-mcp-server"], "env": { "LOGS_DIR": "/path/to/your/logs" } } } }
{ "servers": { "local-logs": { "command": "npx", "args": ["-y", "local-logs-mcp-server"], "env": { "LOGS_DIR": "./logs" } } } }
{ "mcpServers": { "local-logs": { "command": "npx", "args": ["-y", "local-logs-mcp-server"], "env": { "LOGS_DIR": "./logs" } } } }

IfLOGS_DIRis not specified, the server automatically searches for logs in this priority order:
- ./logs(current directory)
- ./apps/backend/logs(monorepo structure)
- ./server/logs(server directory)
- ./backend/logs(backend directory)
- /var/log(system logs on Linux/Mac)
- C:\logs(system logs on Windows)

Once configured with your MCP client, you can use natural language commands:

- "Check my server logs"
- "Are there any errors in the logs?"
- "What's my server status?"
- "Show me available log files"

- "Show me the last 50 lines from error.log"
- "Search logs for 'database connection'"
- "Monitor access.log for changes"
- "Find all log entries containing 'TypeError'"

your-project/ β”œβ”€β”€ logs/ β”‚ β”œβ”€β”€ combined.log # Main application log β”‚ β”œβ”€β”€ error.log # Error log β”‚ └── access.log # Access log (optional) β”œβ”€β”€ .cursor/ β”‚ └── mcp.json # MCP configuration β”œβ”€β”€ src/ └── package.json
your-monorepo/ β”œβ”€β”€ apps/ β”‚ └── backend/ β”‚ └── logs/ β”‚ β”œβ”€β”€ combined.log β”‚ └── error.log β”œβ”€β”€ .cursor/ β”‚ └── mcp.json └── package.json

The server works with any text-based log files and can parse:

- Winston logs(JSON and text format)
- Morgan access logs
- Pino logs
- Bunyan logs
- Custom application logs
- System logs
- Any .log or .txt files

2024-01-15 10:30:45 [INFO]: Server started on port 3000 2024-01-15 10:30:50 [ERROR]: Database connection failed
{"level":"info","message":"Server started","timestamp":"2024-01-15T10:30:45.123Z"} {"level":"error","message":"Database connection failed","timestamp":"2024-01-15T10:30:50.456Z"}

- Read-only access- Server only reads log files, never writes or modifies
- Directory scoping- Only accesses files in the specified logs directory
- No network access- Operates entirely on local files
- Permission respect- Respects file system permissions

- Efficient file reading- Uses streaming for large log files
- Memory conscious- Doesn't load entire files into memory
- Fast search- Optimized text search algorithms
- Minimal dependencies- Only uses Node.js built-in modules
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request

This project is licensed under the MIT License - see theLICENSEfile for details.

- Check that the logs directory exists and is accessible
- Verify log files have proper read permissions
- Ensure Node.js version is 14 or higher
- Check that the server path is correct in your MCP config

- Restart your MCP client (Cursor, Claude, VS Code)
- Verify MCP configuration syntax is valid JSON
- Check that the MCP server is responding (test withecho '{"jsonrpc":"2.0","method":"initialize","id":1}' | npx local-logs-mcp-server)

- Set the correctLOGS_DIRenvironment variable
- Make sure your application is actually writing to log files
- Check that file extensions matchLOG_EXTENSIONSsetting
- Verify directory permissions allow reading

Issue:"Logs directory not found"

# Solution: Set explicit path export LOGS_DIR="/path/to/your/logs"
# Solution: Check file extensions export LOG_EXTENSIONS=".log,.txt,.out"
{ "mcpServers": { "local-logs": { "command": "local-logs-mcp", "env": { "LOGS_DIR": "./logs" } } } }
# Mac open ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows notepad %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "local-logs": { "command": "npx", "args": ["-y", "local-logs-mcp-server"], "env": { "LOGS_DIR": "/Users/yourusername/projects/myapp/logs" } } } }

- Supabase MCP Server
-
Model Context Protocol
-
MCP Servers Collection
-
Cursor IDE
-
Claude Desktop

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Semantic code search for AI agents without indexing your codebase or storing any data. Fast and accurate.

Create and read feature flags, review experiments, generate flag types, search docs, and interact with GrowthBook's feature flagging and experimentation platform.

Word search, crossword, and sudoku generator MCP server with printable PDF worksheets, themed word banks, and verifiable LLM evals. Local-first, from the makers of puzzletide.com.

Official MCP server for Stimulsoft Reports & Dashboards documentation. Semantic search across FAQ, Programming Manual, Server/User Manual, and Server/Cloud API for .NET, WPF, Avalonia, WEB, Blazor, Angular, React, JS, PHP, Java, and Python platforms.

Searching and access your AI coding sessions from Claude Code, Gemini CLI, opencode, and OpenAI Codex.

Search Apple's Developer Documentation with smart search and wildcard support.

MCP server that exposes ast-grep (sg) as two tools for structural code search.

Search everything your terminal ever printed. Local MCP server over per-command recorded output: full-text search, exit codes, diffs, secret redaction. Built and maintained by an AI agent (Soren Achebe).

Let AI agents search, register, and manage domains via API

Search, compare, and get docs for 210+ APIs ranked by CLI and agent relevance

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.