Local Logs

A **Model Context Protocol (MCP) server** for monitoring local application logs with real-time tailing, error tracking, and log search capabilities.
  • javascript

3

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can monitor local application logs in real time with this MCP server. It discovers log files, tails the latest lines, watches for changes, searches across logs, and surfaces server health from log analysis—all without leaving your machine.

How to use

Connect to the Local Logs MCP Server from your MCP client (Cursor, Claude Desktop, VS Code Copilot, etc.) and start issuing natural language commands. You can list available log files, tail the last N lines from a chosen file, monitor for new entries, search for specific text, and check for errors across your log suite. Typical workflows include tailing recent errors during a deploy, watching access logs in real time, or running a quick server-health check based on log patterns.

How to install

Prerequisites: ensure Node.js and npm are installed on your system.

# One-Command Setup (Recommended)
curl -sSL https://raw.githubusercontent.com/mariosss/local-logs-mcp-server/main/install-new.js | node

If you prefer an alternative setup, you can install globally and configure manually.

npm install -g local-logs-mcp-server
local-logs-setup

Or install manually and run the setup locally.

npm install -g local-logs-mcp-server
local-logs-setup

NPX usage provides a no-install alternative.

npx local-logs-mcp-server

If you want to install from source, you can clone the project and install dependencies.

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

Configuration and running tips

The server runs locally and reads log files from a directory you specify. It supports automatic log directory discovery if you do not set LOGS_DIR.

Configuration (MCP clients)

You can add a local MCP server entry to your MCP client configuration to run the server locally. This is an example configuration for common MCP clients.

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

Environment variables you may use

  • LOGS_DIR: Directory containing log files. If not provided, the server attempts to auto-detect common locations.

  • LOG_EXTENSIONS: Comma-separated list of log file extensions to include, such as .log,.txt.

Usage examples

Basic commands you can ask your MCP client include listing log files, checking for errors, and requesting server status.

Advanced commands include tailing specific files, searching for text, monitoring a file for changes, and extracting error entries.

Project structure examples

Standard Node.js project layout shows a logs directory containing combined.log, error.log, and optional access.log, plus a .cursor/config for MCP.

Supported log formats

The server can parse text-based logs from common frameworks and formats, including Winston, Morgan, Pino, Bunyan, and custom application logs.

Security

Read-only access: the MCP server only reads log files and never writes to them. It operates within the specified logs directory and does not access network resources.

Performance

The server streams log data to avoid loading entire files into memory and uses efficient search to quickly find text patterns.

Troubleshooting

If you encounter issues, verify the logs directory exists, files have read permission, and the MCP client configuration is valid JSON. Restart the MCP client after changes.

Available tools

get_log_files

List available log files with metadata

tail_log

Get last N lines from a log file

get_errors

Get recent error log entries

get_server_status

Server status summary from logs

watch_log

Monitor log file for changes

search_logs

Search for text in log files

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational