Liking cljdoc? Tell your friends :D

com.blockether.vis.ext.foundation-mcp.client

Minimal Model Context Protocol (MCP) client. Speaks JSON-RPC 2.0 over two transports:

:stdio — spawn the server process and frame newline-delimited JSON-RPC on its stdin/stdout (the dominant local-server pattern). :http — Streamable HTTP: POST each JSON-RPC message to one endpoint; the reply is either application/json (one response) or text/event-stream (SSE) — both handled. The Mcp-Session-Id handed back by initialize rides on every later request.

A conn is a plain map of closures + state; the extension treats it opaquely. Lifecycle: connect (which performs the initialize handshake) → list-tools / call-toolclose.

Minimal Model Context Protocol (MCP) client. Speaks JSON-RPC 2.0 over two
transports:

  :stdio  — spawn the server process and frame newline-delimited JSON-RPC on
            its stdin/stdout (the dominant local-server pattern).
  :http   — Streamable HTTP: POST each JSON-RPC message to one endpoint; the
            reply is either `application/json` (one response) or
            `text/event-stream` (SSE) — both handled. The `Mcp-Session-Id`
            handed back by `initialize` rides on every later request.

A `conn` is a plain map of closures + state; the extension treats it
opaquely. Lifecycle: `connect` (which performs the `initialize` handshake) →
`list-tools` / `call-tool` → `close`.
raw docstring

com.blockether.vis.ext.foundation-mcp.core

mcp/ extension — connect to Model Context Protocol servers and expose their tools to the agent, with each live connection registered as a session RESOURCE (footer count, F4 dialog, resource_stop).

DROPPABLE classpath plug-in. Gated behind the user-owned :mcp/enabled toggle (ON by default — connects automatically when MCP servers are configured; can still be turned off to short-circuit every verb).

Servers are declared natively in ~/.vis/config.edn:

{:mcp {:servers {"filesystem" {:transport :stdio :command "npx" :args ["-y" "@modelcontextprotocol/server-filesystem" "/path"]} "remote" {:transport :http :url "https://..." :headers {"Authorization" "Bearer ..."}}}}}

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/` extension — connect to Model Context Protocol servers and expose their
tools to the agent, with each live connection registered as a session
RESOURCE (footer count, F4 dialog, `resource_stop`).

DROPPABLE classpath plug-in. Gated behind the user-owned `:mcp/enabled`
toggle (ON by default — connects automatically when MCP servers are
configured; can still be turned off to short-circuit every verb).

Servers are declared natively in `~/.vis/config.edn`:

  {:mcp {:servers {"filesystem" {:transport :stdio :command "npx"
                                   :args ["-y" "@modelcontextprotocol/server-filesystem" "/path"]}
                   "remote"     {:transport :http :url "https://..."
                                   :headers {"Authorization" "Bearer ..."}}}}}

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`.
raw 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