Skip to content
Warrantv0.1

Install

The SDK, the CLI and the MCP server.

One package gives you all three: a typed client, a warrant command, and an MCP server.

npm install @gowarrant/sdk

The SDK

import { Warrant, usdc } from "@gowarrant/sdk";

const warrant = new Warrant();   // reads WARRANT_API_KEY

Set the key in the environment. Nothing else needs configuring.

export WARRANT_API_KEY=wr_test_8f0c1b4e2b1a4d599d0e3a2f7c1b9e44

usdc("8.40") produces the Amount type that open() requires — passing 8.40 does not compile. See the TypeScript SDK.

The CLI

No install needed:

npx gowarrant doctor
npx gowarrant try

doctor checks the key reaches the API. try runs one warrant through its whole lifecycle in sandbox. See the CLI.

The MCP server

npx gowarrant init

Detects the client from what is on disk, writes its config and prints the install line. For Claude Code directly:

claude mcp add --scope project warrant -- npx -y @gowarrant/mcp@latest

Five tools: open, verify, status, list, test_spec. No settle tool — see the MCP server for why.

Requirements

Node 22 or later. The SDK is ESM-only.

Verify it works

npx gowarrant doctor

Non-zero exit on failure, so it works in a CI step. If it fails, the problem is the key, the network or the environment — in that order of likelihood.

Amounts, immediately

Before your first call, the one convention that catches everybody:

"8400000"    8.40 USDC
8400000      rejected — a JSON number
"8.40"       rejected — not the smallest unit

Amounts cross the wire as integer strings of the asset's smallest unit, validated against ^[0-9]+$. The SDK's usdc() and the MCP tool schema both take the decimal form and convert it for you; calling the API directly means doing it yourself.