Skip to main content
Glama
TDHster

docker-logs-mcp

by TDHster

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 sync

Connecting 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.json or in Cline MCP config JSON

  • Cline 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 22

This file is also used by the deploy script (source ./.deploy).

Environment Variables

Variable

Default

Description

SSH_KEY

~/.ssh/id_ed25519

Path to SSH private key

Tools

Tool

Parameters

Description

Server Command

docker_logs

project (req.), service (all), tail (500), errors_only (true), max_length (300)

Latest Docker service logs. By default shows only WARNING/ERROR/CRITICAL, lines truncated to 300 chars — saves tokens

cd $PROJECT_DIR && docker compose logs --tail=N --no-color SERVICE

docker_ps

project (req.)

Status of all project Docker containers

cd $PROJECT_DIR && docker compose ps --format json

docker_stats

project (req.)

CPU and RAM usage of containers

cd $PROJECT_DIR && docker stats --no-stream --no-trunc --format json

server_info

project (req.)

General VPS info: uptime, disk (df -h /), memory (free -h), container status

uptime && df -h / && free -h && cd $PROJECT_DIR && docker compose ps

docker_grep

project (req.), pattern (req.), service (all), tail (500), context (0), ignore_case (false)

Search logs with grep -E. More token-efficient than docker_logs for targeted search — returns only matching lines

cd $PROJECT_DIR && docker compose logs --tail=N --no-color SERVICE | grep -E [flags] 'PATTERN'

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/TDHster/docker-logs-mcp'

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