container-manager-mcp 1.0.3__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- container_manager_mcp/__init__.py +23 -17
- container_manager_mcp/__main__.py +2 -2
- container_manager_mcp/container_manager.py +555 -441
- container_manager_mcp/container_manager_a2a.py +339 -0
- container_manager_mcp/container_manager_mcp.py +2055 -1323
- container_manager_mcp/mcp_config.json +7 -0
- container_manager_mcp/skills/container-manager-compose/SKILL.md +25 -0
- container_manager_mcp/skills/container-manager-containers/SKILL.md +28 -0
- container_manager_mcp/skills/container-manager-containers/troubleshoot.md +5 -0
- container_manager_mcp/skills/container-manager-images/SKILL.md +25 -0
- container_manager_mcp/skills/container-manager-info/SKILL.md +23 -0
- container_manager_mcp/skills/container-manager-logs/SKILL.md +22 -0
- container_manager_mcp/skills/container-manager-networks/SKILL.md +22 -0
- container_manager_mcp/skills/container-manager-swarm/SKILL.md +28 -0
- container_manager_mcp/skills/container-manager-swarm/orchestrate.md +4 -0
- container_manager_mcp/skills/container-manager-system/SKILL.md +19 -0
- container_manager_mcp/skills/container-manager-volumes/SKILL.md +23 -0
- container_manager_mcp/utils.py +31 -0
- container_manager_mcp-1.2.0.dist-info/METADATA +371 -0
- container_manager_mcp-1.2.0.dist-info/RECORD +26 -0
- container_manager_mcp-1.2.0.dist-info/entry_points.txt +4 -0
- {container_manager_mcp-1.0.3.dist-info → container_manager_mcp-1.2.0.dist-info}/top_level.txt +1 -0
- scripts/validate_a2a_agent.py +150 -0
- scripts/validate_agent.py +67 -0
- container_manager_mcp-1.0.3.dist-info/METADATA +0 -243
- container_manager_mcp-1.0.3.dist-info/RECORD +0 -10
- container_manager_mcp-1.0.3.dist-info/entry_points.txt +0 -3
- {container_manager_mcp-1.0.3.dist-info → container_manager_mcp-1.2.0.dist-info}/WHEEL +0 -0
- {container_manager_mcp-1.0.3.dist-info → container_manager_mcp-1.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-compose
|
|
3
|
+
description: Manages Docker Compose. Use for up/down/ps/logs. Triggers - multi-container apps.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Compose for app stacks.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `compose_up`: Start stack. Params: compose_file (required), detach=true, build?.
|
|
11
|
+
- `compose_down`: Stop/remove.
|
|
12
|
+
- `compose_ps`: List services.
|
|
13
|
+
- `compose_logs`: Get logs. Params: service?.
|
|
14
|
+
|
|
15
|
+
### Usage Instructions
|
|
16
|
+
1. Provide compose_file path.
|
|
17
|
+
2. Subset: Service-specific logs.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
- Up: `compose_up` with compose_file="docker-compose.yml", build=true.
|
|
21
|
+
- Logs: `compose_logs` with service="db".
|
|
22
|
+
|
|
23
|
+
### Error Handling
|
|
24
|
+
- Invalid YAML: Validate file.
|
|
25
|
+
- Conflicts: Down first.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-containers
|
|
3
|
+
description: Manages containers. Use for listing/running/stopping/removing/pruning. Triggers - runtime ops, scaling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Core container control. Supports troubleshooting subsets (list -> logs -> exec).
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `list_containers`: List running/all. Params: all?, manager_type?.
|
|
11
|
+
- `run_container`: Run new. Params: image (required), name?, command?, detach?, ports?, volumes?, environment?.
|
|
12
|
+
- `stop_container`: Stop. Params: container_id (required), timeout=10.
|
|
13
|
+
- `remove_container`: Remove. Params: container_id (required), force?.
|
|
14
|
+
- `prune_containers`: Clean stopped.
|
|
15
|
+
- `exec_in_container`: Exec command. Params: container_id (required), command (list), detach?.
|
|
16
|
+
|
|
17
|
+
### Usage Instructions
|
|
18
|
+
1. Use ID/name for actions.
|
|
19
|
+
2. For troubleshooting: list -> get_logs (logs skill) -> exec.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
- Run: `run_container` with image="nginx", ports={"80/tcp": "8080"}.
|
|
23
|
+
- Exec: `exec_in_container` with container_id="mycont", command=["ls", "-l"].
|
|
24
|
+
|
|
25
|
+
### Error Handling
|
|
26
|
+
- Not running: Check status first.
|
|
27
|
+
- Conflicts: Force for removal.
|
|
28
|
+
Reference `troubleshoot.md` for workflows.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-images
|
|
3
|
+
description: Manages container images. Use for listing/pulling/removing/pruning images. Triggers - image ops, builds.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Image lifecycle via MCP. Essential for container setup.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `list_images`: List all. Params: manager_type?, silent?, log_file?.
|
|
11
|
+
- `pull_image`: Pull image/tag. Params: image (required), tag="latest", platform?.
|
|
12
|
+
- `remove_image`: Remove by name/ID. Params: image (required), force?.
|
|
13
|
+
- `prune_images`: Clean unused. Params: all?.
|
|
14
|
+
|
|
15
|
+
### Usage Instructions
|
|
16
|
+
1. Parse image:tag; defaults to latest.
|
|
17
|
+
2. Chain: list -> pull -> run (from containers skill).
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
- Pull: `pull_image` with image="nginx", tag="latest".
|
|
21
|
+
- Prune: `prune_images` with all=true.
|
|
22
|
+
|
|
23
|
+
### Error Handling
|
|
24
|
+
- Not found: Registry issues—check URL.
|
|
25
|
+
- In use: Use force or stop containers first.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-info
|
|
3
|
+
description: Retrieves Container Manager info. Use for version/system details before ops. Triggers - setup checks, compatibility.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Basic info tools for Docker/Podman. Call first to verify environment.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `get_version`: Get manager version. Params: manager_type? (docker/podman), silent?, log_file?.
|
|
11
|
+
- `get_info`: Get system info (OS, drivers). Similar params.
|
|
12
|
+
|
|
13
|
+
### Usage Instructions
|
|
14
|
+
1. Optional manager_type; auto-detects.
|
|
15
|
+
2. Use for troubleshooting setup issues.
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
- Version: `get_version` with manager_type="docker".
|
|
19
|
+
- Info: `get_info`.
|
|
20
|
+
|
|
21
|
+
### Error Handling
|
|
22
|
+
- No manager: Check installation.
|
|
23
|
+
- Logs: Use log_file for persistence.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-logs
|
|
3
|
+
description: Manages logs. Use for container/compose logs. Triggers - debugging, monitoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Log retrieval for troubleshooting.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `get_container_logs`: Get logs. Params: container_id (required), tail="all".
|
|
11
|
+
- `compose_logs`: Compose logs. Params: compose_file (required), service?.
|
|
12
|
+
|
|
13
|
+
### Usage Instructions
|
|
14
|
+
1. Tail for recent lines (e.g., "100").
|
|
15
|
+
2. Subset: Service-specific in compose.
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
- Container: `get_container_logs` with container_id="nginx", tail="50".
|
|
19
|
+
- Compose: `compose_logs` with compose_file="docker-compose.yml".
|
|
20
|
+
|
|
21
|
+
### Error Handling
|
|
22
|
+
- No logs: Container not running.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-networks
|
|
3
|
+
description: Manages networks. Use for listing/creating/removing/pruning. Triggers - isolation, connectivity.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Network isolation for containers.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `list_networks`: List all.
|
|
11
|
+
- `create_network`: Create. Params: name (required), driver="bridge".
|
|
12
|
+
- `remove_network`: Remove. Params: network_id (required).
|
|
13
|
+
- `prune_networks`: Clean unused.
|
|
14
|
+
|
|
15
|
+
### Usage Instructions
|
|
16
|
+
1. Default driver: bridge.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
- Create: `create_network` with name="my-net".
|
|
20
|
+
|
|
21
|
+
### Error Handling
|
|
22
|
+
- In use: Disconnect containers.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-swarm
|
|
3
|
+
description: Manages Docker Swarm. Use for init/leave, nodes/services. Triggers - clustering, orchestration. Note - Docker only.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Swarm for distributed ops. Restrict to Docker.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `init_swarm`: Init cluster. Params: advertise_addr?.
|
|
11
|
+
- `leave_swarm`: Leave. Params: force?.
|
|
12
|
+
- `list_nodes`: List nodes.
|
|
13
|
+
- `list_services`: List services.
|
|
14
|
+
- `create_service`: Create. Params: name, image (required), replicas=1, ports?, mounts?.
|
|
15
|
+
- `remove_service`: Remove. Params: service_id (required).
|
|
16
|
+
|
|
17
|
+
### Usage Instructions
|
|
18
|
+
1. Manager_type="docker" required.
|
|
19
|
+
2. For services: Similar to containers but replicated.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
- Init: `init_swarm`.
|
|
23
|
+
- Create service: `create_service` with name="web", image="nginx", replicas=3.
|
|
24
|
+
|
|
25
|
+
### Error Handling
|
|
26
|
+
- Not Swarm: Init first.
|
|
27
|
+
- Node down: Check status.
|
|
28
|
+
Reference `orchestrate.md` for scaling workflows.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-system
|
|
3
|
+
description: Manages system resources. Use for full prune. Triggers - cleanup, optimization.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
System-wide cleanup.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `prune_system`: Prune all unused (containers/images/volumes/networks). Params: force?, all?.
|
|
11
|
+
|
|
12
|
+
### Usage Instructions
|
|
13
|
+
1. Caution: Destructive—use force/all sparingly.
|
|
14
|
+
|
|
15
|
+
### Examples
|
|
16
|
+
- Prune: `prune_system` with all=true.
|
|
17
|
+
|
|
18
|
+
### Error Handling
|
|
19
|
+
- Partial failure: Check individual prunes.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container-manager-volumes
|
|
3
|
+
description: Manages volumes. Use for listing/creating/removing/pruning. Triggers - data persistence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Overview
|
|
7
|
+
Volume ops for stateful containers.
|
|
8
|
+
|
|
9
|
+
### Key Tools
|
|
10
|
+
- `list_volumes`: List all.
|
|
11
|
+
- `create_volume`: Create. Params: name (required).
|
|
12
|
+
- `remove_volume`: Remove. Params: name (required), force?.
|
|
13
|
+
- `prune_volumes`: Clean unused. Params: all?.
|
|
14
|
+
|
|
15
|
+
### Usage Instructions
|
|
16
|
+
1. Use with run_container volumes param.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
- Create: `create_volume` with name="data-vol".
|
|
20
|
+
- Prune: `prune_volumes`.
|
|
21
|
+
|
|
22
|
+
### Error Handling
|
|
23
|
+
- In use: Stop containers first.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# coding: utf-8
|
|
3
|
+
|
|
4
|
+
from typing import Union
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def to_integer(string: Union[str, int] = None) -> int:
|
|
8
|
+
if isinstance(string, int):
|
|
9
|
+
return string
|
|
10
|
+
if not string:
|
|
11
|
+
return 0
|
|
12
|
+
try:
|
|
13
|
+
return int(string.strip())
|
|
14
|
+
except ValueError:
|
|
15
|
+
raise ValueError(f"Cannot convert '{string}' to integer")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def to_boolean(string: Union[str, bool] = None) -> bool:
|
|
19
|
+
if isinstance(string, bool):
|
|
20
|
+
return string
|
|
21
|
+
if not string:
|
|
22
|
+
return False
|
|
23
|
+
normalized = str(string).strip().lower()
|
|
24
|
+
true_values = {"t", "true", "y", "yes", "1"}
|
|
25
|
+
false_values = {"f", "false", "n", "no", "0"}
|
|
26
|
+
if normalized in true_values:
|
|
27
|
+
return True
|
|
28
|
+
elif normalized in false_values:
|
|
29
|
+
return False
|
|
30
|
+
else:
|
|
31
|
+
raise ValueError(f"Cannot convert '{string}' to boolean")
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: container-manager-mcp
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Container Manager - manage Docker, Docker Swarm, and Podman containers. MCP+A2A Servers Out of the Box!
|
|
5
|
+
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
|
+
Classifier: License :: Public Domain
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: requests>=2.28.1
|
|
16
|
+
Requires-Dist: fastmcp>=2.13.0.2
|
|
17
|
+
Requires-Dist: eunomia-mcp>=0.3.10
|
|
18
|
+
Requires-Dist: podman>=5.6.0
|
|
19
|
+
Provides-Extra: podman
|
|
20
|
+
Requires-Dist: podman>=5.6.0; extra == "podman"
|
|
21
|
+
Provides-Extra: docker
|
|
22
|
+
Requires-Dist: docker>=7.1.0; extra == "docker"
|
|
23
|
+
Provides-Extra: a2a
|
|
24
|
+
Requires-Dist: pydantic-ai-slim[a2a,anthropic,fastmcp,google,huggingface,openai]>=1.32.0; extra == "a2a"
|
|
25
|
+
Requires-Dist: pydantic-ai-skills; extra == "a2a"
|
|
26
|
+
Provides-Extra: all
|
|
27
|
+
Requires-Dist: requests>=2.28.1; extra == "all"
|
|
28
|
+
Requires-Dist: fastmcp>=2.13.0.2; extra == "all"
|
|
29
|
+
Requires-Dist: eunomia-mcp>=0.3.10; extra == "all"
|
|
30
|
+
Requires-Dist: docker>=7.1.0; extra == "all"
|
|
31
|
+
Requires-Dist: podman>=5.6.0; extra == "all"
|
|
32
|
+
Requires-Dist: pydantic-ai-slim[a2a,anthropic,fastmcp,google,huggingface,openai]>=1.32.0; extra == "all"
|
|
33
|
+
Requires-Dist: pydantic-ai-skills; extra == "all"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# Container Manager - A2A & MCP Server
|
|
37
|
+
|
|
38
|
+

|
|
39
|
+

|
|
40
|
+

|
|
41
|
+

|
|
42
|
+

|
|
43
|
+

|
|
44
|
+

|
|
45
|
+
|
|
46
|
+

|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+
|
|
51
|
+

|
|
52
|
+

|
|
53
|
+

|
|
54
|
+

|
|
55
|
+

|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
*Version: 1.2.0*
|
|
59
|
+
|
|
60
|
+
## Overview
|
|
61
|
+
|
|
62
|
+
Container Manager provides a robust universal interface to manage Docker and Podman containers, networks, volumes,
|
|
63
|
+
and Docker Swarm services, enabling programmatic and remote container management.
|
|
64
|
+
|
|
65
|
+
This is package contains an MCP Server + A2A Server Out of the Box!
|
|
66
|
+
|
|
67
|
+
This repository is actively maintained - Contributions are welcome!
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- Manage Docker and Podman containers, images, volumes, and networks
|
|
72
|
+
- Support for Docker Swarm operations
|
|
73
|
+
- Support for Docker Compose and Podman Compose operations
|
|
74
|
+
- FastMCP server for remote API access
|
|
75
|
+
- Comprehensive logging and error handling
|
|
76
|
+
- Extensible architecture for additional container runtimes
|
|
77
|
+
- Multi-agent A2A system for delegated container management
|
|
78
|
+
|
|
79
|
+
## MCP
|
|
80
|
+
|
|
81
|
+
### MCP Tools
|
|
82
|
+
|
|
83
|
+
- `get_version`: Retrieve version information of the container runtime
|
|
84
|
+
- `get_info`: Get system information about the container runtime
|
|
85
|
+
- `list_images`: List all available images
|
|
86
|
+
- `pull_image`: Pull an image from a registry
|
|
87
|
+
- `remove_image`: Remove an image
|
|
88
|
+
- `list_containers`: List running or all containers
|
|
89
|
+
- `run_container`: Run a new container
|
|
90
|
+
- `stop_container`: Stop a running container
|
|
91
|
+
- `remove_container`: Remove a container
|
|
92
|
+
- `get_container_logs`: Retrieve logs from a container
|
|
93
|
+
- `exec_in_container`: Execute a command in a container
|
|
94
|
+
- `list_volumes`: List all volumes
|
|
95
|
+
- `create_volume`: Create a new volume
|
|
96
|
+
- `remove_volume`: Remove a volume
|
|
97
|
+
- `list_networks`: List all networks
|
|
98
|
+
- `create_network`: Create a new network
|
|
99
|
+
- `remove_network`: Remove a network
|
|
100
|
+
- `compose_up`: Start services defined in a Compose file
|
|
101
|
+
- `compose_down`: Stop and remove services defined in a Compose file
|
|
102
|
+
- `compose_ps`: List containers for a Compose project
|
|
103
|
+
- `compose_logs`: View logs for a Compose project or specific service
|
|
104
|
+
- `init_swarm`: Initialize a Docker Swarm
|
|
105
|
+
- `leave_swarm`: Leave a Docker Swarm
|
|
106
|
+
- `list_nodes`: List nodes in a Docker Swarm
|
|
107
|
+
- `list_services`: List services in a Docker Swarm
|
|
108
|
+
- `create_service`: Create a new service in a Docker Swarm
|
|
109
|
+
- `remove_service`: Remove a service from a Docker Swarm
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### MCP CLI
|
|
113
|
+
|
|
114
|
+
| Short Flag | Long Flag | Description |
|
|
115
|
+
|------------|------------------------------------|-----------------------------------------------------------------------------|
|
|
116
|
+
| -h | --help | Display help information |
|
|
117
|
+
| -t | --transport | Transport method: 'stdio', 'http', or 'sse' [legacy] (default: stdio) |
|
|
118
|
+
| -s | --host | Host address for HTTP transport (default: 0.0.0.0) |
|
|
119
|
+
| -p | --port | Port number for HTTP transport (default: 8000) |
|
|
120
|
+
| | --auth-type | Authentication type: 'none', 'static', 'jwt', 'oauth-proxy', 'oidc-proxy', 'remote-oauth' (default: none) |
|
|
121
|
+
| | --token-jwks-uri | JWKS URI for JWT verification |
|
|
122
|
+
| | --token-issuer | Issuer for JWT verification |
|
|
123
|
+
| | --token-audience | Audience for JWT verification |
|
|
124
|
+
| | --oauth-upstream-auth-endpoint | Upstream authorization endpoint for OAuth Proxy |
|
|
125
|
+
| | --oauth-upstream-token-endpoint | Upstream token endpoint for OAuth Proxy |
|
|
126
|
+
| | --oauth-upstream-client-id | Upstream client ID for OAuth Proxy |
|
|
127
|
+
| | --oauth-upstream-client-secret | Upstream client secret for OAuth Proxy |
|
|
128
|
+
| | --oauth-base-url | Base URL for OAuth Proxy |
|
|
129
|
+
| | --oidc-config-url | OIDC configuration URL |
|
|
130
|
+
| | --oidc-client-id | OIDC client ID |
|
|
131
|
+
| | --oidc-client-secret | OIDC client secret |
|
|
132
|
+
| | --oidc-base-url | Base URL for OIDC Proxy |
|
|
133
|
+
| | --remote-auth-servers | Comma-separated list of authorization servers for Remote OAuth |
|
|
134
|
+
| | --remote-base-url | Base URL for Remote OAuth |
|
|
135
|
+
| | --allowed-client-redirect-uris | Comma-separated list of allowed client redirect URIs |
|
|
136
|
+
| | --eunomia-type | Eunomia authorization type: 'none', 'embedded', 'remote' (default: none) |
|
|
137
|
+
| | --eunomia-policy-file | Policy file for embedded Eunomia (default: mcp_policies.json) |
|
|
138
|
+
| | --eunomia-remote-url | URL for remote Eunomia server |
|
|
139
|
+
|
|
140
|
+
## A2A Agent
|
|
141
|
+
|
|
142
|
+
### A2A CLI
|
|
143
|
+
|
|
144
|
+
| Long Flag | Description |
|
|
145
|
+
|-------------------|--------------------------------------------------|
|
|
146
|
+
| --host | Host to bind the server to (default: 0.0.0.0) |
|
|
147
|
+
| --port | Port to bind the server to (default: 9000) |
|
|
148
|
+
| --provider | LLM Provider: openai, anthropic, google, huggingface (default: openai) |
|
|
149
|
+
| --model-id | LLM Model ID (default: qwen3:4b) |
|
|
150
|
+
| --base-url | LLM Base URL (for OpenAI compatible providers) |
|
|
151
|
+
| --api-key | LLM API Key |
|
|
152
|
+
| --mcp-url | MCP Server URL (default: http://localhost:8000/mcp) |
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## Usage
|
|
157
|
+
|
|
158
|
+
### Using as an MCP Server
|
|
159
|
+
|
|
160
|
+
The MCP Server can be run in two modes: `stdio` (for local testing) or `http` (for networked access). To start the server, use the following commands:
|
|
161
|
+
|
|
162
|
+
#### Run in stdio mode (default):
|
|
163
|
+
```bash
|
|
164
|
+
container-manager-mcp
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### Run in HTTP mode:
|
|
168
|
+
```bash
|
|
169
|
+
container-manager-mcp --transport "http" --host "0.0.0.0" --port "8000"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Deploy MCP Server as a Service
|
|
173
|
+
|
|
174
|
+
The ServiceNow MCP server can be deployed using Docker, with configurable authentication, middleware, and Eunomia authorization.
|
|
175
|
+
|
|
176
|
+
#### Using Docker Run
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
docker pull knucklessg1/container-manager:latest
|
|
180
|
+
|
|
181
|
+
docker run -d \
|
|
182
|
+
--name container-manager-mcp \
|
|
183
|
+
-p 8004:8004 \
|
|
184
|
+
-e HOST=0.0.0.0 \
|
|
185
|
+
-e PORT=8004 \
|
|
186
|
+
-e TRANSPORT=streamable-http \
|
|
187
|
+
-e AUTH_TYPE=none \
|
|
188
|
+
-e EUNOMIA_TYPE=none \
|
|
189
|
+
knucklessg1/container-manager:latest
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Run A2A Agent (Docker):
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
docker run -d \
|
|
196
|
+
--name container-manager-a2a \
|
|
197
|
+
-p 9000:9000 \
|
|
198
|
+
-e PORT=9000 \
|
|
199
|
+
-e PROVIDER=openai \
|
|
200
|
+
-e MODEL_ID=qwen3:4b \
|
|
201
|
+
-e BASE_URL=http://host.docker.internal:11434/v1 \
|
|
202
|
+
-e MCP_URL=http://host.docker.internal:8004/mcp \
|
|
203
|
+
knucklessg1/container-manager:latest \
|
|
204
|
+
container-manager-a2a
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
For advanced authentication (e.g., JWT, OAuth Proxy, OIDC Proxy, Remote OAuth) or Eunomia, add the relevant environment variables:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
docker run -d \
|
|
211
|
+
--name container-manager-mcp \
|
|
212
|
+
-p 8004:8004 \
|
|
213
|
+
-e HOST=0.0.0.0 \
|
|
214
|
+
-e PORT=8004 \
|
|
215
|
+
-e TRANSPORT=streamable-http \
|
|
216
|
+
-e AUTH_TYPE=oidc-proxy \
|
|
217
|
+
-e OIDC_CONFIG_URL=https://provider.com/.well-known/openid-configuration \
|
|
218
|
+
-e OIDC_CLIENT_ID=your-client-id \
|
|
219
|
+
-e OIDC_CLIENT_SECRET=your-client-secret \
|
|
220
|
+
-e OIDC_BASE_URL=https://your-server.com \
|
|
221
|
+
-e ALLOWED_CLIENT_REDIRECT_URIS=http://localhost:*,https://*.example.com/* \
|
|
222
|
+
-e EUNOMIA_TYPE=embedded \
|
|
223
|
+
-e EUNOMIA_POLICY_FILE=/app/mcp_policies.json \
|
|
224
|
+
knucklessg1/container-manager:latest
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
#### Using Docker Compose
|
|
228
|
+
|
|
229
|
+
Create a `docker-compose.yml` file:
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
services:
|
|
233
|
+
container-manager-mcp:
|
|
234
|
+
image: knucklessg1/container-manager:latest
|
|
235
|
+
environment:
|
|
236
|
+
- HOST=0.0.0.0
|
|
237
|
+
- PORT=8004
|
|
238
|
+
- TRANSPORT=streamable-http
|
|
239
|
+
- AUTH_TYPE=none
|
|
240
|
+
- EUNOMIA_TYPE=none
|
|
241
|
+
ports:
|
|
242
|
+
- 8004:8004
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
For advanced setups with authentication and Eunomia:
|
|
246
|
+
|
|
247
|
+
```yaml
|
|
248
|
+
services:
|
|
249
|
+
container-manager-mcp:
|
|
250
|
+
image: knucklessg1/container-manager:latest
|
|
251
|
+
environment:
|
|
252
|
+
- HOST=0.0.0.0
|
|
253
|
+
- PORT=8004
|
|
254
|
+
- TRANSPORT=streamable-http
|
|
255
|
+
- AUTH_TYPE=oidc-proxy
|
|
256
|
+
- OIDC_CONFIG_URL=https://provider.com/.well-known/openid-configuration
|
|
257
|
+
- OIDC_CLIENT_ID=your-client-id
|
|
258
|
+
- OIDC_CLIENT_SECRET=your-client-secret
|
|
259
|
+
- OIDC_BASE_URL=https://your-server.com
|
|
260
|
+
- ALLOWED_CLIENT_REDIRECT_URIS=http://localhost:*,https://*.example.com/*
|
|
261
|
+
- EUNOMIA_TYPE=embedded
|
|
262
|
+
- EUNOMIA_POLICY_FILE=/app/mcp_policies.json
|
|
263
|
+
ports:
|
|
264
|
+
- 8004:8004
|
|
265
|
+
volumes:
|
|
266
|
+
- ./mcp_policies.json:/app/mcp_policies.json
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Run the service:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
docker-compose up -d
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
#### Configure `mcp.json` for AI Integration
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"mcpServers": {
|
|
280
|
+
"container_manager": {
|
|
281
|
+
"command": "uv",
|
|
282
|
+
"args": [
|
|
283
|
+
"run",
|
|
284
|
+
"--with",
|
|
285
|
+
"container-manager-mcp",
|
|
286
|
+
"container-manager-mcp"
|
|
287
|
+
],
|
|
288
|
+
"env": {
|
|
289
|
+
"CONTAINER_MANAGER_SILENT": "False", //Optional
|
|
290
|
+
"CONTAINER_MANAGER_LOG_FILE": "~/Documents/container_manager_mcp.log" //Optional
|
|
291
|
+
"CONTAINER_MANAGER_TYPE": "podman", //Optional
|
|
292
|
+
"CONTAINER_MANAGER_PODMAN_BASE_URL": "tcp://127.0.0.1:8080" //Optional
|
|
293
|
+
},
|
|
294
|
+
"timeout": 200000
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Install Python Package
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
python -m pip install container-manager-mcp
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
or
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
uv pip install --upgrade container-manager-mcp
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Test
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
container-manager-mcp --transport streamable-http --host 127.0.0.1 --port 8080
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
This starts the MCP server using HTTP transport on localhost port 8080.
|
|
319
|
+
|
|
320
|
+
To interact with the MCP server programmatically, you can use a FastMCP client or make HTTP requests to the exposed endpoints. Example using curl to pull an image:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
curl -X POST http://127.0.0.1:8080/pull_image \
|
|
324
|
+
-H "Content-Type: application/json" \
|
|
325
|
+
-d '{"image": "nginx", "tag": "latest", "manager_type": "docker"}'
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Install the Python package:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
python -m pip install container-manager-mcp
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Dependencies
|
|
335
|
+
- Python 3.7+
|
|
336
|
+
- `fastmcp` for MCP server functionality
|
|
337
|
+
- `docker` for Docker support
|
|
338
|
+
- `podman` for Podman support
|
|
339
|
+
- `pydantic` for data validation
|
|
340
|
+
|
|
341
|
+
Install dependencies:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
python -m pip install fastmcp docker podman pydantic
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Ensure Docker or Podman is installed and running on your system.
|
|
348
|
+
|
|
349
|
+
## Development and Contribution
|
|
350
|
+
|
|
351
|
+
Contributions are welcome! To contribute:
|
|
352
|
+
|
|
353
|
+
1. Fork the repository
|
|
354
|
+
2. Create a feature branch (`git checkout -b feature/your-feature`)
|
|
355
|
+
3. Commit your changes (`git commit -am 'Add your feature'`)
|
|
356
|
+
4. Push to the branch (`git push origin feature/your-feature`)
|
|
357
|
+
5. Create a new Pull Request
|
|
358
|
+
|
|
359
|
+
Please ensure your code follows the project's coding standards and includes appropriate tests.
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Knuckles-Team/container-manager-mcp/blob/main/LICENSE) file for details.
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
## Repository Owners:
|
|
368
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
369
|
+
|
|
370
|
+

|
|
371
|
+

|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
container_manager_mcp/__init__.py,sha256=74786jNLfvaVwncgJUsaGMX58PrTU5_zZ-CNI4z2MA4,911
|
|
2
|
+
container_manager_mcp/__main__.py,sha256=4bpregRyaWJBXOg9_h_F4xcHcX6bPVLL48V2EuwNGBs,168
|
|
3
|
+
container_manager_mcp/container_manager.py,sha256=CUe_VS8veTBc6A70W4iXLwNrstKYC3prSKUllWIONKI,90366
|
|
4
|
+
container_manager_mcp/container_manager_a2a.py,sha256=86vNSopcFVI7Lf7NindW0p5bwqjtW9FC9r7tHsyGcqQ,12222
|
|
5
|
+
container_manager_mcp/container_manager_mcp.py,sha256=cZFNErA-4IxX8Xea6wr-tZLgXcfij1Se9eiZzXCIsKQ,82400
|
|
6
|
+
container_manager_mcp/mcp_config.json,sha256=UAEbM5YNMMYJoF7315pFuEgQYFtIs_ZTmGbAvOjee_M,116
|
|
7
|
+
container_manager_mcp/utils.py,sha256=gW2RhQCTVQwjCio3-qHeykXt5EQ94awOWmzvJEMM2Y8,826
|
|
8
|
+
container_manager_mcp/skills/container-manager-compose/SKILL.md,sha256=2zGPh05L6agYrwMVVTXtUuJYFSQUiQsDNQAMgiuIVS0,670
|
|
9
|
+
container_manager_mcp/skills/container-manager-containers/SKILL.md,sha256=x1IxFDRcQbzosdb0g4aoaaJ05EwDpU5rL3V3jXWZ2xU,1132
|
|
10
|
+
container_manager_mcp/skills/container-manager-containers/troubleshoot.md,sha256=3F2VZMPOGZa023DWkTfHmjtCn-9RcEm1rl-k_blfaPI,195
|
|
11
|
+
container_manager_mcp/skills/container-manager-images/SKILL.md,sha256=dd5_aiygoGTUU9SNIb2iR_47GpeVIo8-IDzFCxc-czU,847
|
|
12
|
+
container_manager_mcp/skills/container-manager-info/SKILL.md,sha256=iscqU5KS3e_chJQsMei2RNNSr1-40RXcw43AE8E1I-o,708
|
|
13
|
+
container_manager_mcp/skills/container-manager-logs/SKILL.md,sha256=C3r5X37vZDGcR9SU528h1gcMrxu3Bmi69VZABq-7itw,658
|
|
14
|
+
container_manager_mcp/skills/container-manager-networks/SKILL.md,sha256=-t9bfyfE6Xu6X4D-r0RuctWfUrU4lmiQszkvNF_tiII,571
|
|
15
|
+
container_manager_mcp/skills/container-manager-swarm/SKILL.md,sha256=OgxRA4b7dAyYAGxC3aUIL_UIHE7uNyVBqBiqEpu7G8I,901
|
|
16
|
+
container_manager_mcp/skills/container-manager-swarm/orchestrate.md,sha256=xGqWLbIK6V3lgzr-AtzIfdyMlHfkIQwbUkIm4lPlLZo,114
|
|
17
|
+
container_manager_mcp/skills/container-manager-system/SKILL.md,sha256=aRmWq96AwuWdaAdDWlvsNqi8wKXanffcfvteScjVu4I,469
|
|
18
|
+
container_manager_mcp/skills/container-manager-volumes/SKILL.md,sha256=2ewLByR5Dn2MjksZpytM9HUXFAo6yvAJtdlTzZIAaY4,600
|
|
19
|
+
container_manager_mcp-1.2.0.dist-info/licenses/LICENSE,sha256=Z1xmcrPHBnGCETO_LLQJUeaSNBSnuptcDVTt4kaPUOE,1060
|
|
20
|
+
scripts/validate_a2a_agent.py,sha256=ZAiD2nw7OwGx4cOUuGDDlaeE78QdXKtiJknyUY33ayk,7150
|
|
21
|
+
scripts/validate_agent.py,sha256=FsDWrQNAr1Ene_CHQQ7anDPFf_r1Nt-9iLIwebpjyh4,2266
|
|
22
|
+
container_manager_mcp-1.2.0.dist-info/METADATA,sha256=0FZKlVY1s58MA89YYeO693O9HTsRVNRzMSUTscbDWGc,14843
|
|
23
|
+
container_manager_mcp-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
container_manager_mcp-1.2.0.dist-info/entry_points.txt,sha256=0J8YSLzUWZZGhP1LiGdmbLrNy5QwGyV4yM798YbWlKg,267
|
|
25
|
+
container_manager_mcp-1.2.0.dist-info/top_level.txt,sha256=JTpD3ygJ7qQGjcbQJRkAxxmzna3SvVJqTmWjnqWdADg,30
|
|
26
|
+
container_manager_mcp-1.2.0.dist-info/RECORD,,
|