Get Started.
Krysta is a security toolkit for AI agent infrastructure. It discovers MCP servers in your project, scans them for vulnerabilities, and lets you enforce runtime policies via a security gateway.
Run without installing:
npx krysta probe --deep
Or install globally:
npm install -g krysta
The npm package is a thin wrapper. On install it downloads the correct pre-built Rust binary for your platform from GitHub releases. Node.js 16+ is required. The binary itself has no runtime dependencies.
Scan your MCP servers
Krysta discovers every MCP server configured on your machine — Claude Desktop, Cursor, VS Code — and checks it against known vulnerability patterns.
Basic scan (config-level checks only):
npx krysta probe
Scan a specific directory or config path:
npx krysta probe --path "path/to/config/directory"
Full deep scan — connects to each server, downloads and inspects its package source, and confirms real findings with live testing:
npx krysta probe --deep
Krysta searches for claude_desktop_config.json, .cursor/mcp.json, and mcp_settings.json at the given path. No config needed to get started.
The scanner
Discovers MCP servers from config files and runs static, package, source-code, and dynamic security checks against each one.
All flags:
krysta probe [FLAGS]
-p, --path <DIR> Directory or config path to scan (default: .)
-d, --deep Connect to each server, fetch tool schemas, and run dynamic checks
--upload Send results to the dashboard (requires krysta login first)
KRYSTA-001HighMissing authentication
No auth token or credentials found in the server config.
KRYSTA-004MediumPotential path traversal risk
Server name suggests file system access (contains "file" or "fs").
Live protocol testing
With --deep, krysta connects to each server over its actual transport — stdio or SSE — speaks the MCP protocol directly, and inspects real tool schemas and behavior.
npx krysta probe --deep
What happens under the hood:
1. Connects to each server over its configured transport (stdio process or SSE endpoint)
2. Performs the MCP initialize handshake, then requests tools/list
3. For npm-based servers, downloads the published package and statically scans its source
4. Runs every tool through the vulnerability database, matching schemas and descriptions
5. For select checks, sends a safe canary payload and confirms the result — turning a
suspected finding into a confirmed one
Deep scan works on both stdio and SSE transports. Stdio servers are spawned as a child process and spoken to over stdin/stdout; SSE servers are connected to directly. Timeout is configurable per connection.
CVE-2026-MCP-001CriticalCommand injection via tool description
CVE-2026-MCP-002HighPath traversal in file system tools
CVE-2026-MCP-003HighSSRF via fetch_url tool
CVE-2026-MCP-004CriticalCredential exposure in environment variables
CVE-2026-MCP-005CriticalExec/Shell injection via subprocess
CVE-2026-MCP-006CriticalHardening bypass via npx -c flag
CVE-2026-MCP-007HighTool description poisoning
CVE-2026-MCP-008MediumUnpinned server config (supply chain risk)
CVE-2026-MCP-009HighInsecure SSE transport — missing authentication
CVE-2026-MCP-010HighMissing auth on public SSE endpoint
Reading the output
After scanning, krysta prints a summary table and writes two files to ~/.krysta/.
Example terminal output:
🔍 Krysta Probe — Scanning for MCP servers...
Found 2 MCP server(s)
📡 filesystem (Stdio)
🟠 filesystem — Missing authentication
🟡 filesystem — Potential path traversal risk
📡 shell-server (Stdio)
🔴 shell-server — Confirmed command injection
═════════════════════════════════════════════════════════════════
SCAN SUMMARY
═════════════════════════════════════════════════════════════════
Servers Found: 2
Total Findings: 3
🔴 Critical: 1
🟠 High: 1
🟡 Medium: 1
🟢 Low: 0
Risk: 🔴 CRITICAL
~/.krysta/krysta-report.jsonFull structured report with scan date, server list, severity breakdown, and all findings. Pass --upload to send this to the dashboard.
~/.krysta/krysta-mesh-policy.yamlAuto-generated mesh policy file derived from findings. Critical and High findings become block rules, Medium and Low become log rules. Feed directly into krysta-mesh.
Read the JSON report:
cat ~/.krysta/krysta-report.json
Upload to the dashboard (requires krysta login first):
npx krysta probe --deep --upload
Runtime gateway
krysta-mesh is a security proxy that sits between your AI agent and the MCP server. It inspects every tool call in real time and blocks or logs based on a YAML policy file.
Build from source:
git clone https://github.com/Krysta-Wing/krysta_mesh
cd krysta_mesh
cargo build --release
Start the gateway:
krysta-mesh start --upstream http://localhost:3001 --port 8080 --policy mesh-policy.yaml
Point your agent at the gateway instead of the MCP server directly:
# Before: agent → http://localhost:3001 (MCP server)
# After: agent → http://localhost:8080 (krysta-mesh) → http://localhost:3001
-u, --upstreamThe URL of the real MCP server to forward allowed requests to.
-p, --portPort the gateway listens on.
-f, --policyPath to your YAML policy file.
The gateway intercepts tools/call JSON-RPC requests and evaluates them against all policy rules in order. Other methods (like tools/list) are forwarded transparently.
Example gateway output:
🛡️ Krysta Mesh — Starting security gateway...
✅ Policy loaded: 5 rules
🌐 Listening on: http://0.0.0.0:8080
⬆️ Upstream: http://localhost:3001
All MCP traffic will be inspected and filtered.
Writing rules
A policy file is a YAML document with a name and a list of rules. Rules are evaluated in order for every tools/call request.
Full example policy:
name: "default-security-policy"
rules:
- name: "block-command-execution"
action: block
severity: Critical
condition:
tool_pattern: "execute|command|shell|exec"
- name: "block-dangerous-paths"
action: block
severity: High
condition:
tool_name: "read_file"
argument_contains: ["../", "/etc/", "/root/", ".ssh"]
- name: "log-file-operations"
action: log
severity: Medium
condition:
tool_pattern: "file|read|write"
nameUnique rule identifier. Shown in blocked request logs.
actionblock returns an error to the agent. log records and forwards. allow forwards with no logging.
severityInformational. Does not change action behavior.
condition.tool_nameExact match on the tool name from the tools/call request.
condition.tool_patternRegex matched against the tool name. Example: "execute|shell|exec".
condition.argument_containsThe rule fires if any string in the list appears anywhere in the serialized arguments JSON.
krysta probe --deep auto-generates a policy file at ~/.krysta/krysta-mesh-policy.yaml based on findings. Use it as a starting point and customize from there.
Apply the auto-generated policy:
krysta-mesh start --upstream http://localhost:3001 --policy ~/.krysta/krysta-mesh-policy.yaml
krysta-core
krysta-core is the shared Rust library that powers both probe and mesh. It contains the vulnerability database, severity and category types, and the policy rule structures.
Vulnerability categories:
CommandInjectionArbitrary command execution through tool input or shell calls.
PathTraversalFile read/write without path validation, allowing access outside workspace.
SSRFURL fetching that can reach internal services or cloud metadata endpoints.
CredentialExposureHardcoded API keys, tokens, or secrets in config files.
ToolPoisoningMalicious instructions injected into tool descriptions to manipulate agent behavior.
NetworkExposureServer bound to 0.0.0.0 or a public IP without authentication.
AuthenticationMCP server accessible with no auth token or credentials required.
InformationDisclosureServer leaks internal state, error details, or environment variables.
The vulnerability database is compiled into the binary — it is not fetched at runtime. New CVE entries are added in krysta_core/src/vuln_db.rs and released with new binary versions.
When things go wrong
Common failure modes and how to resolve them.
No MCP servers foundCause: krysta found no recognized config file at the given path.
Fix: Check that claude_desktop_config.json, .cursor/mcp.json, or mcp_settings.json exists in the target path.
MCP handshake timed outCause: The server process did not respond to the initialize request in time — often a startup crash or invalid config argument.
Fix: Check stderr output for the server process; a common cause is a placeholder path in the config args that does not exist on disk.
Binary not found on npm installCause: The GitHub release for your platform is not available yet, or the download was blocked.
Fix: Check https://github.com/Krysta-Wing/krysta_probe/releases for available binaries. Build from source with: cargo build --release
Policy file not found (krysta-mesh)Cause: The path passed to --policy does not exist.
Fix: Run krysta probe --deep first to auto-generate ~/.krysta/krysta-mesh-policy.yaml, or create a policy file manually.
Upload failed: HTTP 401Cause: No valid session. The --upload flag requires authentication.
Fix: Run krysta login first. This opens a browser to authorize and saves credentials locally.