Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.channel-tui.mcp

TUI MCP server manager — inventory, add, edit, kill/start, enable/disable, remove, and the browser sign-in leg for HTTP servers.

NOTHING about MCP lives in this process. The GATEWAY owns the configuration, the connection pool, the child processes and the OAuth tokens; this namespace only renders that inventory and posts verbs to /v1/mcp/servers and /v1/mcp/servers/:name/{actions,auth}/…. So a TUI attached to a REMOTE gateway adds, edits and authorizes servers exactly like the phone app does, and the terminal never holds a token, a PKCE verifier, or a child process.

server-status, tokenize-command, parse-kv, row->form, form->spec and spec-problem are pure so the row text and the wire spec are unit-testable without a screen; the verbs themselves, and the transient band that offers them, are pure in mcp-model.

TUI MCP server manager — inventory, add, edit, kill/start, enable/disable,
remove, and the browser sign-in leg for HTTP servers.

NOTHING about MCP lives in this process. The GATEWAY owns the configuration,
the connection pool, the child processes and the OAuth tokens; this namespace
only renders that inventory and posts verbs to `/v1/mcp/servers` and
`/v1/mcp/servers/:name/{actions,auth}/…`. So a TUI attached to a REMOTE
gateway adds, edits and authorizes servers exactly like the phone app does,
and the terminal never holds a token, a PKCE verifier, or a child process.

`server-status`, `tokenize-command`, `parse-kv`, `row->form`, `form->spec`
and `spec-problem` are pure so the row text and the wire spec are
unit-testable without a screen; the verbs themselves, and the transient band
that offers them, are pure in `mcp-model`.
raw docstring

flagclj

source

form->specclj

(form->spec {:keys [transport command-line cwd url env headers timeout-ms
                    is-enabled]})

The wire spec for the gateway's save and test verbs. Only the keys the chosen transport owns are sent and blank optionals are dropped, so an edit that leaves the header field empty preserves the secret the daemon holds.

The wire spec for the gateway's save and test verbs. Only the keys the chosen
transport owns are sent and blank optionals are dropped, so an edit that
leaves the header field empty preserves the secret the daemon holds.
sourceraw docstring

kv->textclj

(kv->text m)

Inverse of parse-kv for prefilling the single-line field.

Inverse of `parse-kv` for prefilling the single-line field.
sourceraw docstring

parse-kvclj

(parse-kv text)

KEY=value entries → a string-keyed map. Entries are separated by newlines or commas, blanks are dropped, and the FIRST = splits so a value may itself contain one. Returns nil when nothing usable was typed — that is how a blank field means "leave whatever the gateway already stores", which keeps a redacted secret alive across an edit.

`KEY=value` entries → a string-keyed map. Entries are separated by newlines or
commas, blanks are dropped, and the FIRST `=` splits so a value may itself
contain one. Returns nil when nothing usable was typed — that is how a blank
field means "leave whatever the gateway already stores", which keeps a
redacted secret alive across an edit.
sourceraw docstring

row->formclj

(row->form row)

Prefill for the form. nil is an add. Values the gateway redacted come back blank on purpose: saving a blank field keeps the stored one.

Prefill for the form. `nil` is an add. Values the gateway redacted come back
blank on purpose: saving a blank field keeps the stored one.
sourceraw docstring

run-action!clj

(run-action! screen row action)

Execute one palette verb against one server. Every gateway rejection (409 for a hand-written server, 404 for an unknown one) surfaces as a dialog instead of a crashed TUI.

Execute one palette verb against one server. Every gateway rejection (409 for
a hand-written server, 404 for an unknown one) surfaces as a dialog instead of
a crashed TUI.
sourceraw docstring

save-server!clj

(save-server! screen row)

Add or edit ONE gateway-managed server. The candidate is dialed BY THE GATEWAY before anything is persisted, so a wrong command or an unreachable URL is reported while it is still just a form. Nothing is written on this machine — the daemon owns the configuration, which is why this works unchanged against a remote gateway.

Add or edit ONE gateway-managed server. The candidate is dialed BY THE GATEWAY
before anything is persisted, so a wrong command or an unreachable URL is
reported while it is still just a form. Nothing is written on this machine —
the daemon owns the configuration, which is why this works unchanged against
a remote gateway.
sourceraw docstring

server-detailsclj

(server-details row)

Read-only detail lines for one row.

Read-only detail lines for one row.
sourceraw docstring

server-statusclj

source

spec-problemclj

(spec-problem server spec)

What must hold before the gateway is called at all, so a typo comes back as a sentence here instead of a 400 from the daemon.

What must hold before the gateway is called at all, so a typo comes back as a
sentence here instead of a 400 from the daemon.
sourceraw docstring

tokenize-commandclj

(tokenize-command line)

Split a typed command line into argv, honoring single and double quotes so a path or a flag value containing a space survives as ONE argument.

Split a typed command line into argv, honoring single and double quotes so a
path or a flag value containing a space survives as ONE argument.
sourceraw docstring

tool-countclj

(tool-count verdict)

The test verb reports tools either as a count or as the tool list itself.

The test verb reports tools either as a count or as the tool list itself.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close