Skip to main content
Glama
log-mcp-server

log-mcp-server

by sheikhBasit

log-mcp-server

A log analysis MCP server — tail, search, filter, and summarize logs from local files and Docker containers.

Tools

Tool

Description

tail

Tail last N lines from a log file

search

Regex search in a log file

filter_level

Filter by level (ERROR/WARN/INFO/DEBUG) — JSON and plain text

summarize

Group and count errors by pattern

docker_logs

Tail last N lines from a Docker container

docker_grep

Regex search in Docker container logs

docker_errors

Summarize errors from a Docker container

Related MCP server: Log Analyzer MCP Server

Quick Start

git clone https://github.com/sheikhBasit/log-mcp-server
cd log-mcp-server
python -m venv .venv && .venv/bin/pip install -e .
log-mcp

Claude Desktop Config

{
  "mcpServers": {
    "logs": {
      "command": "/path/to/.venv/bin/log-mcp"
    }
  }
}

Usage Examples

tail the last 50 lines of /var/log/nginx/error.log
search for "timeout" in /app/logs/api.log
filter ERROR lines from /app/logs/app.log
summarize errors in the "backend" docker container
tail 100 lines from docker container "nexavoxa-api"

Running Tests

pip install -e ".[dev]"
pytest

License

MIT


Knowledge Graph

This repo is indexed by Understand Anything — a multi-agent pipeline that builds a knowledge graph of every file, function, class, and dependency.

The graph lives at .understand-anything/knowledge-graph.json and can be explored visually:

# In Claude Code, from this repo root:
/understand-dashboard

To rebuild the graph after major changes:

~/scripts/graphify-all.sh

Graph covers: files · functions · classes · imports · architecture layers · plain-English summaries · guided tours.

Available Tools

7 tools
docker_errorsB

Summarize and group errors from a Docker container's logs.

Inputs: container (required), tail. Returns: object

docker_grepC

Search Docker container logs with a regex pattern.

Inputs: pattern (required), container (required), tail. Returns: object

docker_logsB

Tail last N lines from a Docker container's logs.

Inputs: container (required), lines. Returns: object

filter_levelC

Filter log file by level: ERROR, WARN, INFO, DEBUG. Supports JSON and plain text logs.

Inputs: path (required), level (required). Returns: object

summarizeC

Summarize and group errors by pattern from a log file.

Inputs: path (required), max_errors. Returns: object

tailB

Tail last N lines from a log file.

Inputs: path (required), lines. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct source (Docker container vs. log file) and operation (tail, search, filter, summarize). Even within groups, actions are clearly differentiated. No two tools appear to do the same thing.

    Naming Consistency2/5

    Docker tools follow a 'docker_<noun>' pattern, while file tools use bare verbs (search, tail) or verb_noun (filter_level). This inconsistency disrupts a predictable naming convention.

    Tool Count5/5

    Seven tools is appropriate for log management: covering tail, search, filter, and summary for both Docker and file logs. Not too many to overwhelm, not too few to be insufficient.

    Completeness4/5

    Covers essential log operations like tailing, searching, filtering, and error grouping. Minor gaps exist, such as live tailing or listing available log files, but the core workflow is well-supported.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server for managing and monitoring Docker, Docker Compose, and Kubernetes environments alongside Azure Application Insights. It enables advanced log filtering, container lifecycle management, and querying of cloud application traces and metrics.
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.
      7
      101
      MIT