Package Exports
- @witnessed/mcp
Readme
@witnessed/mcp
MCP building blocks for Receipts. Construct an MCP server that
exposes issue_receipt / verify_receipt tools backed by the Receipts SDK (signing happens
locally with the agent's own key).
npm i @witnessed/mcpimport { createMcpServer, makeHandlers } from "@witnessed/mcp";
import { ReceiptsClient } from "@witnessed/sdk";
const client = new ReceiptsClient({
baseUrl: "https://witness.medtekki.no",
privateJwk: ReceiptsClient.generateKey().privateJwk,
});
const trustedWitnessKeys = await fetch("https://witness.medtekki.no/public-key")
.then((r) => r.json())
.then((pk) => ({ [pk.key_id]: pk.public_key }));
const server = createMcpServer({ client, trustedWitnessKeys }); // connect over your transportThe hosted witness also exposes a remote MCP endpoint at
https://witness.medtekki.no/mcp(verify/get only — issuance needs client-side signing, so issue with the SDK locally).
MIT licensed.