Cruma
v1.0.24Publish a local dev server or folder to a public URL over a Cruma tunnel.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ping
Verify that the live Cruma MCP service is reachable and responding from inside the running agent process.
describe_cruma
Return a high-level description of what Cruma is, what the local tunnel agent does, what this MCP service is for, and links to the public documentation.
get_cruma_glossary
Return the Cruma domain glossary so clients can interpret terms like tunnel, assigned_domain, listener, frontend, backend, process, transport, and tunnel_plan correctly.
get_config_model_reference
Return a structured reference for Cruma's user-facing configuration model, including backend kinds, upstream protocols, listeners, frontend routing rules, middleware behavior, certificate modes, and how config turns into runtime proxy routes. The whole reference is large: pass `section` to get just one part (the full reference lists the valid `sections`).
| Parameter | Type | Description |
|---|---|---|
section * | Return only this part of the reference. Omit it for the whole reference, which is large. |
get_runtime_summary
Read a compact summary of the live Cruma runtime, including assigned domain, tunnel plan, transport count, listener state count, hosted-process count, and IPv6 tunnel assignments (assigned addresses, tunnel DNS name, TCP port DNS name).
keep_session_agent
Keep the coding-session agent running after every coding connection closes. This explicitly converts a session-started agent to user ownership, including its live tunnels, shares and hosted processes. It is idempotent; deliberately user-started, desktop and installed-service agents return a typed refusal because they are already user-owned.
get_health_summary
Return a fast, zero-argument health overview of the running Cruma agent. Reports an overall status (ok / degraded / critical) and a structured list of active issues across: hosted-process health (crashes, backoff, start failures), listener binding failures, config validation errors, certificate expiry or ACME failures, tunnel connectivity, and HTTP error rates from the last 10 minutes. Use this as the first call when troubleshooting — it bootstraps context before diving into specific tools.
get_runtime_inventory
Return orientation-level lists of live frontends, backends, processes, listeners, and TCP port forwards — names and IDs only by default. Pass full=true for complete field detail. Use sections to request specific sections. Prefer get_site_summary for targeted per-site queries.
| Parameter | Type | Description |
|---|---|---|
full * | boolean | Return full detail for each item. Default (false) returns a compact name/ID-only list suitable for orientation. Pass true to get all fields. |
sections * | array |
get_key_vault_status
Return, for each hosted process whose env has an Azure Key Vault reference, whether the last read of each variable worked: `ok`, `not_read` (the process has not tried to start yet), or the failure kind with a message that names the vault and secret and says how to fix it. Also returns `azure_key_vault.tenant_id`. Read-only: it never contacts the vault and never returns a secret value, only the reference as written.
get_site_summary
Return a full site card for one or more frontend hostnames, process IDs, or backend IDs. Each card includes the target entity plus all directly related entities: the listeners that serve it, the backend or process it targets (for frontends), and any frontends that reference it (for processes and backends). Use this instead of get_runtime_inventory when you want the complete picture for a specific site.
| Parameter | Type | Description |
|---|---|---|
ids * | array | One or more frontend hostnames, process IDs, or backend IDs to describe. Each entry is resolved to a site card containing the target entity and all directly related entities (listeners, backend/proces… |
get_mcp_status
Return sanitized live MCP and local OAuth2 settings, including MCP enablement, auth mode, listener bindings, hostname filters, CORS origins, whether the built-in OAuth2 server is enabled, and the local socket coding agents connect over: whether it is on, whether their changes are saved, its live state, and how many are connected.
get_identity_key
Return the public key that verifies the signed visitor identity (the X-Cruma-Identity header) this agent passes to backends of sign-in-protected hostnames: the current key and, for ten minutes after a rotation, the previous one, each with its kid, algorithm, JWK `x` and PEM, plus the JWKS path every protected hostname serves them at. Public data only; the agent never reveals the private key. Rotate it with `cruma auth identity-key --rotate` or in the desktop app.
get_proxy_routes
Return a sanitized view of the live generated proxy listeners and HTTP routes, including route names, match filters, targets, and middleware summaries for injected routes such as cruma-local-mcp.
| Parameter | Type | Description |
|---|---|---|
filter * | string | null |
get_request_statistics
Return the live HTTP request statistics snapshot used by the statistics page, including totals, status-code breakdowns, time buckets, top hosts, top client IPs, rate-limited keys, and firewall/WAF blocked counts by IP and rule.
get_process_logs
Return the last N hosted-process log entries from the live process orchestrator, with optional case-insensitive text filtering and optional process id filtering.
| Parameter | Type | Description |
|---|---|---|
filter * | string | null | |
limit * | integer | |
process_id * | string | null |
get_app_logs
Return the last N application tracing log entries from the live app log ring buffer, with optional case-insensitive filtering.
| Parameter | Type | Description |
|---|---|---|
filter * | string | null | |
limit * | integer | |
process_id * | string | null |
get_certificate_status
Return live certificate-management insight: cached ACME/self-signed certificates, configured frontend/listener certificate coverage, recent ACME lifecycle events, and monitor thresholds.
| Parameter | Type | Description |
|---|---|---|
acme_event_limit * | integer |
get_request_recording_status
Return the live HTTP request recording state, capture configuration, and retained request count.
set_request_recording
Enable or disable live HTTP request recording. Existing captured requests remain readable until cleared.
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean |
toggle_request_recording
Toggle live HTTP request recording on or off and return the resulting state.
list_recorded_requests
List compact metadata for recently retained recorded HTTP requests. Use inspect_recorded_request for headers, bodies, and stream messages.
| Parameter | Type | Description |
|---|---|---|
filter * | string | null | |
limit * | integer |
inspect_recorded_request
Inspect one recorded HTTP request by req_id, including headers, who a signed-in request belonged to (signed_in_as, read from its session when opened), captured request/response bodies, WebSocket messages, and SSE events when available.
| Parameter | Type | Description |
|---|---|---|
body_bytes_limit * | integer | |
include_bodies * | boolean | |
include_messages * | boolean | |
message_limit * | integer | |
req_id * | integer |
clear_recorded_requests
Remove all previously recorded HTTP request captures from the live capture store.
upsert_backend
Add or replace one backend definition by id, rebuild proxy routing, and optionally persist the resulting config to disk with persist=true.
remove_backend
Remove one backend definition by id. Fails validation if any frontend still references it. Use persist=true to write the resulting config to disk.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | |
persist * | boolean |
upsert_frontend
Add or replace one frontend definition by hostname, rebuild proxy routing, and optionally persist the resulting config to disk with persist=true.
remove_frontend
Remove one frontend definition by hostname. Use persist=true to write the resulting config to disk.
| Parameter | Type | Description |
|---|---|---|
hostname * | string | |
persist * | boolean |
expose_local_port
Make a local port reachable through this agent's tunnel. Omit access for a public share, or set its closed password, ip_allowlist, or sign_in access policy. Creates (or updates, if the name or port is already exposed) a backend for host:port (default 127.0.0.1) and a tunnel-only frontend at <name>.<assigned domain>, waits up to 30 s for the tunnel to have its public domain, and returns public_url, local_target, frontend_id and account. The share lasts until unexpose or until the agent stops (over the local socket: until that socket connection closes): no config save writes it to the agent's co…
| Parameter | Type | Description |
|---|---|---|
access * | Optional temporary access policy. Omit it to leave the share public. | |
host * | string | null | Local host or IP the server listens on. Default: `127.0.0.1`. |
name * | string | null | Subdomain label for the public hostname (`<name>.<assigned domain>`): lowercase letters, digits and `-`, at most 63 characters. Default: the name this port is already exposed under, otherwise `port-<p… |
port * | integer | Local TCP port the server listens on (1-65535). |
expose_local_directory
Make a local folder reachable through this agent's tunnel. Omit access for a public share, or set its closed password, ip_allowlist, or sign_in access policy. The path must be an existing directory; absolute paths and ~/ paths are accepted, while relative paths are refused when the caller's working directory is unknown. Creates (or updates by name) a tunnel-only local-directory frontend at <name>.<assigned domain>, waits up to 30 s for a public domain, and returns public_url, local_target, frontend_id and account. Directory listings are off unless index=true. The share is temporary and is with…
| Parameter | Type | Description |
|---|---|---|
access * | Optional temporary access policy. Omit it to leave the share public. | |
index * | boolean | Enable directory listings. Default: false. |
name * | string | null | Subdomain label for the public hostname. Default: `directory-<basename>`. |
path * | string | Existing directory to serve. Absolute and `~/` paths are accepted. |
unexpose
Stop serving a temporary port or directory share created by expose_local_port or expose_local_directory: removes exactly the backend and frontend that call created, so its public URL no longer reaches the local target. Pass the returned name (or frontend_id). Fails for names those tools did not create. A share that was saved to the applied project's file is removed from it too.
| Parameter | Type | Description |
|---|---|---|
name * | string | The `name` (equal to the `frontend_id`) returned by either expose tool. |
attach_project
Preview a project file (a cruma.yaml or cruma.toml in the user's repo) without exposing anything: loads and validates it and returns what applying it would add (frontends, backends, hosted processes, sections that are ignored). A parse, validation or literal-secret failure names the file and field. Set create=true to create the file, with empty sections, when it does not exist. Show the user the summary and ask before calling apply_project. One project per connection; a second window attaching the same file shares it. Local-socket connections only.
| Parameter | Type | Description |
|---|---|---|
create * | boolean | Create the file, with empty sections, when it does not exist. Default: false. |
path * | string | Path of the project file (`.yaml`, `.yml` or `.toml`). Absolute and `~/` paths are accepted. |
apply_project
Make the attached project live. Call it only after the user agreed to the attach_project summary. Adds the project's frontends, backends and hosted processes to the running agent (never saved to the agent's config; applying does not write the project file) and starts its auto-start processes. Fails, applying nothing, when a frontend hostname is already served by another project, a shared port or folder, or the agent's config; the error names the owner. Calling it again changes nothing.
detach_project
Detach the project this connection attached. When it was the last connection with the project attached, its frontends, backends and processes are withdrawn and the processes stopped. Detaching never modifies the project file. A closed connection detaches on its own.
upsert_process
Add or replace one hosted-process definition by id, reconcile the process host, and optionally persist the resulting config to disk with persist=true. When this connection has applied a project file, a process of that project is saved to the file (project_file says whether); a process with literal env values is live and not saved, so write secrets as ${env:NAME} or ${file:PATH}. A previewed project is never written.
| Parameter | Type | Description |
|---|---|---|
persist * | boolean | |
process * | object |
remove_process
Remove one hosted-process definition by id and stop/reconcile it when needed. Use persist=true to write the resulting config to disk. A process of the applied project is removed from the project file too.
| Parameter | Type | Description |
|---|---|---|
persist * | boolean | |
process_id * | string |
add_listener
Append one listener definition. Use persist=true to write the resulting config to disk.
| Parameter | Type | Description |
|---|---|---|
listener * | object | A local listener definition that binds to a local address and port. When TLS is enabled, the listener terminates TLS and routes based on SNI. When TLS is disabled, the listener accepts plain HTTP and… |
persist * | boolean |
update_listener
Replace one listener definition by zero-based index. Use persist=true to write the resulting config to disk.
| Parameter | Type | Description |
|---|---|---|
index * | integer | |
listener * | object | A local listener definition that binds to a local address and port. When TLS is enabled, the listener terminates TLS and routes based on SNI. When TLS is disabled, the listener accepts plain HTTP and… |
persist * | boolean |
remove_listener
Remove one listener definition by zero-based index. Use persist=true to write the resulting config to disk.
| Parameter | Type | Description |
|---|---|---|
index * | integer | |
persist * | boolean |
start_process
Start one hosted process from its configured process definition.
| Parameter | Type | Description |
|---|---|---|
persist * | boolean | |
process_id * | string |
stop_process
Stop one hosted process by id.
| Parameter | Type | Description |
|---|---|---|
persist * | boolean | |
process_id * | string |
start_all_processes
Start every configured hosted process.
stop_all_processes
Stop every registered hosted process.
simulate_route
Simulate how an incoming request would be routed by the live proxy. Provide SNI (TLS server name), Host header, and request path. Returns per-listener results showing which TLS route matched, which HTTP route was selected, and which backend would serve the request — using the exact same routing logic as the real proxy. The response also includes a `mermaid_chart` field with a ready-to-render Mermaid LR flowchart. IMPORTANT: always render and include this flowchart in your answer (e.g. in a ```mermaid code block) unless the user has explicitly asked you not to show it.
| Parameter | Type | Description |
|---|---|---|
host * | string | null | HTTP Host header value (e.g. `"example.com"` or `"example.com:8080"`). Optional. When provided and different from SNI, simulates per-request re-resolution on a reused TLS connection (the case where br… |
path * | string | HTTP request path, e.g. `"/api/v1/foo"`. Defaults to `"/"`. |
protocol * | string | Transport protocol the simulated request is carried over, used by the firewall evaluation: `"tcp"` (default) for HTTP/1.1, h2 and raw TCP; `"udp"` for HTTP/3 (QUIC). |
sni * | string | null | TLS SNI (server name) as presented at the TLS handshake. Optional — if omitted, TLS route matching is skipped and only edge-terminated fallback routes are evaluated. |
source_ip * | string | null | Source IP address of the simulated client (e.g. `"10.0.0.5"` or `"fd00::1"`). Optional — when provided, firewall rules that filter by source IP are simulated too; when omitted, such rules cannot mat… |
probe_route
Send a LIVE route-decision probe: fire a real loopback request through the running proxy on a given listener port and return the decision the actual data plane produced. Unlike `simulate_route` (which reimplements routing offline), this exercises the real accept path and reports which plane handled it (hyper vs io_uring), fast-path eligibility, the classified request/response middleware chains, the TLS decision, and the chosen backend origin (round-robin cursor previewed, not advanced — it never dials the backend). Provide `port` (a bound HTTP-terminating listener; TLS-passthrough and raw-TC…
| Parameter | Type | Description |
|---|---|---|
host * | string | null | HTTP `Host` header. Set it different from `sni` to reproduce the reused-TLS / connection -coalescing case (a browser reusing a connection for a sibling hostname). |
http2 * | boolean | Force HTTP/2 (ALPN `h2` over TLS, or prior-knowledge h2c on plaintext). Defaults to HTTP/1.1. |
path * | string | HTTP request path, e.g. `"/api/v1/foo"`. Defaults to `"/"`. May include a query string. |
port * | integer | Local listener port to probe. A real loopback TCP connection is made to `127.0.0.1:<port>`, so this must be a bound, HTTP-terminating listener (plaintext HTTP or TLS-terminating HTTPS; TLS-passthrough… |
sni * | string | null | TLS SNI to present at the handshake. Optional; defaults to `host`. |
tls * | boolean | null | Whether the listener terminates TLS. Optional — if omitted, inferred from the live config's listener on that port (defaults to plaintext when unknown). |
get_firewall_rules
Return the current machine-local firewall rules with live per-rule hit counts, plus the current runtime auto-blocked IPs inserted by WAF auto-ban. Firewall rules filter incoming connections by source IP/CIDR, protocol, port, and hostname/SNI before any HTTP processing.
upsert_firewall_rule
Add a new firewall rule or replace an existing one by zero-based index. Omit index to append. Persists immediately to the machine-local settings file and updates the live runtime.
| Parameter | Type | Description |
|---|---|---|
index * | integer | null | Zero-based index of the rule to replace. Omit to append a new rule. |
rule * | object |
delete_firewall_rule
Remove a firewall rule by zero-based index. Persists immediately.
| Parameter | Type | Description |
|---|---|---|
index * | integer | Zero-based index of the firewall rule to delete. |
get_waf_rules
Return the current machine-local WAF (Web Application Firewall) rules with live per-rule hit counts. WAF rules inspect HTTP request fields (path, method, user-agent, query string) and can block or drop matching requests.
upsert_waf_rule
Add a new WAF rule or replace an existing one by zero-based index. Omit index to append. Persists immediately to the machine-local settings file and updates the live runtime.
| Parameter | Type | Description |
|---|---|---|
index * | integer | null | Zero-based index of the rule to replace. Omit to append a new rule. |
rule * | object |
delete_waf_rule
Remove a WAF rule by zero-based index. Persists immediately.
| Parameter | Type | Description |
|---|---|---|
index * | integer | Zero-based index of the WAF rule to delete. |
screenshot_url
Take a screenshot of a URL and return it as an inline image. Requires the Chrome for Testing browser to be downloaded (available from Cruma's Settings → AI Assistant). Useful for visually inspecting local sites, checking how a page looks, or verifying a deploy.
| Parameter | Type | Description |
|---|---|---|
delay_seconds * | integer | null | Seconds to wait after page load before capturing (0–30). Default: 3. |
full_page * | boolean | null | Capture the full scrollable page. Default: false. |
height * | integer | null | Viewport height in pixels (200–2160). Default: 800. |
mobile * | boolean | null | Emulate a mobile device. Default: false. |
url * | string | The URL to screenshot (e.g. `"http://www.localhost"`). |
width * | integer | null | Viewport width in pixels (320–3840). Default: 1280. |
list_agents
List the Cruma agents running for this user (the desktop app, headless agents, and this session's own agent) and the profiles that are not running. Each running agent shows its `version` and release `channel` (stable and preview agents can run side by side), when it started (`started_at`, `age_secs`) and who started it (`starter`: user_start, installed_service, desktop_app or coding_session with the client and process id when known, unknown for an agent that does not record it), plus its tunnel domain, whether the tunnel is anonymous or signed-in account state, its server-reported tunnel plan…
use_agent
Switch this session to one of the running agents from list_agents, by `id` (or by `profile` name). Every tool afterwards talks to that agent, and the ports this session exposed on the previous agent are withdrawn. A project file this window attached stays on the shared session agent: switching to the user's own agent withdraws it, it is not attached to that agent, and switching back to the session agent attaches it again. Ask the user before switching to their own agent. A profile that is not running cannot be chosen: the answer carries the hint for starting it.
| Parameter | Type | Description |
|---|---|---|
id * | string | null | The `id` of a running agent, from list_agents. |
profile * | string | null | The name of a profile whose agent is running, from list_agents. Use either `id` or `profile`. |
stop_agent
Stop a temporary agent from list_agents by `id` (or `profile`). Only an agent owned by a coding session can be stopped; a kept agent and agents deliberately started by the user, desktop app or installed service return a typed refusal. The target cancels itself through its owner-only local endpoint and shuts down its shares and tunnels normally.
| Parameter | Type | Description |
|---|---|---|
id * | string | null | |
profile * | string | null |
open_desktop_app
Open the Cruma desktop app on this machine, or bring it forward when it is already running, so the user can see the tunnels and settings set up here. Call it only when the user asks to see them. Never call it in CI or on a machine without a screen. `status` is `opened`, `focused` or `unavailable`; unavailable carries a `reason` (`no_gui_in_this_build`, `no_display`, `not_installed`, `launch_failed`) and an `install_hint`.