VS Code client runs commands in Kali docker image using "kali-exec" MCP server
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"dotnet-docker-kali-mcp-server": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
This was my first go at this and it implimented Docker DOOD architecture which binds to the hosts docker.socket, which gives the container control of the host's docker daemon which isn't great for security, but would be great for persistence, especially if the container is burried multiple containers deep as we only have visibility on the outer containers.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in security / devops
MCP server for using the GitLab API
An evil MCP server used for redteam testing
Proof primitive for AI agents on MultiversX. Anchor file hashes on-chain as verifiable proofs.
Yunxiao MCP Server provides AI assistants with the ability to interact with the Yunxiao platform. It provides a set of tools that interact with Yunxiao's API, allowing AI assistants to manage Codeup repository, Project, Pipeline, Packages etc.
MCP Security Weekly
Get CVE alerts and security updates for Dotnet Docker Kali Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
edit:
This was my first go at this and it implimented Docker DOOD architecture which binds to the hosts docker.socket, which gives the container control of the host's docker daemon which isn't great for security, but would be great for persistence, especially if the container is burried multiple containers deep as we only have visibility on the outer containers.
Use my newer repo if you want agentic AI pentesting with a Kali docker container.
https://github.com/timsonner/kali-mcp-server
Use this repo as a basis for learning or persistence mechanisms or a base for whatever.
The new new is waaaay better.
01/04/2026
the chat-kitties go meow
VS Code client runs commands as root in Kali docker image using "kali-exec" MCP server
docker pull docker.io/kalilinux/kali-rolling
git clone https://github.com/timsonner/dotnet-docker-kali-mcp-server.git
cd KaliMCP
dotnet add package ModelContextProtocol --version 0.3.0-preview.4
dotnet add package Microsoft.Extensions.Hosting
docker build -t kali-mcp-server .
docker mcp client connect vscode
Click "Start" next to "kali-mcp-server" MCP server in mcp.json
Hi, copilot. Run this command in terminal "docker run --rm -it -p 80:80 vulnerables/web-dvwa
" Once that completes, perform sqlmap against host.docker.internal:80 using kali-exec.
docker pull docker.io/kalilinux/kali-rolling
mkdir <name of folder that contains project>
git init
dotnet new console -n <name of project>
mkdir -p .vscode && touch .vscode/mcp.json
mcp.json
{
"servers": {
"kali-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--user",
"root",
"-v",
"/var/run/docker.sock:/var/run/docker.sock",
"kali-mcp-server"
],
"type": "stdio"
},
"MCP_DOCKER": {
"command": "docker",
"args": [
"mcp",
"gateway",
"run"
],
"type": "stdio"
}
}
}
cd <project name>
dotnet add package ModelContextProtocol --version 0.3.0-preview.4
dotnet add package Microsoft.Extensions.Hosting
program.cs
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
var builder = Host.CreateApplicationBuilder(args);
// Configure all logs to go to stderr (stdout is used for the MCP protocol messages).
builder.Logging.AddConsole(o => o.LogToStandardErrorThreshold = LogLevel.Trace);
// Add the MCP services: the transport to use (stdio) and the tools to register.
builder.Services
.AddMcpServer()
.WithStdioServerTransport()
.WithToolsFromAssembly();
await builder.Build().RunAsync();
mkdir -p Tools
touch ./Tools/KaliLinuxToolset.cs
using System.ComponentModel;
using System.Diagnostics;
using System.Text;
using ModelContextProtocol.Server;
namespace KaliMCP.Tools;
[McpServerToolType]
public static class KaliLinuxToolset
{
private const string DefaultImage = "kalilinux/kali-rolling";
[McpServerTool(Name = "kali-exec"), Description("Runs a shell command inside the Kali Linux Docker image and returns the captured output.")]
public static async Task<string> RunCommandAsync(
[Description("The shell command t
... [View full README on GitHub](https://github.com/timsonner/dotnet-docker-kali-mcp-server#readme)