docker-mcp
Version:
A Model Context Protocol (MCP) server that enables AI agents to interact with Docker containers locally or remotely via SSH. Provides comprehensive Docker management capabilities including container operations, logs, monitoring, and cleanup.
30 lines • 1.04 kB
JavaScript
import { z } from "zod";
export function registerDockerContainerStart(server, dockerService) {
server.registerTool("docker_container_start", {
title: "Start Docker Container",
description: "Start a stopped container",
inputSchema: {
containerId: z.string().describe("Container ID or name")
}
}, async ({ containerId }) => {
try {
await dockerService.startContainer(containerId);
return {
content: [{
type: "text",
text: `Successfully started container ${containerId}`
}]
};
}
catch (error) {
return {
content: [{
type: "text",
text: `Error starting container ${containerId}: ${error instanceof Error ? error.message : String(error)}`
}],
isError: true
};
}
});
}
//# sourceMappingURL=docker_container_start.js.map