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'

Install Server
F
license - not found
A
quality
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.

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
  • F
    license
    B
    quality
    D
    maintenance
    A log analysis MCP server that enables tailing, searching, filtering, and summarizing logs from local files and Docker containers.
    7
  • A
    license
    -
    quality
    D
    maintenance
    MCP server for managing VPS servers via SSH, enabling command execution, file transfer, Docker management, and server documentation from within Claude.
    13
    ISC

View all related MCP servers

Related MCP Connectors

  • MCP server for Blockscout

  • A MCP server built for developers enabling Git based project management with project and personal…

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

View all MCP Connectors

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