- Home
- MCP servers
- MCP Container Tools
MCP Container Tools
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"simseksem-mcp-container-tools": {
"command": "python",
"args": [
"-m",
"mcp_server.server"
],
"env": {
"AZURE_APP_INSIGHTS_RESOURCE_ID": "/subscriptions/.../resourceGroups/.../providers/microsoft.insights/components/...",
"AZURE_LOG_ANALYTICS_WORKSPACE_ID": "your-workspace-id"
}
}
}
}You can run an MCP server to interact with Docker, Kubernetes, and Azure Application Insights from a single, extensible toolset. It provides advanced log filtering, remote access, and a unified interface to query logs, events, and metrics across multiple environments. This guide shows you how to install, run, and use the server effectively from your workstation or CI environment.
How to use
You will run the MCP server locally or in a container and connect to it with your MCP client or scripts. Start the server with Python, then use the available tools to read logs, deploy services, query Azure Application Insights data, and filter results using log levels, patterns, and exclusions. For remote hosts, you can point your client at the server and execute commands or fetch logs as if you were directly connected.
How to install
Prerequisites: you need Python 3.11 or newer, and Docker and kubectl for full functionality. If you plan to use Azure features, ensure the Azure CLI is installed.
# Basic installation
pip install mcp-container-tools
# With Azure Application Insights support
pip install mcp-container-tools[azure]
Install from GitHub if you want the latest version and optional Azure support.
# Latest version from GitHub
pip install git+https://github.com/simseksem/mcp-container-tools.git
# With Azure support
pip install "mcp-container-tools[azure] @ git+https://github.com/simseksem/mcp-container-tools.git"
Install from source for development work.
git clone https://github.com/simseksem/mcp-container-tools.git
cd mcp-container-tools
pip install -e ".[all]"
Verify the installation and inspect available commands.
mcp-server --help
Configuration
Configure how the MCP server runs and how it authenticates with Azure if you use Azure features. The configuration supports embedding the Python runtime invoked as a module and setting environment variables for Azure services.
{
"mcpServers": {
"container-tools": {
"command": "/path/to/mcp-container-tools/.venv/bin/python",
"args": ["-m", "mcp_server.server"],
"env": {
"AZURE_LOG_ANALYTICS_WORKSPACE_ID": "your-workspace-id",
"AZURE_APP_INSIGHTS_RESOURCE_ID": "/subscriptions/.../resourceGroups/.../providers/microsoft.insights/components/..."
}
}
}
}
Azure authentication
Azure tools use DefaultAzureCredential supporting multiple login methods. The simplest approach is to log in with the Azure CLI so you can access Azure resources directly.
az login
Usage patterns with the MCP server
Once the server is running, you can use the client tools to fetch and filter logs from Docker containers, Docker Compose services, Kubernetes pods and deployments, and Azure Application Insights data. Apply min_level, pattern, and exclude_pattern filters to narrow results, and use context options to target specific clusters, namespaces, or contexts.
Notes and tips
-
Ensure you have the required tooling (Docker, kubectl) installed to access the corresponding environments.
-
Use the Azure-related configuration and credentials only if you intend to query Azure Application Insights data.
Available tools
docker_logs
Read container logs with filtering including min_level, patterns, and excludes.
docker_ps
List Docker containers and their statuses.
docker_inspect
Get details for a specific container.
docker_exec
Execute a command inside a running container.
compose_logs
Read service logs from Docker Compose projects.
compose_ps
List services in a Docker Compose setup.
compose_up
Start services defined in a Compose file.
compose_down
Stop services defined in a Compose setup.
compose_restart
Restart services in a Compose project.
k8s_logs
Read pod logs in a Kubernetes namespace.
k8s_deployment_logs
Read logs for all pods in a deployment.
k8s_pods
List pods in a namespace or cluster.
k8s_exec
Execute commands inside a pod.
k8s_events
Get cluster events.
azure_exceptions
Query Azure Application Insights exceptions.
azure_traces
Query Azure traces.
azure_requests
Query Azure HTTP requests.
azure_dependencies
Query external dependencies like SQL or HTTP calls.
azure_metrics
Query metrics from Azure Monitor.
azure_availability
Query Azure availability test results.
azure_query
Run custom Kusto queries against Azure data.