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.09 kB
JavaScript
import { z } from "zod";
export function registerDockerContainerInspect(server, dockerService) {
server.registerTool("docker_container_inspect", {
title: "Inspect Docker Container",
description: "Get detailed information about a specific container",
inputSchema: {
containerId: z.string().describe("Container ID or name")
}
}, async ({ containerId }) => {
try {
const inspection = await dockerService.inspectContainer(containerId);
return {
content: [{
type: "text",
text: JSON.stringify(inspection, null, 2)
}]
};
}
catch (error) {
return {
content: [{
type: "text",
text: `Error inspecting container ${containerId}: ${error instanceof Error ? error.message : String(error)}`
}],
isError: true
};
}
});
}
//# sourceMappingURL=docker_container_inspect.js.map