container-manager-mcp 0.0.2__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.
@@ -0,0 +1,248 @@
1
+ Metadata-Version: 2.4
2
+ Name: container-manager-mcp
3
+ Version: 0.0.2
4
+ Summary: Container Manager manage Docker, Docker Swarm, and Podman containers as an MCP Server
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.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: requests>=2.28.1
16
+ Requires-Dist: fastmcp>=2.11.3
17
+ Requires-Dist: podman>=5.6.0
18
+ Provides-Extra: podman
19
+ Requires-Dist: podman>=5.6.0; extra == "podman"
20
+ Provides-Extra: docker
21
+ Requires-Dist: docker>=7.1.0; extra == "docker"
22
+ Provides-Extra: all
23
+ Requires-Dist: requests>=2.28.1; extra == "all"
24
+ Requires-Dist: fastmcp>=2.11.3; extra == "all"
25
+ Requires-Dist: docker>=7.1.0; extra == "all"
26
+ Requires-Dist: podman>=5.6.0; extra == "all"
27
+ Dynamic: license-file
28
+
29
+ # Container Manager MCP Server
30
+
31
+ ![PyPI - Version](https://img.shields.io/pypi/v/container-manager-mcp)
32
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/container-manager-mcp)
33
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/container-manager-mcp)
34
+ ![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/container-manager-mcp)
35
+ ![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/container-manager-mcp)
36
+ ![PyPI - License](https://img.shields.io/pypi/l/container-manager-mcp)
37
+ ![GitHub](https://img.shields.io/github/license/Knuckles-Team/container-manager-mcp)
38
+
39
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/container-manager-mcp)
40
+ ![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/container-manager-mcp)
41
+ ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/container-manager-mcp)
42
+ ![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/container-manager-mcp)
43
+
44
+ ![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/container-manager-mcp)
45
+ ![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/container-manager-mcp)
46
+ ![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/container-manager-mcp)
47
+ ![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/container-manager-mcp)
48
+ ![PyPI - Wheel](https://img.shields.io/pypi/wheel/container-manager-mcp)
49
+ ![PyPI - Implementation](https://img.shields.io/pypi/implementation/container-manager-mcp)
50
+
51
+ *Version: 0.0.2*
52
+
53
+ Container Manager MCP Server provides a robust interface to manage Docker and Podman containers, networks, volumes, and Docker Swarm services through a FastMCP server, enabling programmatic and remote container management.
54
+
55
+ This repository is actively maintained - Contributions are welcome!
56
+
57
+ ## Features
58
+
59
+ - Manage Docker and Podman containers, images, volumes, and networks
60
+ - Support for Docker Swarm operations
61
+ - Support for Docker Compose and Podman Compose operations
62
+ - FastMCP server for remote API access
63
+ - Comprehensive logging and error handling
64
+ - Extensible architecture for additional container runtimes
65
+
66
+ <details>
67
+ <summary><b>Usage:</b></summary>
68
+
69
+ | Short Flag | Long Flag | Description |
70
+ |------------|----------------|-----------------------------------------------|
71
+ | -h | --help | Display help information |
72
+ | -t | --transport | Transport method (stdio or http, default: stdio) |
73
+ | -h | --host | Host address for HTTP transport (default: 0.0.0.0) |
74
+ | -p | --port | Port for HTTP transport (default: 8000) |
75
+
76
+ ### Available MCP Tools
77
+ - `get_version`: Retrieve version information of the container runtime
78
+ - `get_info`: Get system information about the container runtime
79
+ - `list_images`: List all available images
80
+ - `pull_image`: Pull an image from a registry
81
+ - `remove_image`: Remove an image
82
+ - `list_containers`: List running or all containers
83
+ - `run_container`: Run a new container
84
+ - `stop_container`: Stop a running container
85
+ - `remove_container`: Remove a container
86
+ - `get_container_logs`: Retrieve logs from a container
87
+ - `exec_in_container`: Execute a command in a container
88
+ - `list_volumes`: List all volumes
89
+ - `create_volume`: Create a new volume
90
+ - `remove_volume`: Remove a volume
91
+ - `list_networks`: List all networks
92
+ - `create_network`: Create a new network
93
+ - `remove_network`: Remove a network
94
+ - `compose_up`: Start services defined in a Compose file
95
+ - `compose_down`: Stop and remove services defined in a Compose file
96
+ - `compose_ps`: List containers for a Compose project
97
+ - `compose_logs`: View logs for a Compose project or specific service
98
+ - `init_swarm`: Initialize a Docker Swarm
99
+ - `leave_swarm`: Leave a Docker Swarm
100
+ - `list_nodes`: List nodes in a Docker Swarm
101
+ - `list_services`: List services in a Docker Swarm
102
+ - `create_service`: Create a new service in a Docker Swarm
103
+ - `remove_service`: Remove a service from a Docker Swarm
104
+
105
+ </details>
106
+
107
+ <details>
108
+ <summary><b>Example:</b></summary>
109
+
110
+ ## Use with AI
111
+
112
+ Configure `mcp.json`
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "container_manager": {
118
+ "command": "uv",
119
+ "args": [
120
+ "run",
121
+ "--with",
122
+ "container-manager-mcp",
123
+ "container-manager-mcp"
124
+ ],
125
+ "env": {
126
+ "SILENT": "False",
127
+ "LOG_FILE": "~/Documents/container_manager_mcp.log"
128
+ },
129
+ "timeout": 200000
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ ### Deploy MCP Server as a container
136
+ ```bash
137
+ docker pull knucklessg1/container-manager:latest
138
+ ```
139
+
140
+ Modify the `compose.yml`
141
+
142
+ ```compose
143
+ services:
144
+ container-manager-mcp:
145
+ image: knucklessg1/container-manager:latest
146
+ environment:
147
+ - HOST=0.0.0.0
148
+ - PORT=8015
149
+ ports:
150
+ - 8015:8015
151
+ ```
152
+
153
+ </details>
154
+
155
+ <details>
156
+ <summary><b>Installation Instructions:</b></summary>
157
+
158
+ ### Install Python Package
159
+
160
+ ```bash
161
+ python -m pip install container-manager-mcp
162
+ ```
163
+
164
+ or
165
+
166
+ ```bash
167
+ uv pip install --upgrade container-manager-mcp
168
+ ```
169
+
170
+ ## Test Server
171
+
172
+ ```bash
173
+ container-manager-mcp --transport http --host 127.0.0.1 --port 8080
174
+ ```
175
+
176
+ This starts the MCP server using HTTP transport on localhost port 8080.
177
+
178
+ 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:
179
+
180
+ ```bash
181
+ curl -X POST http://127.0.0.1:8080/pull_image \
182
+ -H "Content-Type: application/json" \
183
+ -d '{"image": "nginx", "tag": "latest", "manager_type": "docker"}'
184
+ ```
185
+
186
+ </details>
187
+
188
+ <details>
189
+ <summary><b>Installation Instructions:</b></summary>
190
+
191
+ Install the Python package:
192
+
193
+ ```bash
194
+ python -m pip install container-manager-mcp
195
+ ```
196
+
197
+ ### Dependencies
198
+ - Python 3.7+
199
+ - `fastmcp` for MCP server functionality
200
+ - `docker` for Docker support
201
+ - `podman` for Podman support
202
+ - `pydantic` for data validation
203
+
204
+ Install dependencies:
205
+
206
+ ```bash
207
+ python -m pip install fastmcp docker podman pydantic
208
+ ```
209
+
210
+ Ensure Docker or Podman is installed and running on your system.
211
+
212
+ </details>
213
+
214
+
215
+ <details>
216
+ <summary><b>Development and Contribution:</b></summary>
217
+
218
+ ## Development and Contribution
219
+
220
+ Contributions are welcome! To contribute:
221
+
222
+ 1. Fork the repository
223
+ 2. Create a feature branch (`git checkout -b feature/your-feature`)
224
+ 3. Commit your changes (`git commit -am 'Add your feature'`)
225
+ 4. Push to the branch (`git push origin feature/your-feature`)
226
+ 5. Create a new Pull Request
227
+
228
+ Please ensure your code follows the project's coding standards and includes appropriate tests.
229
+
230
+ </details>
231
+
232
+ <details>
233
+ <summary><b>License:</b></summary>
234
+
235
+ ## License
236
+
237
+ 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.
238
+
239
+ </details>
240
+ <details>
241
+ <summary><b>Repository Owners:</b></summary>
242
+
243
+ <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" />
244
+
245
+ ![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)
246
+ ![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)
247
+
248
+ </details>
@@ -0,0 +1,9 @@
1
+ container_manager_mcp/__init__.py,sha256=YDCM62USBGnaJJZV5HqkNBnFq_M_evLQTb_mxCRnnYw,464
2
+ container_manager_mcp/container_manager.py,sha256=5ohrwilSMH6D8SqbZHGNLcoZN48nkfz-ytYTSLoM7KU,49874
3
+ container_manager_mcp/container_manager_mcp.py,sha256=oMC_6-kufg7_IELSGqBM3By375z1p5yIeQgYuAMiYZg,37882
4
+ container_manager_mcp-0.0.2.dist-info/licenses/LICENSE,sha256=Z1xmcrPHBnGCETO_LLQJUeaSNBSnuptcDVTt4kaPUOE,1060
5
+ container_manager_mcp-0.0.2.dist-info/METADATA,sha256=xBq3TmhL7IhyxaxnpMPIRCzM8BO-Q3t6p0LvU3ExyPU,8260
6
+ container_manager_mcp-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ container_manager_mcp-0.0.2.dist-info/entry_points.txt,sha256=I23pXcCgAShlfYbENzs3kbw3l1lU9Gy7lODPfRqeeiA,156
8
+ container_manager_mcp-0.0.2.dist-info/top_level.txt,sha256=B7QQLOd9mBdu0lsPKqyu4T8-zUtbqKzQJbMbtAzoozU,22
9
+ container_manager_mcp-0.0.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ container-manager = container_manager_mcp.container_manager:main
3
+ container-manager-mcp = container_manager_mcp.container_manager_mcp:main
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012-2023 Audel Rouhi
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ container_manager_mcp