Skip to main content
Glama
sheikhBasit

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNo
containerYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states the tool summarizes errors but discloses no side effects, auth needs, or rate limits. Minimal behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no redundancy, but could benefit from slightly more structure given the sparse information. Still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description omits when to use, parameter details, and behavioral traits. Incomplete for a summarization tool with limited annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the meaning of 'container' or 'tail' (e.g., number of lines to analyze). Fails to compensate for lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies a clear verb-resource combination ('summarize and group errors from a Docker container's logs'), distinguishing it from sibling tools like docker_logs (raw logs) and docker_grep (search).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives; usage is implied from the description but lacks when-not-to-use or alternative references.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

docker_grepC

Search Docker container logs with a regex pattern.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNo
patternYes
containerYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It lacks details on regex flavor, case sensitivity, whether logs are fetched from all time or limited, and what happens with invalid patterns. The tail parameter implies a line limit but is not explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is succinct (one sentence) but omits critical details. It is not overly wordy, but the brevity sacrifices clarity and completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema (content unknown), the description does not explain what the tool returns. It also fails to differentiate from sibling tools like docker_logs, tail, or search, leaving the agent unsure when to use this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description should compensate. It mentions 'regex pattern' for pattern param but does not explain container (name/ID format) or tail (number of lines from end). Agents must infer from parameter names only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('search'), resource ('Docker container logs'), and method ('regex pattern'). It is distinct from siblings like docker_errors (errors only) and docker_logs (general logs) but could be confused with 'search' tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. Does not specify prerequisites, when not to use, or how it compares to similar tools like docker_logs or tail.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

docker_logsB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
linesNo
containerYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden. It states the tool reads logs ('tail'), implying non-destructive behavior. However, it does not disclose output format, pagination, or behavior with non-existent containers, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, efficient sentence with no wasted words. It front-loads the key action and object, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and an output schema (not shown), the description is passably complete but lacks guidance on output format and usage context. With siblings present, more detail would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must add meaning. It only mentions 'N lines' and implies 'container', but does not explain the container parameter format (name vs. ID) or the lines parameter's range. The default of 100 is in schema but not described.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb-resource combination ('Tail last N lines from a Docker container's logs') and clearly distinguishes from siblings like docker_errors (filtered) and docker_grep (search). It effectively communicates the tool's exact function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., docker_grep for searching, tail for generic log tailing). The context of siblings is provided, but the description does not help the agent decide between them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

filter_levelC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
levelYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral disclosure. It states filtering by level and file type support but does not cover behavioral traits such as read-only nature, error handling, output format (despite having an output schema), or performance considerations. This is insufficient for an agent to understand full behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately conveys the core action and supported log formats. It is front-loaded with the verb 'Filter' and resource 'log file,' followed by specific detail on levels and formats. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, zero schema descriptions, and the presence of an output schema (not shown), the description fails to provide complete context. It omits details about output format, input path specifics, and edge cases. The agent lacks information needed for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning the schema provides no explanations for parameters. The description mentions 'path' implicitly and lists level values but does not define path constraints (e.g., local vs. container path) or level formatting (e.g., case sensitivity). This leaves significant gaps in parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool filters log files by specified log levels (ERROR, WARN, INFO, DEBUG). It also mentions support for JSON and plain text log formats. However, it does not explicitly differentiate from sibling tools like docker_logs or docker_grep, leaving some ambiguity in purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when filtering logs by level, but provides no guidance on when to use this tool versus alternatives (e.g., docker_logs, docker_grep). It lacks explicit 'when to use' or 'when not to use' statements, leaving the agent with insufficient context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

summarizeC

Summarize and group errors by pattern from a log file.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
max_errorsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description should disclose behavioral traits. It implies a read-only analysis operation but does not explicitly state safety, idempotency, or potential side effects. Lacks details on processing scope.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence expressing core purpose without extraneous words. Front-loaded with actionable verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 params, output schema exists but no details, sibling tools), the description is incomplete. It omits usage context, output format, and differentiation from similar tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet the description fails to explain either of the two parameters (path and max_errors). No hint that path is a file path or that max_errors controls grouping limit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'summarize and group' and the resource 'errors from a log file', distinguishing it from siblings like docker_logs (raw logs) and search (text matching).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like docker_errors or filter_level. The description implies usage for pattern-based error grouping but does not specify prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tailB

Tail last N lines from a log file.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
linesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description correctly implies a read-only operation by stating 'tail last N lines', but it does not disclose any additional behavioral traits such as error handling, file existence requirements, or whether it follows the file. Since no annotations are provided, the description carries the full burden, and this is acceptable for a simple read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one clear sentence of 7 words, with no wasted words. It is appropriately concise for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the presence of an output schema, the description does not explain the parameters or behavior in detail. For a simple tail-like tool, it is partially complete but could benefit from clarifying the path requirement and default lines value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. However, it only mentions 'last N lines' which maps to the lines parameter, but does not explain the path parameter. The parameter names are self-explanatory, but the description adds minimal semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'tail' and the resource 'log file', and the action of getting the last N lines. It distinguishes this tool from siblings like docker_grep or search, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There is no mention of prerequisites or scenarios where this tool is preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.2/5.0
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.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    99
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sheikhBasit/log-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server