← Back to directory
K

Kastell

Community
Your infrastructure, fortified.
Category
Dev Tools #50 of 438
Stars
★ 60 Popular
Transport
stdio (local process)
Runtime
Node.js 20+
Credentials
Optional API key
License
Apache-2.0
Last commit
Tools
14
65FMRS · C

Kastell is a powerful MCP server for managing self-hosted servers via CLI or AI agents, offering extensive security audits, hardening, and cloud provider integration. It is well-tested (over 11,000 tests) and has a strong focus on security. However, it requires cloud provider API tokens and SSH access. It is best suited for developers and DevOps teams comfortable with Linux server management.

Strongest · Security and permissions 17/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
17/20
Maintenance
13/20
Documentation
14/20
Setup experience
13/20
Why each score
Reliability 8/20
The manifest is well-formed with a schema reference, stdio transport is simple, and the four optional secret-marked environment variables are clearly declared. However, the manifest contains no tool definitions, and multiple internal contradictions exist between the README and the manifest: version 1.14.0 vs the v2.3.1 banner; 457 checks in the manifest vs 449 in several README sections; 12,132 tests/380 suites in one section vs 11,206 tests/344 suites in another. No CI workflow files or committed tests are present in the supplied evidence to verify the handshake or execution paths, and the static calibration caps reliability at 12 with uncertainty lowering the score. Deductions are for unverifiable claims and self-contradictory evidence.
Security and permissions 17/20
The security posture is strong on paper: MCP defaults to SAFE_MODE=true, blocking provision/destroy/restore/snapshot-delete/restart/maintain; non-TTY destructive commands require explicit --force; API tokens come only from environment variables and are never persisted; zero telemetry is claimed; MCP inputs use Zod schema validation and backup restore has path-traversal protection; SSH uses accept-new host-key verification with IP octet validation, and KASTELL_STRICT_HOST_KEY promotes TOFU warnings to hard errors; shell injection is mitigated by using spawn/spawnSync rather than execSync; error output sanitization redacts tokens/IPs/paths; config files use 0o600 permissions with Windows DACL equivalents; installation examples use 'your-token' placeholders, not real secrets. No red-line condition is triggered (no malware, no covert exfiltration, destructive operations have confirmation gates). Deductions: the safe-mode gate can be overridden via KASTELL_SAFE_MODE=false, and most protections are README claims that cannot be statically verified from the supplied files; the confirmation chain for destructive operations depends on runtime behavior not shown in the manifest.
Maintenance 13/20
Apache-2.0 license is clear; the repository is not archived; npm version badges, CI/coverage/Snyk/Socket badges, a referenced CHANGELOG, and a public roadmap (v1.14/v2.0/v3.0) indicate ongoing releases and automation. However, governance gaps exist: the README's version claim (v2.3.1) conflicts with the published version (1.14.0); test-count and check-count figures are inconsistent across sections, suggesting process sloppiness; no SECURITY.md or dedicated vulnerability-response channel is mentioned beyond GitHub Issues. Star counts were treated as discovery signals only and add no points. Commit frequency and release cadence cannot be independently verified from the supplied evidence, so points are deducted.
Documentation 14/20
Documentation is layered and fairly complete: quick start, command reference organized by category, provider and platform comparison tables, MCP client configuration snippets (Claude Code/Desktop, VS Code, Cursor), troubleshooting, a CI/CD integration example, safety-mode explanation, and pricing/template information, plus references to llms.txt and the MCP Registry. Gaps and contradictions lower the score: per-tool input parameter schemas and limit/error documentation for the MCP tools are absent; the tool table lists 14 tools while the comparison table claims 17; the check count is 449 in two README locations but 457 in the manifest, and test counts disagree between sections. These numeric inconsistencies undermine the README's reliability as reviewable evidence.
Setup experience 13/20
The install path is clear and short: Node.js 20+ plus an npm package; a standard MCP client JSON snippet is provided (`npx -y -p kastell kastell-mcp`); the four cloud-provider tokens are optional placeholder env vars, so basic use needs no credentials; per-platform guides for Claude Code, Claude Desktop, VS Code, and Cursor are referenced. Deductions: the `kastell-mcp` binary entry point cannot be verified from the supplied material; the example does not pin a version, so `npx -y` pulls latest and creates a reproducibility risk; full functionality depends on four optional tokens and degraded behavior without them is not documented. The static calibration caps setup at 15 without in-file execution evidence (real CI plus committed tests), and the evidence here is README/manifest only, hence 13.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the network

Best for

  • Developers and DevOps teams looking to manage self-hosted infrastructure via CLI or AI agents
  • Users who want to streamline server provisioning and hardening across multiple cloud providers
  • Teams that want to integrate security audits into CI/CD pipelines

Not for

  • People without SSH access or who do not need cloud provider integrations
  • Users who require a GUI or managed service rather than a CLI
  • Those who need macOS/BSD support (Linux only platform)
  • Those who need full Windows native support (manages Linux servers only via SSH)

Required permissions

  • Requires access to cloud provider API tokens (Hetzner, DigitalOcean, Vultr, Linode)
  • Requires SSH access to target servers to perform audits, hardening, and maintenance
  • Can create SSH keys and configuration files on the local machine
  • Can execute destructive operations on servers (if enabled)

Risks and side effects

  • Destructive operations (destroy, restore, snapshot-delete, provision, restart, maintain, snapshot-create) are blocked in default safe mode; if enabled, risk of data loss
  • API tokens are sensitive; ensure they are stored securely
  • SSH connections may be intercepted; use strict host key verification
  • Automated operations may inadvertently change server configurations
  • Misuse could lead to service disruption or security vulnerabilities

