SDK docs · sdk/mcp

MCP server

@mintid/verifier-mcp: the three frozen contract operations as Model Context Protocol tools over stdio — transport-only, zero external runtime dependencies, inside your own perimeter.

Quickstart

@mintid/verifier-mcp is an MCP server you run inside your own perimeter, next to the verifier service you already self-deploy. Register it as a stdio MCP server in your agent runtime and the three contract operations appear as tools any MCP-capable framework can list and call.

Like @mintid/verifier-client — its only dependency, and its transport — it is transport-only: no cryptography, no chain access, no nonce store, no policy, and zero external runtime dependencies (the JSON-RPC framing is a few dozen auditable lines, not a framework). Nonce, session id and the ten-second expiry are generated by the verifying core; no tool argument can mention them.

The three tools

One tool per operation of the frozen contract v1 — no aggregate helpers, no convenience wrappers that could reorder a flow:

ToolContract operation
mintid_build_infoGET /v1/build-info
mintid_create_challengePOST /v1/challenges
mintid_validate_presentationPOST /v1/presentations

The contract is untouched by this package: same request and response shapes, same closed reason-code vocabulary, same decisions as every other client in every other language.

Error semantics (the part that survives the protocol hop)

A rejection is a successful tool result. A presentation that fails — replayed nonce, stale status root, missing predicate — comes back as { accepted: false, reason_code }, so the calling agent can reason about why instead of retrying blindly.

Only transport failures are tool errors: a body the service cannot parse, proven chain state unavailable (fail-closed — retry later, never bypass), or the service unreachable. Branch on data, not on exceptions.

Trust boundary

This server is part of your verifier deployment. Run it inside your perimeter, pointed exclusively at your own service instance. Pointing it at anyone else’s service would delegate the decision itself — which the protocol’s paid-verification permission (R26) explicitly does not cover.

The server persists nothing and logs nothing; your service keeps the only decision record (R18). Node ≥ 20, same as the TypeScript client.