Skip to main content
Glama

container_stop

Stop and remove the Kali Linux Docker container to halt security testing sessions and free system resources.

Instructions

Stop and remove the Kali Linux Docker container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool definition and handler registration for 'container_stop' in the MCP server. It calls docker.stopContainer().
    server.tool(
      "container_stop",
      "Stop and remove the Kali Linux Docker container.",
      {},
      async () => {
        try {
          const message = await docker.stopContainer();
          return { content: [{ type: "text", text: message }] };
        } catch (err) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to stop container: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The actual implementation of stopping and removing the Docker container, used by the 'container_stop' tool.
    async stopContainer(): Promise<string> {
      const container = await this.getContainer();
      if (!container) {
        return "No Kali container found.";
      }
    
      const info = await container.inspect();
      if (info.State.Running) {
        await container.stop();
      }
      await container.remove();
      return "Kali container stopped and removed.";
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hannes221/kali-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server