log-mcp-server
Provides tools for tailing, searching with regex, and summarizing errors from Docker containers.
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-mcp-servertail last 100 lines of /var/log/syslog"
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-mcp-server
A log analysis MCP server — tail, search, filter, and summarize logs from local files and Docker containers.
Tools
Tool | Description |
| Tail last N lines from a log file |
| Regex search in a log file |
| Filter by level (ERROR/WARN/INFO/DEBUG) — JSON and plain text |
| Group and count errors by pattern |
| Tail last N lines from a Docker container |
| Regex search in Docker container logs |
| 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-mcpClaude 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]"
pytestLicense
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-dashboardTo rebuild the graph after major changes:
~/scripts/graphify-all.shGraph covers: files · functions · classes · imports · architecture layers · plain-English summaries · guided tours.
Available Tools
7 toolsdocker_errorsB
Summarize and group errors from a Docker container's logs.
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | ||
| container | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | ||
| pattern | Yes | ||
| container | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | ||
| container | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| level | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
searchB
Search a log file with a regex pattern. Returns matching lines.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pattern | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must convey behavioral traits. It indicates a read operation but omits critical details like whether the search is case-sensitive, if it handles multiple files, or the effect of max_results. The behavior is only partially disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the key action, and contains no extraneous words. It is concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (which may document return values), the description is minimally adequate. However, it does not clarify the scope of 'a log file' (e.g., single file or glob) or the behavior of max_results, leaving some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description mentions 'log file' (relating to path) and 'regex pattern' (relating to pattern), adding some meaning beyond the raw schema. However, the max_results parameter is not explained, and with 0% schema coverage, more detail would be beneficial.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches a log file with a regex pattern and returns matching lines. It provides a specific verb and resource, but does not differentiate from sibling tools like docker_grep, which also performs regex searches on logs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives such as docker_grep, tail, or filter_level. The description lacks usage context or prerequisites.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_errors | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| lines | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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
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.
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.
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.
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
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
Syslog receiver and MCP server for homelab log intelligence.
Syslog receiver and MCP server for homelab log intelligence.
Analytics and debugging for your MCP server — explore usage and sessions, then root-cause errors.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.7MIT
- AlicenseNot gradedqualityDmaintenanceAn 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
- AlicenseAqualityDmaintenanceMCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.799MIT
- FlicenseNot gradedqualityBmaintenanceMCP server to start, monitor, search, and detect errors in logs from any project, even those without log files.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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