@zevruna/client
v0.1.2
Published
MCP handshake client that captures a server's advertised contract — schemas only, never a tool call.
Maintainers
Readme
@zevruna/client
MCP handshake client that captures a server's advertised contract.
Used by the zevruna CLI and by Zevruna's pollers.
Connects over streamable HTTP with an SSE fallback, and returns a snapshot ready for
@zevruna/diff.
Install
npm i @zevruna/clientUsage
import { takeSnapshot } from "@zevruna/client";
const snapshot = await takeSnapshot("https://mcp.example.com/mcp");
// { server, takenAt, protocolVersion, tools, resources, prompts }Second argument is optional: { headers, timeoutMs }, headers for an authenticated server.
Local stdio servers are snapshotted by running them:
import { takeStdioSnapshot } from "@zevruna/client/stdio";
const snapshot = await takeStdioSnapshot("npx", ["-y", "some-mcp-server"]);Schemas only
takeSnapshot performs initialize, tools/list, resources/list and prompts/list. It
never calls a tool, so no arguments, payloads or PII are ever read. A server that advertises
none of the three is an error; missing any one of them is not.
Hard caps guard against a hostile or broken server, 15s connect, 15s per list, 2000 tools, and
are exported as LIMITS.
License
MIT
