You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor README formatting for clarity and consistency
Improved the formatting of the README file by restructuring lines, ensuring proper line breaks, and aligning headings for better readability. Updated tables and added missing environment variable descriptions to enhance documentation completeness.
Copy file name to clipboardExpand all lines: README.md
+56-33Lines changed: 56 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,22 @@
1
1
# Docker MCP Server
2
2
3
-
This module provides an implementation of a **Model Context Protocol** MCP server for Docker commands, powered by the [`mcp_mediator`](https://github.com/makbn/mcp_mediator) core framework.
4
-
The Docker MCP Server utilizes the **automatic server generation** feature of MCP Mediator to expose existing Docker commands as MCP Tools.
5
-
Each command is optionally annotated with `@McpTool` along with a minimal description to enhance tool discoverability and usability.
3
+
This module provides an implementation of a **Model Context Protocol** MCP server for Docker commands, powered by the [
To run Docker MCP Server with Claude Desktop with `java -jar`:
35
+
31
36
```yaml
32
37
{
33
38
"mcpServers": {
@@ -50,40 +55,49 @@ To run Docker MCP Server with Claude Desktop with `java -jar`:
50
55
```
51
56
52
57
Or create the native image (see the steps below) and use the standalone application:
58
+
53
59
```yaml
54
60
{
55
61
"mcpServers": {
56
62
"my_java_mcp_server": {
57
63
"command": "docker-mcp-server-executable",
58
64
"args": [
59
-
"--docker-host=tcp://localhost:2376"// rest of args
65
+
"--docker-host=tcp://localhost:2376"// rest of args
60
66
]
61
67
}
62
68
}
63
69
}
64
70
```
65
71
66
72
### How to Build
73
+
67
74
To build the executable:
75
+
68
76
```bash
69
77
mvn clean compile package
70
78
```
71
-
This command creates a jar file under `target` folder `mcp-mediator-implementation-docker-[version].jar`. You can stop here and use the jar file and execute it
79
+
80
+
This command creates a jar file under `target` folder `mcp-mediator-implementation-docker-[version].jar`. You can stop
81
+
here and use the jar file and execute it
72
82
using `java -jar` command. Or, you can create a standalone executable application using GraalVM native image:
and this command creates an executable file: `'mcp-mediator-implementation-docker-[version]` that can be executed.
78
87
88
+
and this command creates an executable file: `'mcp-mediator-implementation-docker-[version]` that can be executed.
79
89
80
90
### Automatically Generate MCP Tools
81
91
82
-
This project integrates with [`MCP Mediator`](https://github.com/makbn/mcp_mediator) to automatically generate MCP Tools from existing Docker services.
92
+
This project integrates with [`MCP Mediator`](https://github.com/makbn/mcp_mediator) to automatically generate MCP Tools
93
+
from existing Docker services.
83
94
84
-
Each method in the Docker service class can optionally be annotated with `@McpTool` to explicitly define the tool’s **name**, **description**, and other metadata.
95
+
Each method in the Docker service class can optionally be annotated with `@McpTool` to explicitly define the tool’s *
96
+
*name**, **description**, and other metadata.
85
97
86
-
However, annotation is **not required**—MCP Mediator supports automatic generation for **non-annotated methods** by inferring details from the method, class, and package names. To enable this behavior, set `createForNonAnnotatedMethods` to `true`:
98
+
However, annotation is **not required**—MCP Mediator supports automatic generation for **non-annotated methods** by
99
+
inferring details from the method, class, and package names. To enable this behavior, set `createForNonAnnotatedMethods`
|`DOCKER_MCP_LOG_FILE`| Path to log output file |`logs/docker_mcp_server.log`|
119
139
120
140
121
141
### Supported Docker Commands as MCP Server Tools
@@ -177,17 +197,19 @@ Check `io.github.makbn.mcp.mediator.docker.server.DockerMcpServer` for the full
177
197
178
198
Work in progress, more to be added.
179
199
180
-
181
200
### DockerClientService Function Coverage
182
-
Check the [DockerClientService](./src/main/java/io/github/makbn/mcp/mediator/docker/internal/DockerClientService.java) class for the full list of available and planned tools (to be implemented)
183
201
184
-
> [!IMPORTANT]
185
-
> Almost all the MCP Tools' descriptions and names are generated automatically using AI agent!
202
+
Check the [DockerClientService](./src/main/java/io/github/makbn/mcp/mediator/docker/internal/DockerClientService.java)
203
+
class for the full list of available and planned tools (to be implemented)
186
204
205
+
> [!IMPORTANT]
206
+
> Almost all the MCP Tools' descriptions and names are generated automatically using AI agent!
187
207
188
208
### 🧩 Repository Structure and Git Subtree Setup
189
209
190
-
This project is a **Git subtree module** of the parent repository [`makbn/mcp_mediator`](https://github.com/makbn/mcp_mediator). It is kept in its own repository to support independent versioning, CI, and release processes, while remaining integrated into the main `mcp_mediator` mono-repo.
210
+
This project is a **Git subtree module** of the parent repository [
211
+
`makbn/mcp_mediator`](https://github.com/makbn/mcp_mediator). It is kept in its own repository to support independent
212
+
versioning, CI, and release processes, while remaining integrated into the main `mcp_mediator` mono-repo.
191
213
192
214
### 🔀 Cloning Structure
193
215
@@ -196,6 +218,7 @@ If you're working in the context of the full `mcp_mediator` system:
0 commit comments