docker-logs-mcp
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., "@docker-logs-mcpshow docker logs for web service in myproject"
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.
docker-logs-mcp
MCP server for viewing Docker container logs on a remote VPS via SSH. Tools optimized for tokens efficent
Requirements
Python ≥ 3.12
uv (package installer)
SSH key access to the VPS
Related MCP server: log-mcp-server
Quick Start
cd docker-logs-mcp
uv syncConnecting to Cline
Add to Cline's MCP servers:
{
"docker-logs": {
"command": "uv",
"args": ["run", "--directory", "/path/to/docker-logs-mcp", "python", "-m", "src.docker_mcp"]
}
}Where to add:
VS Code:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonor in Cline MCP config JSONCline Desktop: Settings → MCP Servers
Project Configuration
Each Docker project must have a .deploy file in its root:
SSH_HOST=user@server.com
PROJECT_DIR=/opt/project
SSH_PORT=22 # optional, defaults to 22This file is also used by the deploy script (source ./.deploy).
Environment Variables
Variable | Default | Description |
|
| Path to SSH private key |
Tools
Tool | Parameters | Description | Server Command |
|
| Latest Docker service logs. By default shows only WARNING/ERROR/CRITICAL, lines truncated to 300 chars — saves tokens |
|
|
| Status of all project Docker containers |
|
|
| CPU and RAM usage of containers |
|
|
| General VPS info: uptime, disk ( |
|
|
| Search logs with |
|
Available Tools
5 toolsdocker_grepA
Поиск по логам Docker-контейнеров на удалённом VPS. Выполняет 'docker compose logs --tail=N --no-color SERVICE | grep PATTERN' на сервере и возвращает только совпадения. Экономичнее docker_logs для прицельного поиска — возвращает только строки с совпадением. Параметры since/until принимают duration (1h, 30m, 24h) или RFC3339 timestamp (2024-01-01T00:00:00Z).
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | Количество последних строк лога, в которых искать | |
| since | No | Логи не старше этого времени. Duration (1h, 30m, 24h) или RFC3339 timestamp (2024-01-01T00:00:00Z). | |
| until | No | Логи не новее этого времени. Duration или RFC3339 timestamp. | |
| context | No | Сколько строк контекста выводить вокруг совпадения (grep -C) | |
| pattern | Yes | Шаблон для поиска (регулярное выражение, передаётся в grep -E) | |
| project | Yes | Локальный путь к папке проекта (где лежит .deploy) | |
| service | No | Имя сервиса: db, server, grafana, или all | all |
| ignore_case | No | Регистронезависимый поиск (grep -i) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the exact command executed ('docker compose logs --tail=N --no-color SERVICE | grep PATTERN') and the behavior of returning only matches. It also clarifies accepted formats for since/until, adding useful context beyond basic purpose.
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 concise and well-structured: it starts with the purpose, then gives the command, then provides a comparative benefit, and ends with a parameter note. Every sentence adds value with no redundancy or filler.
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 tool has 8 parameters, no output schema, and no annotations, the description covers the essential aspects: purpose, command behavior, returned data (only matches), and time parameter formats. It could be more complete by specifying output format or prerequisites, but it is sufficient for an agent to select and invoke the 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 coverage is 100%, so baseline is 3. The description adds meaning by showing how parameters map to the shell command (e.g., tail=N, SERVICE, grep PATTERN) and reiterates the since/until format in a compact way. This is helpful but not extensive, meriting a 4.
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 states a clear purpose: 'Поиск по логам Docker-контейнеров на удалённом VPS' (search Docker container logs on remote VPS) and explicitly differentiates from the sibling docker_logs by noting it returns only matching lines and is more economical for targeted search. This makes the tool's function and distinction unambiguous.
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?
It provides a direct usage comparison: 'Экономичнее docker_logs для прицельного поиска — возвращает только строки с совпадением' (More economical than docker_logs for targeted search — returns only matching lines). This clearly indicates when to prefer this tool, though it does not explicitly state when not to use it or mention other siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_logsA
Последние строки логов Docker-сервиса на удалённом VPS. По умолчанию показывает только ошибки (WARNING/ERROR/CRITICAL) и обрезает строки до 300 символов — экономит токены. Для прицельного поиска по паттерну используй docker_grep. Параметры since/until принимают duration (1h, 30m, 24h) или RFC3339 timestamp (2024-01-01T00:00:00Z).
| Name | Required | Description | Default |
|---|---|---|---|
| tail | No | Количество последних строк лога | |
| since | No | Логи не старше этого времени. Duration (1h, 30m, 24h) или RFC3339 timestamp (2024-01-01T00:00:00Z). | |
| until | No | Логи не новее этого времени. Duration или RFC3339 timestamp. | |
| project | Yes | Локальный путь к папке проекта (где лежит .deploy) | |
| service | No | Имя сервиса: db, server, grafana, или all | all |
| max_length | No | Обрезать строки до N символов. 300 = таймстемп + уровень + суть ошибки. 0 = без обрезания. | |
| errors_only | No | Показывать только WARNING/ERROR/CRITICAL. Убирает ~95% шума (DEBUG/INFO). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It discloses the two major behavioral defaults (error-only filtering, 300-char truncation) and the accepted time formats for since/until. It does not explicitly state the operation is read-only, but 'shows logs' implies non-mutating 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?
Three short sentences, each serving a distinct purpose: purpose, defaults/rationale, alternative tool, and time format guidance. No redundant text; information is front-loaded and 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?
The description covers the tool's purpose, defaults, alternatives, and time formats, which is sufficient given the 100% schema coverage. It lacks an output format example and failure-mode details (e.g., no logs found), but overall provides a solid mental model for a read-only log 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 100%, and the description only reiterates what the schema already states about since/until formats and defaults. It adds no new parameter semantics beyond the structured definitions, so the baseline of 3 applies.
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 states a specific action (show last lines of logs) on a specific resource (Docker service on a remote VPS), and clearly distinguishes from docker_grep by noting pattern search is handled there. It also describes key defaults (errors only, truncation) that scope the tool's behavior.
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?
It explicitly directs users to docker_grep for targeted pattern searches, offering a clear alternative. The description implies this tool is for general log viewing with error hints, but does not explicitly list when-not-to-use cases or prerequisites beyond that.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_psA
Статус всех Docker-контейнеров проекта на удалённом VPS. Выполняет 'docker compose ps --format json'. Используй чтобы проверить какие контейнеры запущены.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Локальный путь к папке проекта (где лежит .deploy) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It explicitly states the command executed and that it runs on a remote VPS, implying a read-only status check. While it does not detail error handling or output structure, the core behavior is transparent.
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 main purpose and including the exact command and usage intent. Every sentence earns its place with no waste.
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 status-checking tool with a single well-documented parameter, the description covers purpose, command, and usage. The mention of JSON output compensates for the lack of an output schema, making the tool fully understandable in context.
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 already documents the single 'project' parameter with a description of what it is (local path to project folder). With 100% schema description coverage, the description adds no additional parameter semantics, so baseline 3 is appropriate.
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's purpose: showing the status of all Docker containers for the project on the remote VPS. It names the exact command executed ('docker compose ps --format json') and explicitly says it is used to check which containers are running, distinguishing it from sibling tools like docker_logs or docker_stats.
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 a clear usage context: 'Use to check which containers are running.' It does not explicitly mention when not to use it or name alternatives, but the context is specific enough for an agent to select it appropriately when checking container status.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_statsA
Потребление CPU и RAM контейнерами проекта. Выполняет 'docker stats --no-stream --no-trunc --format json'. Используй чтобы проверить нагрузку на сервер.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Локальный путь к папке проекта (где лежит .deploy) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the exact command ('docker stats --no-stream --no-trunc --format json'), making the behavior fully transparent. It doesn't discuss permissions or side effects, but the operation is inherently read-only and the command itself implies a non-streaming snapshot.
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 concise, well-structured sentences: first states the purpose, second gives the command and usage. Every sentence earns its place with no redundancy.
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 low-complexity tool with one parameter and no output schema, the description adequately covers what it does, how it does it, and when to use it. It doesn't describe the return format in prose, but the command includes '--format json', which implies the output structure.
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 already covers the single parameter with a clear description (local path to project folder), so the description adds no additional parameter-level information. The baseline of 3 applies due to 100% schema coverage.
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 explicitly states the tool reports CPU and RAM consumption for project containers, which is a specific and distinct function from sibling tools like docker_logs or docker_ps. It even names the exact command executed, reinforcing the 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?
It includes a direct usage instruction: 'Use to check server load,' giving clear context for when the tool is appropriate. However, it does not mention when not to use it or compare with alternative tools, so it falls short of explicit exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
server_infoA
Общая информация о VPS: uptime, диск, память, статус контейнеров. Выполняет несколько команд и собирает результат. Используй чтобы быстро оценить здоровье сервера.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Локальный путь к папке проекта (где лежит .deploy) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that it executes multiple commands and gathers results, implying a read-only health check. However, it doesn't explicitly state permissions or whether it modifies anything, leaving some ambiguity for a tool with no annotation safety hints.
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?
Two concise sentences, front-loaded with the key information. Every word earns its place, and it avoids redundancy with the schema.
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 one-parameter tool with no output schema, the description adequately covers what it does, when to use it, and how it works (multiple commands). It lacks explicit mention of return format, but that is not critical given the context and sibling tool set.
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 100% with a clear description for the only parameter (project path). The tool description adds no extra meaning beyond the schema, so baseline 3 applies.
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 gathers general VPS information (uptime, disk, memory, container status) and collects results from multiple commands. It distinguishes itself from Docker-specific sibling tools like docker_ps and docker_stats, making its scope clear.
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?
Explicitly says 'Use to quickly assess server health', which gives clear context for when to use. It does not explicitly exclude alternatives like docker_stats for container-level details, but the server-wide scope is implied enough for a distinct use case.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Most tools are distinct: docker_ps, docker_stats, and server_info each serve clear different purposes. docker_logs and docker_grep both deal with logs, but their descriptions clearly separate recent-error viewing from pattern searching, so ambiguity is mild.
Four tools use the consistent 'docker_' prefix and short noun pattern (docker_logs, docker_ps, docker_grep, docker_stats). server_info breaks the pattern by not using the 'docker_' prefix, creating a minor inconsistency.
With five tools, the set is well-scoped for a Docker log and monitoring server. Each tool covers a distinct need without redundancy or unnecessary bloat.
The set covers the core domain: viewing logs, searching logs, listing containers, checking resource usage, and overall server health. Minor gaps might include container lifecycle actions, but those are outside the apparent logging/monitoring purpose.
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
Coupler.io remote MCP server
Syslog receiver and MCP server for homelab log intelligence.
Syslog receiver and MCP server for homelab log intelligence.
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
- FlicenseBqualityDmaintenanceA log analysis MCP server that enables tailing, searching, filtering, and summarizing logs from local files and Docker containers.7
- AlicenseNot gradedqualityDmaintenanceMCP server for managing VPS servers via SSH, enabling command execution, file transfer, Docker management, and server documentation from within Claude.13ISC
- FlicenseNot gradedqualityCmaintenanceAn MCP server that gives any LLM client the ability to list, inspect, start, stop, and monitor Docker containers on the host machine.1
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/TDHster/docker-logs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server