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, server-rows, server-actions, tokenize-command, parse-kv, row->form, form->spec and spec-problem are pure so the row text, the offered verbs and the wire spec are unit-testable without a screen.

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`, `server-rows`, `server-actions`, `tokenize-command`,
`parse-kv`, `row->form`, `form->spec` and `spec-problem` are pure so the row
text, the offered verbs and the wire spec are unit-testable without a
screen.
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

server-actionsclj

(server-actions row)

The verbs offered for one row, in the order they matter.

Kill/start are RUNTIME and always available (they work on hand-written servers too); enable/disable/remove persist and therefore only appear for gateway-managed ones; the OAuth verbs only for HTTP servers.

The verbs offered for one row, in the order they matter.

Kill/start are RUNTIME and always available (they work on hand-written
servers too); enable/disable/remove persist and therefore only appear for
gateway-managed ones; the OAuth verbs only for HTTP servers.
sourceraw docstring

server-detailsclj

(server-details row)

Read-only detail lines for one row.

Read-only detail lines for one row.
sourceraw docstring

server-rowsclj

(server-rows servers)

Selection rows for the inventory, names column-aligned so the status reads down the list.

Selection rows for the inventory, names column-aligned so the status reads
down the list.
sourceraw docstring

server-statusclj

source

show-mcp-dialog!clj

(show-mcp-dialog! screen)

Open the MCP manager. Loops on the LIVE gateway inventory so every verb's effect — an add, an edit, a kill, a sign-in, a removal — is visible on the next pass. Returns nil when the user closes it.

Open the MCP manager. Loops on the LIVE gateway inventory so every verb's
effect — an add, an edit, a kill, a sign-in, a removal — is visible on the
next pass. Returns nil when the user closes it.
sourceraw docstring

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