Built-in Model Context Protocol (MCP) surface. The gateway daemon owns ONE
shared pool of MCP connections ({server {:conn spec}}); every session sees
the same live tools. Always on: MCP is core infrastructure, not a droppable
plug-in and not gated by any toggle. The pool is empty (and costs nothing)
until at least one server is declared in config.
Servers are declared natively in ~/.vis/state.yml:
{:mcp {:servers {"filesystem" {:transport :stdio :command "npx" :args ["-y" "@modelcontextprotocol/server-filesystem" "/path"]} "remote" {:transport :http :url "https://..." :headers {"Authorization" "Bearer ${MY_TOKEN}"} :timeout_ms 60000 :listen true :auth {:client_id "..." :scope "..."}} "stale" {:enabled false :url "..."}}}}
Every string in :headers / :env / :args / :url / :command / :cwd
supports ${ENV_VAR} interpolation from the host environment. :enabled false skips the server without deleting the entry. HTTP servers with no
static bearer transparently negotiate OAuth 2.1 on first 401 (RFC 9728
discovery + RFC 7591 dynamic client registration + PKCE loopback).
Five model-facing verbs under alias mcp (flat sandbox renders alias_name):
mcp__servers() — configured servers + status + tool counts
mcp__tools(server) — a server's tools (auto-connects)
mcp__call(server, tool, args) — call a tool (auto-connects)
mcp__connect(server) / mcp__disconnect(server) — manage the connection
Live connections + tool counts also ride in ctx under env.mcp.
Built-in Model Context Protocol (MCP) surface. The gateway daemon owns ONE
shared pool of MCP connections (`{server {:conn spec}}`); every session sees
the same live tools. Always on: MCP is core infrastructure, not a droppable
plug-in and not gated by any toggle. The pool is empty (and costs nothing)
until at least one server is declared in config.
Servers are declared natively in `~/.vis/state.yml`:
{:mcp {:servers {"filesystem" {:transport :stdio :command "npx"
:args ["-y" "@modelcontextprotocol/server-filesystem" "/path"]}
"remote" {:transport :http :url "https://..."
:headers {"Authorization" "Bearer ${MY_TOKEN}"}
:timeout_ms 60000
:listen true
:auth {:client_id "..." :scope "..."}}
"stale" {:enabled false :url "..."}}}}
Every string in `:headers` / `:env` / `:args` / `:url` / `:command` / `:cwd`
supports `${ENV_VAR}` interpolation from the host environment. `:enabled
false` skips the server without deleting the entry. HTTP servers with no
static bearer transparently negotiate OAuth 2.1 on first 401 (RFC 9728
discovery + RFC 7591 dynamic client registration + PKCE loopback).
Five model-facing verbs under alias `mcp` (flat sandbox renders `alias_name`):
mcp__servers() — configured servers + status + tool counts
mcp__tools(server) — a server's tools (auto-connects)
mcp__call(server, tool, args) — call a tool (auto-connects)
mcp__connect(server) / mcp__disconnect(server) — manage the connection
Live connections + tool counts also ride in ctx under `env.mcp`.(mcp-call server tool)(mcp-call server tool args)Call a tool on an MCP server. mcp__call(server, tool, args) connects if needed and invokes tool with args (a dict matching that tool's input_schema; omit or {} for no args). Returns {"server": S, "tool": S, "content": [<MCP content blocks>], "is_error": bool}. Read text blocks via content[i]["text"].
Call a tool on an MCP server. mcp__call(server, tool, args) connects if needed and invokes `tool` with `args` (a dict matching that tool's input_schema; omit or {} for no args). Returns {"server": S, "tool": S, "content": [<MCP content blocks>], "is_error": bool}. Read text blocks via content[i]["text"].
(mcp-connect server)Explicitly connect a configured MCP server into the daemon-wide pool (usually unnecessary because mcp__tools/mcp__call auto-connect, and every /reload reconciles the pool from config). Returns {"server": S, "connected": bool, "tools": N}.
Explicitly connect a configured MCP server into the daemon-wide pool (usually unnecessary because mcp__tools/mcp__call auto-connect, and every /reload reconciles the pool from config). Returns {"server": S, "connected": bool, "tools": N}.
(mcp-disconnect server)Disconnect an MCP server from the daemon-wide pool: closes the connection and, for stdio, terminates the child process. Returns {"server": S, "result": "disconnected"|"not_connected"}. On the next /reload (or when config still lists the server) the pool reconciles and may reconnect.
Disconnect an MCP server from the daemon-wide pool: closes the connection and, for stdio, terminates the child process. Returns {"server": S, "result": "disconnected"|"not_connected"}. On the next /reload (or when config still lists the server) the pool reconciles and may reconnect.
(mcp-servers)List the Model Context Protocol servers declared in ~/.vis/state.yml (:mcp :servers) with their connection status. Returns {"servers": [{"name": S, "transport": "stdio"|"http", "connected": bool, "enabled": bool, "tools": N (when connected), "command"/"url": S}]}. Connecting happens lazily on mcp__tools/mcp__call, or explicitly via mcp__connect.
List the Model Context Protocol servers declared in ~/.vis/state.yml (:mcp :servers) with their connection status. Returns {"servers": [{"name": S, "transport": "stdio"|"http", "connected": bool, "enabled": bool, "tools": N (when connected), "command"/"url": S}]}. Connecting happens lazily on mcp__tools/mcp__call, or explicitly via mcp__connect.
(mcp-tools server)List a server's tools. mcp__tools(server) connects to the configured server if needed, then returns {"server": S, "tools": [{"name": S, "description": S, "input_schema": <JSON schema dict>}]}. Use the input_schema to shape the args for mcp__call.
List a server's tools. mcp__tools(server) connects to the configured server if needed, then returns {"server": S, "tools": [{"name": S, "description": S, "input_schema": <JSON schema dict>}]}. Use the input_schema to shape the args for mcp__call.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |