kastell — Claude Code MCP server for server management
Kastell connects an AI agent to server security audits and infrastructure management. Use it to inspect and maintain servers through Claude Code or another listed platform.
claude mcp add kastell -e HETZNER_TOKEN=<HETZNER_TOKEN> -e DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> -e VULTR_TOKEN=<VULTR_TOKEN> -e LINODE_TOKEN=<LINODE_TOKEN> -- npx -y kastellWhat kastell does
Kastell can provision and maintain servers, configure SSH and firewalls, check server health, and run security audits. Through MCP, an agent can access these capabilities along with backups, restores, monitoring, and diagnostics.
The server runs with npx -y kastell. Cloud provisioning uses provider tokens supplied as environment variables: HETZNER_TOKEN, DIGITALOCEAN_TOKEN, VULTR_TOKEN, and LINODE_TOKEN. In Claude Code, the setup registers an MCP server named kastell and passes those variables. Cloud actions that depend on a provider need its token configured.
What it helps with
- check server health through an agent
- audit a server’s security settings
- configure SSH and firewall rules
- run maintenance with an update and health check
- back up servers and restore from a backup
Example prompts for the agent
- Check the health of all my servers and report which ones need attention.
- Audit this server’s security and list the issues you find.
- Create backups for all servers.
How to install kastell
Platform CLI
claude mcp add kastell -e HETZNER_TOKEN=<HETZNER_TOKEN> -e DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> -e VULTR_TOKEN=<VULTR_TOKEN> -e LINODE_TOKEN=<LINODE_TOKEN> -- npx -y kastellReplace <…> with your own values
Platform CLI
codex mcp add kastell --env HETZNER_TOKEN=<HETZNER_TOKEN> --env DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> --env VULTR_TOKEN=<VULTR_TOKEN> --env LINODE_TOKEN=<LINODE_TOKEN> -- npx -y kastellReplace <…> with your own values
Config file
{
"mcpServers": {
"kastell": {
"command": "npx",
"args": [
"-y",
"kastell"
],
"env": {
"HETZNER_TOKEN": "<HETZNER_TOKEN>",
"DIGITALOCEAN_TOKEN": "<DIGITALOCEAN_TOKEN>",
"VULTR_TOKEN": "<VULTR_TOKEN>",
"LINODE_TOKEN": "<LINODE_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"kastell": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kastell"
],
"env": {
"HETZNER_TOKEN": "<HETZNER_TOKEN>",
"DIGITALOCEAN_TOKEN": "<DIGITALOCEAN_TOKEN>",
"VULTR_TOKEN": "<VULTR_TOKEN>",
"LINODE_TOKEN": "<LINODE_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e HETZNER_TOKEN=<HETZNER_TOKEN> -e DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> -e VULTR_TOKEN=<VULTR_TOKEN> -e LINODE_TOKEN=<LINODE_TOKEN> kastell npx -y kastellReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about kastell
How do I install kastell in Claude Code?
Run `claude mcp add kastell -e HETZNER_TOKEN=<HETZNER_TOKEN> -e DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> -e VULTR_TOKEN=<VULTR_TOKEN> -e LINODE_TOKEN=<LINODE_TOKEN> -- npx -y kastell. The alternative command is claude mcp add --env HETZNER_TOKEN=<HETZNER_TOKEN> --env DIGITALOCEAN_TOKEN=<DIGITALOCEAN_TOKEN> --env VULTR_TOKEN=<VULTR_TOKEN> --env LINODE_TOKEN=<LINODE_TOKEN> --transport stdio kastell -- npx -y kastell`.
What does kastell do?
Kastell manages servers and provides security audits, SSH and firewall configuration, monitoring, and diagnostics. An MCP-compatible agent can call these server-management features.
Which tokens does cloud provisioning need?
Configure HETZNER_TOKEN, DIGITALOCEAN_TOKEN, VULTR_TOKEN, and LINODE_TOKEN as environment variables. The Claude Code setup passes these values to the MCP server.