π€ AI Assistants
Ludus ships two packages for AI coding assistants. The MCP server handles execution; skills provide context. They work independently or together.
# MCP server β calls the Ludus API
local:~$ claude mcp add ludus -- npx -y @badsectorlabs/ludus-mcp \
--url https://<LUDUS_HOST>:8080 --api-key <YOUR_API_KEY>
# Skills β Ludus-specific knowledge for range config, troubleshooting, etc.
local:~$ npx skills add https://gitlab.com/badsectorlabs/ludus-skills
MCP Serverβ
@badsectorlabs/ludus-mcp is a local MCP server that connects AI coding assistants to the Ludus API. Anything you can do with the CLI works through MCP β templates, deploy tags, snapshots, testing mode, blueprints, roles, and everything else.
"snapshot all my VMs, then start testing mode and allow example.com"
"deploy with the vm-deploy, network, and dns-rewrites tags, then deploy again limited to my new kali box"
Setupβ
Requires Node.js 20+, your Ludus server URL, and an API key (see ludus apikey).
Claude Codeβ
local:~$ claude mcp add ludus -- npx -y @badsectorlabs/ludus-mcp \
--url https://<LUDUS_HOST>:8080 --api-key <YOUR_API_KEY>
Codexβ
local:~$ codex mcp add ludus -- npx -y @badsectorlabs/ludus-mcp \
--url https://<LUDUS_HOST>:8080 --api-key <YOUR_API_KEY>
Claude Desktopβ
{
"mcpServers": {
"ludus": {
"command": "npx",
"args": ["-y", "@badsectorlabs/ludus-mcp", "--url", "https://<LUDUS_HOST>:8080", "--api-key", "<YOUR_API_KEY>"]
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cursorβ
{
"mcpServers": {
"ludus": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@badsectorlabs/ludus-mcp", "--url", "https://<LUDUS_HOST>:8080", "--api-key", "<YOUR_API_KEY>"]
}
}
}
Environment Variablesβ
--url and --api-key can also be set via LUDUS_URL and LUDUS_API_KEY.
How It Worksβ
βββββββββββββββ stdio ββββββββββββββββ HTTPS ββββββββββββββββ
β AI Client β ββββββββββββββΊ β ludus-mcp β ββββββββββββββΊ β Ludus Server β
β (Claude, β MCP protocol β (local) β REST API β (remote) β
β Cursor...) β β β + API key β β
βββββββββββββββ ββββββββββββββββ ββββββββββββββββ
The server runs locally as a stdio process. On startup it loads a bundled OpenAPI spec, then attempts to fetch the latest from your server at /api/v2/openapi. Three tools are exposed:
list_ludus_operationsβ search and filter available API operationsdescribe_ludus_operationβ get parameter and request body schemas for an operationcall_ludus_apiβ execute an API operation
list and describe read from the parsed spec. call builds an HTTP request from the operation definition and your arguments, sends it to the Ludus REST API, and returns the result.
Good to Knowβ
- Self-signed certs β Accepted, but only for requests to your Ludus server. Uses a scoped TLS agent, not
NODE_TLS_REJECT_UNAUTHORIZED=0. - API key storage β Sent via
X-API-KEYheader, never logged or included in tool output. Stored in plaintext in your MCP client config file. - Destructive operations β The server can call any API operation your key has access to, including deletes and deploys.
- Ludus v1 β Not supported. This server requires Ludus v2.
Skillsβ
ludus-skills are agent skills that give AI assistants Ludus-specific knowledge. They don't require a running Ludus server.
local:~$ npx skills add https://gitlab.com/badsectorlabs/ludus-skills
| Skill | What it covers |
|---|---|
| range-config | Range configuration YAML: VM definitions, domains, networking, validation rules |
| troubleshooting | Deployment failures, networking, templates, WireGuard, Proxmox, Ansible |
| environment-guide | Pre-built environments: GOAD, Elastic, SCCM, Vulhub, Pivot Lab, and more |
| ludus-cli | CLI command syntax, flags, and workflows |
Supported by Claude Code, Cursor, Windsurf, and any editor that implements the Agent Skills standard.
Better Togetherβ
With both installed, "build me an Elastic server" does the whole thing:
- Looks up the Elastic lab requirements from the environment-guide skill β templates, roles,
depends_onwiring, sizing - Checks your server for built templates and installed roles via the MCP server, installs what's missing
- Writes a valid range config with the correct VLANs, role assignments, and dependency chain, sets it, and deploys
Troubleshooting works the same way β paste an error and the troubleshooting skill identifies the failure category while the MCP server pulls range status, deploy errors, and config to narrow it down.
Sourceβ
- MCP Server: gitlab.com/badsectorlabs/ludus-mcp
- Skills: gitlab.com/badsectorlabs/ludus-skills