Setup

Before you start

Runtime:Node.js 20+

HETZNER_TOKEN optionalsecret Hetzner Cloud API token, needed only for Hetzner servers; generate in the Hetzner Cloud console.
DIGITALOCEAN_TOKEN optionalsecret DigitalOcean API token, needed only for DigitalOcean servers; generate under API in the DigitalOcean control panel.
VULTR_TOKEN optionalsecret Vultr API token, needed only for Vultr servers; generate in the Vultr console under API.
LINODE_TOKEN optionalsecret Linode (Akamai) API token, needed only for Linode servers; generate in Linode Cloud Manager.
Other optional settings (2)
KASTELL_SAFE_MODE optional Controls whether destructive operations are blocked; defaults to true over MCP, blocking destroy/restore and similar actions.
KASTELL_STRICT_HOST_KEY optional When set to true, unknown SSH host keys are rejected, promoting the TOFU warning to a hard error.

To install the Kastell MCP server:

  1. Ensure Node.js 20 or later is installed.
  2. Add the following configuration to your MCP client config (e.g., .mcp.json for Claude Code, .cursor/mcp.json for Cursor):
{
  "mcpServers": {
    "kastell": {
      "command": "npx",
      "args": ["-y", "-p", "kastell", "kastell-mcp"],
      "env": {
        "HETZNER_TOKEN": "your-token",
        "DIGITALOCEAN_TOKEN": "your-token",
        "VULTR_TOKEN": "your-token",
        "LINODE_TOKEN": "your-token"
      }
    }
  }
}
  1. Optionally, set provider API tokens in environment variables. Certain operations (like provision, destroy, restore) are blocked by default in safe mode; set KASTELL_SAFE_MODE=false to enable them.
.mcp.json
{
  "mcpServers": {
    "kastell": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "kastell",
        "kastell-mcp"
      ],
      "env": {
        "HETZNER_TOKEN": "your-token",
        "DIGITALOCEAN_TOKEN": "your-token",
        "VULTR_TOKEN": "your-token",
        "LINODE_TOKEN": "your-token"
      }
    }
  }
}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "kastell": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "kastell",
        "kastell-mcp"
      ],
      "env": {
        "HETZNER_TOKEN": "your-token",
        "DIGITALOCEAN_TOKEN": "your-token",
        "VULTR_TOKEN": "your-token",
        "LINODE_TOKEN": "your-token"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add kastell -e HETZNER_TOKEN=your-token -e DIGITALOCEAN_TOKEN=your-token -e VULTR_TOKEN=your-token -e LINODE_TOKEN=your-token -- npx -y -p kastell kastell-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After connecting the client, confirm tools like server_info, server_audit, and server_doctor appear in the tool list, or ask the AI to run server_info's list action to prove connectivity.

Troubleshooting

  1. If server creation fails, run `kastell doctor --check-tokens` to verify API tokens and environment
  2. If server is unresponsive, try `kastell status my-server --autostart` or `kastell health`
  3. If commands fail on a server, check SSH credentials and host keys
  4. Ensure correct API tokens are set for the desired provider
  5. Check KASTELL_SAFE_MODE setting to ensure destructive operations are allowed or blocked as expected

Things to try

Once connected, you can ask your AI assistant things like:

  • Run a full security audit on my server and show remediation guidance for failed checks.
  • List all registered servers with their health status.
  • Back up the database and config for my-server.
  • Show recent platform logs and CPU/RAM usage for my-server.

Tools 14

server_info read-only
Query server information, check cloud provider and platform status.
server_logs read-only
Fetch platform/Docker logs and system metrics via SSH.
server_manage destructive
Register, unregister, or destroy cloud servers.
server_maintain writes
Update platform, restart servers, run full maintenance.
server_secure writes
SSH hardening, firewall rules, domain/SSL management (10 subcommands).
server_backup writes
Backup/restore databases and create/manage VPS snapshots.
server_provision destructive
Provision new servers on cloud providers.
server_audit read-only
449-check security audit with compliance framework filtering; use --explain for remediation guidance.
Show 6 more tools
server_evidence read-only
Collect forensic evidence package with checksums.
server_guard writes
Manage autonomous security monitoring daemon.
server_doctor read-only
Proactive health analysis with remediation commands.
server_lock writes
24-step production hardening (SSH, UFW, sysctl, auditd, AIDE, Docker).
server_fleet read-only
Fleet-wide health and security posture dashboard.
server_fix writes
Apply safe auto-fixes with backup (SAFE tier only, dryRun default).

Use cases

Provision and deploy new servers on cloud providers
Perform full security audits and hardening on existing servers
Backup and restore databases and configurations
Manage fleets of servers and run maintenance
Automate server management via AI agents

Supported clients

Claude Code
Cursor
Windsurf

Listed from the project's documentation, not tested by this site.

Overview

Kastell is an all-in-one CLI and MCP server for provisioning, securing, backing up, and managing self-hosted servers. It provides comprehensive security audits (449 checks), hardening (24-step), firewall management, auto-fix, monitoring, and supports deployment on Hetzner, DigitalOcean, Vultr, and Linode. It includes a built-in MCP server, allowing AI agents like Claude to manage servers directly.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision 2d77c613f4b6 Data synced 2026-10-12 Read the FMRS scoring method