Skip to content

SDK

Package names remain @sai-labs/vap and @sai-labs/vap-mcp. Wire hashes still use the VAP/0.1/ domain prefix. See from v0.1.

MCP is a transport. MCP authorization authenticates a client to a server. It does not approve a transaction. An MCP-built payload gets the same verification as WalletConnect.

npm @sai-labs/vap · GitHub

npm @sai-labs/vap-mcp · GitHub

Installation

Terminal window
npm install @sai-labs/vap

protect() (in development)

Not exported by @sai-labs/vap@0.1.0.

const result = await vap.protect({
chainId: 1,
intent,
transaction,
});
if (result.verdict === "BLOCKED") {
return;
}
await wallet.signTransaction(transaction);

Target result shape:

{
verdict: "PROTECTED" | "WARNING" | "BLOCKED";
effects: NormalizedEffects;
checks: Record<string, "PASS" | "FAIL" | "UNAVAILABLE">;
warnings: string[];
reasonCodes: string[];
}

Available: v0.1 runtime

import { VapRuntime } from "@sai-labs/vap";
const vap = new VapRuntime();
vap.registerMandate(mandate);
vap.authorizeIntent(intent, mandate.mandateId);
const prepared = vap.prepareAction(intent.intentId);
vap.submitProposal({ intentId: intent.intentId, prepared, executorId, expiresAt });
vap.submitAttestation({ intentId: intent.intentId, role: "semantic-verifier" });
vap.submitAttestation({ intentId: intent.intentId, role: "safety-verifier" });
const done = vap.executeApproved(intent.intentId);

The agent scope does not mint intents and does not hold execution credentials. UNSUPPORTED_CAPABILITY if the adapter cannot bind an exact payload.

MCP tools (v0.1)

ToolCaller
vap.get_capabilitiesAuthenticated client
vap.prepare_action / vap.submit_proposalAgent
vap.get_status / vap.get_receiptTenant client
vap.submit_attestationVerifier
vap.execute_approvedExecutor; gate still runs

Default VAP_SCOPE=agent. HTTP: https://vap-api.saiwallet.ai.