Docker & Kubernetes MCP Server
Provides tools for managing Docker containers, images, volumes, and networks.
Provides tools for managing Kubernetes resources such as pods, deployments, services, and namespaces.
Click on "Install 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 & Kubernetes MCP Serverlist all running Docker containers"
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 & Kubernetes MCP Server
A Model Context Protocol (MCP) server that provides powerful Docker and Kubernetes integration for AI assistants.
Features
🐳 Docker Operations: Container management, image building, volume/network management
☸️ Kubernetes Operations: Pod/Deployment/Service management, namespace operations
🔧 MCP Integration: Seamless AI assistant integration with structured tool calls
Related MCP server: Docker Manager MCP
Quick Start
git clone https://github.com/TrivCodez/docker-kubernetes-mcp.git
cd docker-kubernetes-mcp
npm install
npm run devUsage
Claude Desktop Config
{
"mcpServers": {
"docker-k8s": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"DOCKER_HOST": "unix:///var/run/docker.sock",
"KUBECONFIG": "~/.kube/config"
}
}
}
}Available Tools
Docker:
docker_list_containersdocker_run_containerdocker_stop_containerdocker_build_imagedocker_logs
Kubernetes:
k8s_list_podsk8s_create_deploymentk8s_get_servicesk8s_exec_podk8s_get_logs
Development
npm run build
npm testSecurity
⚠️ Requires Docker socket and Kubernetes cluster access. Use proper RBAC and authentication in production.
License
MIT License - see LICENSE file
Made with ❤️ by TrivCodez
Available Tools
9 toolsdocker_list_containersB
List all Docker containers
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Show all containers (default: running) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must convey behavioral traits. It fails to mention that by default only running containers are listed, or what the output includes (e.g., IDs, status).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence, no wasted words. Front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one boolean parameter and no output schema, the description is minimally adequate but omits default behavior details, which could mislead an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with the 'all' parameter described. The description adds no additional meaning beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and resource (Docker containers), but does not differentiate from sibling tools like docker_logs or docker_run_container.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. There is no mention of default behavior (running only) or the effect of the 'all' parameter.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_logsC
Get container logs
| Name | Required | Description | Default |
|---|---|---|---|
| container | Yes | Container ID or name | |
| tail | No | Lines to show (default: 100) | |
| follow | No | Follow logs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior. It lacks info on read-only vs mutation, required permissions, rate limits, or output format. The phrase 'Get' implies read-only but is not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise (1 sentence), front-loaded with the key action. However, no structural elements (sections, bullet points) and could be slightly more informative without bloating.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 parameters and no output schema, the description lacks completeness. It doesn't explain return format, pagination, or how to stop following logs, leaving the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All parameters are described in the input schema (100% coverage). The description adds no extra meaning beyond restating the tool's purpose, meeting baseline but not exceeding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get container logs' clearly states the action (get) and resource (container logs), distinguishing it from sibling tools like docker_list_containers or k8s_get_logs. However, it could be more specific (e.g., 'retrieve logs from a Docker container').
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., k8s_get_logs) or when not to use it. Absent context about prerequisites, limits, or scope.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_run_containerC
Run a new Docker container
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Docker image to run | |
| name | No | Container name | |
| ports | No | Port mappings (e.g., "8080:80") | |
| env | No | Environment variables | |
| volumes | No | Volume mounts |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose behavioral traits beyond the basic fact of running a container. There are no annotations, so the burden is on the description to cover behaviors like image pulling, port binding, environment variable injection, or container lifecycle (e.g., detach mode). It fails to provide this context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise with a single sentence that front-loads the purpose. However, it is too minimal; it could include more structure or details (e.g., brief examples) without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, some optional, and no output schema, the description lacks completeness. It does not explain return values, container behavior (e.g., detached vs. foreground), or how to interact with the running container. For a tool that creates resources, more behavioral context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema; it simply says 'Run a new Docker container.' While the schema already documents each parameter, the description does not compensate for any missing conceptual understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Run a new Docker container' clearly states the action (run) and resource (Docker container). It is specific and directly conveys the tool's function, but does not differentiate from sibling tools like docker_list_containers or docker_stop_container, which are distinct operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Sibling tools include other Docker operations and Kubernetes tools, but the description offers no context for choosing docker_run_container over them, such as when to use Docker vs. K8s or when a container needs to be run vs. stopped.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docker_stop_containerB
Stop a running container
| Name | Required | Description | Default |
|---|---|---|---|
| container | Yes | Container ID or name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must fully disclose behavior. It only states 'stop a running container' without explaining the stopping process (e.g., SIGTERM, timeout), side effects (e.g., container enters exited state), or error conditions. This is insufficient for complete transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence containing only essential information. It is appropriately sized for a simple tool with one parameter, with no unnecessary words or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description should provide more context for complete understanding. It omits crucial details such as return behavior (no output), error scenarios (e.g., container not found), and timeout behavior. The description is too sparse for an AI agent to fully understand usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides a description for the single 'container' parameter ('Container ID or name'), achieving 100% schema coverage. The tool description adds no additional meaning beyond the schema, meeting the baseline but not exceeding it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Stop a running container' clearly specifies the action (stop) and the resource (container). It effectively distinguishes from sibling tools like 'docker_run_container' (start), 'docker_list_containers' (list), and 'docker_logs' (view logs), providing unambiguous purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus alternatives, nor does it mention prerequisites such as the container being in a running state. It lacks any explicit 'when to use' or 'when not to use' context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
k8s_create_deploymentC
Create a Kubernetes deployment
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Deployment name | |
| image | Yes | Container image | |
| replicas | No | Replica count | |
| namespace | No | Namespace | default |
| ports | No | Container ports |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only indicates a create operation. It omits behavioral aspects such as idempotency, overwrite behavior, required permissions, or what happens if the deployment already exists, especially given the absence of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, but it is overly minimal. It could be expanded with key details while still remaining efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is insufficiently complete. It does not address return values, side effects, or operational context for a creation tool with 5 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 5 parameters are described in the schema with 100% coverage. The tool description adds no additional meaning beyond the schema, so it meets the baseline but does not enhance understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb and resource ('Create a Kubernetes deployment'), which differentiates it from sibling tools that list pods, get logs, etc. However, it does not elaborate on what a deployment is or its scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as k8s_exec_pod or docker_run_container. There is no mention of prerequisite conditions like a running cluster or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
k8s_exec_podC
Execute command in pod
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | Pod name | |
| namespace | No | Namespace | default |
| command | Yes | Command to execute | |
| container | No | Container name (for multi-container pods) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose behavioral traits such as whether the command runs interactively, how output is returned, if stdin is supported, or any required permissions. This leaves significant ambiguity for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at four words, with no wasted text. It is front-loaded with the action verb and resource, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, no output schema, no annotations), the description is too brief. It omits important execution details, error handling, and interaction modes, making it insufficient for an agent to fully understand the tool's behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no extra meaning beyond the schema's parameter names, but the schema itself is clear. Additional context like default shell behavior would be helpful but not required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Execute' and the resource 'command in pod', which is distinct from sibling tools like k8s_get_logs or docker_run_container. However, it could be more specific about the Kubernetes context, though the name implies it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as docker_exec or k8s_get_logs. There is no mention of prerequisites, limitations, or scenarios where this tool is preferable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
k8s_get_logsC
Get pod logs
| Name | Required | Description | Default |
|---|---|---|---|
| pod | Yes | Pod name | |
| namespace | No | Namespace | default |
| container | No | Container name | |
| tail | No | Lines to show |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as whether it returns all logs or supports streaming, any rate limits, or permission requirements. The agent has no information beyond the basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just three words. While it efficiently conveys the core purpose, it could be slightly expanded to include key details without becoming wordy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has four parameters, no output schema, and no annotations, the description omits important context such as return format (plain text, timestamps), behavior for non-existent pods, or whether it follows log rotation. For a logging tool, this is a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% description coverage for all four parameters (pod, namespace, container, tail), so the schema already conveys parameter meaning. The description adds no additional context, meeting the baseline expectation for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get pod logs' clearly states the verb (Get) and resource (pod logs), indicating the primary action. However, it does not explicitly differentiate from sibling tools like docker_logs, which also retrieves logs but for Docker containers rather than Kubernetes pods.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like k8s_exec_pod for debugging or k8s_list_pods for enumeration. There is no explanation of prerequisites or context (e.g., requires a running pod).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
k8s_get_servicesC
Get Kubernetes services
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | Namespace | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description lacks details on read-only nature, required permissions, rate limits, or return behavior. This is insufficient for safe invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (two words), which is efficient but may be too minimal to be helpful. It earns its place but could benefit from more context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is incomplete for a tool with no annotations and no output schema. It does not explain return values, scope, or behavior, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter. The description adds no extra meaning beyond the schema's 'namespace' field and default value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get Kubernetes services' clearly states the verb and resource, distinguishing it from other k8s tools like k8s_list_pods and k8s_get_logs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus siblings. It does not specify use cases, alternatives, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
k8s_list_podsC
List Kubernetes pods
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | Kubernetes namespace | default |
| labelSelector | No | Label selector |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must bear the burden of behavioral disclosure. 'List' implies a read-only operation, but the description omits details about pagination, required permissions, or output format. It is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, ultra-concise sentence. While it contains no filler, it is too minimal to fully convey the tool's capabilities and lacks structured information such as usage hints or examples.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and the simplicity of the operation, the description should at least hint at the return format (e.g., list of pod objects) to aid agent understanding. The current description is incomplete for a tool with two optional parameters and no other documented behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers both parameters (namespace, labelSelector) with descriptions and defaults, achieving 100% coverage. The description adds no additional semantic context beyond what the schema already provides, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List Kubernetes pods' clearly indicates the action (list) and resource (pods). It is specific enough to convey the tool's purpose, though it does not explicitly differentiate from sibling tools like 'k8s_get_services' or 'docker_list_containers'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'k8s_get_services' or when filtering is appropriate. It lacks any context about suitable scenarios or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Tools are clearly divided between Docker and Kubernetes operations, each with distinct purposes. No overlap exists between Docker container management and Kubernetes pod/service management.
All tools follow a consistent pattern: 'docker_' or 'k8s_' prefix followed by verb_noun (e.g., docker_list_containers, k8s_create_deployment). No mixed conventions.
9 tools is a well-scoped number covering essential operations for both Docker and Kubernetes. Not too many to be overwhelming, nor too few to be trivial.
The set covers basic operations like listing, running, and logging, but for both Docker and Kubernetes, critical lifecycle operations (e.g., update, delete, inspect) are missing, leading to notable gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Your AI Agent's Infrastructure Layer. Connect Claude, Copilot, Codex, or ChatGPT to 200+ managed open source services. Start databases, pipelines, and applications through natural language.
Deploy, monitor, and manage your OpenClaw AI assistants via natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables natural language management of Docker containers, images, networks, and volumes with support for both local and remote Docker engines. Features automated container composition, debugging capabilities, and persistent data management through an intuitive conversational interface.GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Docker containers, deploy stacks, and monitor services across multiple Docker hosts from one centralized location. Supports container lifecycle management, Docker Compose operations, and infrastructure orchestration through natural language commands.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage and analyze containers across Docker and Podman through natural language, providing unified inspection, monitoring, and diagnostics.3
- AlicenseAqualityBmaintenanceEnables AI assistants to manage Docker containers and Compose stacks through natural language, including lifecycle operations, logs, stats, and secure remote access.211862MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/TrivCodez/docker-kubernetes-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server