docker-logs-mcp
Click on "Deploy 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-mcp show 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).
Inputs: pattern (required), project (required), tail, since, +4 more.
docker_logsA
Последние строки логов Docker-сервиса на удалённом VPS. По умолчанию показывает только ошибки (WARNING/ERROR/CRITICAL) и обрезает строки до 300 символов — экономит токены. Для прицельного поиска по паттерну используй docker_grep. Параметры since/until принимают duration (1h, 30m, 24h) или RFC3339 timestamp (2024-01-01T00:00:00Z).
Inputs: project (required), tail, since, until, +3 more.
docker_psA
Статус всех Docker-контейнеров проекта на удалённом VPS. Выполняет 'docker compose ps --format json'. Используй чтобы проверить какие контейнеры запущены.
Inputs: project (required).
docker_statsA
Потребление CPU и RAM контейнерами проекта. Выполняет 'docker stats --no-stream --no-trunc --format json'. Используй чтобы проверить нагрузку на сервер.
Inputs: project (required).
server_infoA
Общая информация о VPS: uptime, диск, память, статус контейнеров. Выполняет несколько команд и собирает результат. Используй чтобы быстро оценить здоровье сервера.
Inputs: project (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
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
Related MCP Connectors
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
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-
- FlicenseNot gradedqualityDmaintenanceMCP server for managing VPS servers via SSH, enabling command execution, file transfer, Docker management, and server documentation from within Claude.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that gives any LLM client the ability to list, inspect, start, stop, and monitor Docker containers on the host machine.1-