@useveto/node) lets you add runtime authorization to any Node.js application or MCP server.
Requirements
- Node.js 18 or later (the SDK uses the native
fetchAPI built into Node.js 18+) - A Veto API key — get one from the Veto dashboard
Install the package
Import the SDK
Exported names
The SDK exports the following from@useveto/node:
Classes and functions
VetoClient— the main client for all Veto API operationscreateVetoGuard— higher-order wrapper for MCP tool handlers (recommended)vetoMiddleware— manual guard function for MCP tool handlersVetoError— base error classUnauthorizedError— thrown on invalid or expired API keysRateLimitError— thrown when rate limits are exceeded
VetoClientOptions,CreateAgentInput,CreatePolicyInput,UpdatePolicyInput,AuditLogFiltersVetoMcpOptions,McpToolResponseAgent,Policy,PolicyRule,AuthorizationRequest,AuthorizationResult,AuditLogEntryParameterConstraint,RateLimitConfig,TimeWindowConfigAgentStatus,AuthorizationOutcome,ApiKey,ErrorCode
ErrorCodes,DefaultRateLimits,Defaults
Next steps
VetoClient
Learn how to initialize the client and call every method.
MCP Integration
Add authorization to your Model Context Protocol server.