
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
docker-reader-mcp
Advanced tools
A fully self-sustaining Model Context Protocol server for reading Docker container logs and information
A fully self-sustaining Model Context Protocol (MCP) server that provides AI agents with seamless access to Docker container logs and information for debugging and monitoring purposes.
🐳 Container Management
📋 Log Access
🔧 AI-Friendly
# Clone and install
git clone <repository>
cd docker-reader-mcp
npm install
# Build the server
npm run build
# Test the server
npm run dev
Add to your MCP configuration file:
{
"mcpServers": {
"docker-reader": {
"command": "node",
"args": ["/path/to/docker-reader-mcp/dist/index.js"],
"description": "Docker container log reader and inspector"
}
}
}
For a Django project with multiple containers (django, celery, celery-beat, postgres, redis), the AI agent can now:
Agent: "Show me all running containers"
# Uses: docker_list_containers
Agent: "Get the last 50 lines of django container logs"
# Uses: docker_read_logs with container="django" and lines=50
Agent: "Check if there are any errors in celery logs from the last hour"
# Uses: docker_read_logs with container="celery" and since="1h"
docker_list_containersLists Docker containers with their status and details.
Parameters:
all (boolean, optional): Include stopped containers (default: false)Example:
{
"name": "docker_list_containers",
"arguments": {
"all": true
}
}
docker_read_logsRetrieves logs from a specific container.
Parameters:
container (string, required): Container ID or namelines (number, optional): Number of lines to retrieve (default: 100, max: 10000)since (string, optional): Show logs since timestamp (e.g., "1h", "30m", "2024-01-01T10:00:00Z")until (string, optional): Show logs before timestamptimestamps (boolean, optional): Include timestamps (default: false)Example:
{
"name": "docker_read_logs",
"arguments": {
"container": "my-django-app",
"lines": 200,
"since": "1h",
"timestamps": true
}
}
docker_inspect_containerGets detailed information about a container.
Parameters:
container (string, required): Container ID or nameExample:
{
"name": "docker_inspect_container",
"arguments": {
"container": "postgres-db"
}
}
docker_container_statsRetrieves resource usage statistics for a running container.
Parameters:
container (string, required): Container ID or nameExample:
{
"name": "docker_container_stats",
"arguments": {
"container": "redis-cache"
}
}
The server also exposes container information as MCP resources:
docker://container/{container-id}: Detailed container inspection dataThe server provides comprehensive error handling for:
src/
├── index.ts # Main MCP server implementation
├── docker-client.ts # Docker command wrapper and utilities
├── validation.ts # Input validation schemas
└── errors.ts # Custom error types and formatting
npm run build # Build TypeScript to JavaScript
npm run dev # Run in development mode with tsx
npm run start # Run the built server
npm run typecheck # Type checking only
npm run lint # Code linting
# Test with a running container
docker run -d --name test-container nginx
node dist/index.js
# In another terminal, test MCP calls
# (Use MCP client or testing tool)
"Docker is not available"
docker --version works in your terminal"Permission denied"
sudo usermod -aG docker $USER"Container not found"
docker ps -a to list all containersThis project is contributed to and sponsored by Debugg.ai - Advanced AI browser automation & testing tools
MIT License - see LICENSE file for details.
Made with 🩸, 💦, and 😭 in 🌉 San Francisco
FAQs
A fully self-sustaining Model Context Protocol server for reading Docker container logs and information
We found that docker-reader-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.