Skip to content

Quickstart

From signup to your first query in under five minutes. Pick the surface that fits your workflow — each section walks through getting a token, connecting, and running your first query. Token mint and install differ by surface (MCP uses OAuth in most clients; SDK and CLI install from the public npm registry — no token required).

  • Connect via MCP — fastest path if you already use Claude Code, Cursor, or another MCP-compatible client. OAuth in most clients, no token mint required.
  • Connect via SDK — TypeScript apps, custom agents, programmatic access.
  • Connect via CLI — terminal-first exploration and scripts.

The first query section at the bottom shows how each surface reads from the public warmhub-data/congress-trading repo. MCP returns a natural-language summary; SDK and CLI fetch the raw records so your code or terminal can read them directly.

Prerequisites: A WarmHub account. See Getting Access if you don’t have one.

Connect any MCP-compatible client — Claude Code, Cursor, VS Code Copilot Chat, or anything else that speaks HTTP MCP.

WarmHub MCP supports two auth modes:

  • OAuth (default in Claude Code and Cursor) — no setup, the client handles login on first use.
  • Personal access token (PAT) — required on WSL2 or in headless environments.

To create a PAT, install the wh CLI, log in, and run:

Terminal window
wh token create --name my-agent

The token is printed once. Copy it now if you’re using PAT auth.

Pick your client and drop the WarmHub server into its MCP config. The examples below use the global endpoint (/mcp); for a single-repo agent, swap in /mcp/<org>/<repo> instead — see Global vs Repo-Scoped.

Terminal window
claude mcp add --scope user --transport http warmhub https://api.warmhub.ai/mcp

That registers WarmHub user-wide. Drop --scope user to register it for the current project only. Or commit a .mcp.json in the project root for teammates:

{
"mcpServers": {
"warmhub": {
"transport": "http",
"url": "https://api.warmhub.ai/mcp"
}
}
}

Claude Code handles OAuth automatically on first call. For PAT auth, use the mcp-remote bridge config.

Add to ~/.cursor/mcp.json (user-wide) or .cursor/mcp.json (project-scoped):

{
"mcpServers": {
"warmhub": {
"transport": "http",
"url": "https://api.warmhub.ai/mcp"
}
}
}

Restart Cursor after editing. Cursor handles OAuth on first call.

Add to .vscode/mcp.json in your workspace:

{
"servers": {
"warmhub": {
"type": "http",
"url": "https://api.warmhub.ai/mcp"
}
}
}

VS Code prompts for auth on first call. See VS Code’s MCP docs for the latest schema.

Any MCP client that supports HTTP transport works. Point it at https://api.warmhub.ai/mcp (global) or https://api.warmhub.ai/mcp/<org>/<repo> (repo-scoped). For PAT auth in clients that don’t support OAuth, use the mcp-remote stdio bridge.

Skip down to Your first query for the prompt to try.

Build TypeScript apps and agents with @warmhub/sdk-ts.

You’ll need the WarmHub CLI to mint a personal access token. Log in and create one:

Terminal window
wh auth login
wh token create --name my-script

Save the printed token — it’s shown only once. Export it:

Terminal window
export WH_TOKEN=eyJhbGciOi...

See Personal Access Tokens for scopes and rotation.

The SDK is published to the public npm registry. No registry config or extra token required:

Terminal window
npm install @warmhub/sdk-ts

Create a client:

import { WarmHubClient } from "@warmhub/sdk-ts";
const client = new WarmHubClient({
auth: { getToken: async () => process.env.WH_TOKEN },
});

Skip down to Your first query for the call to make.

Use the wh CLI for terminal exploration and scripting.

Install the CLI and log in. The CLI saves your credentials and auto-refreshes them.

The CLI is published to the public npm registry and requires Node 22+. No registry config or extra token required:

Terminal window
npm install -g @warmhub/cli
wh --version
Terminal window
wh auth login
wh auth status

wh auth login opens your browser — sign in with email, Google, or GitHub. For CI/CD or headless environments, see Getting Access for non-interactive options.

Most wh commands operate on a specific org/repo. Set it once with wh use so you don’t need --repo on every command:

Terminal window
wh use warmhub-data/congress-trading

This writes a .wh file in the current directory. You can also specify a repo per-command with --repo, or set the WARMHUB_REPO environment variable. Priority: --repo flag > WARMHUB_REPO env > .wh file.

Skip down to Your first query for the command to run.

We’ll use the public warmhub-data/congress-trading repo — it has StockTrade things tracking U.S. congressional stock trades disclosed under the STOCK Act. Let’s pull a sample of disclosures.

In your client, ask:

Look at the warmhub-data/congress-trading data on WarmHub. Show me a sample of congressional stock trade disclosures.

The agent will call warmhub_repo_describe to learn the StockTrade shape, then warmhub_thing_query to fetch StockTrade items and summarize the disclosures.

const trades = await client.thing.head("warmhub-data", "congress-trading", {
shape: "StockTrade",
kind: "thing",
limit: 10,
});
console.log(trades.items);

Each StockTrade carries legislator_name, ticker, amount (a disclosure tier like "$50,001 - $100,000"), and tx_type (purchase/sale). See Queries for filter patterns.

To watch new trades land in real time, wrap the same query with client.live.thingHead:

const handle = await client.live.thingHead(
"warmhub-data",
"congress-trading",
{ shape: "StockTrade", kind: "thing", limit: 20 },
(snapshot) => console.log(`${snapshot.items.length} trades at HEAD`),
);
// later, to stop the stream:
handle.close();

See client.live for raw event streaming and other refreshed-query helpers.

Terminal window
wh thing list --shape StockTrade --kind thing --limit 10 --repo warmhub-data/congress-trading

Copy any StockTrade/... reference from the output and view the full record. For example:

Terminal window
wh thing view StockTrade/2024/20025368/1 --repo warmhub-data/congress-trading

Add --json for machine-readable output, or --live to watch for real-time changes.

The warmhub-data org hosts several public repos:

  • warmhub-data/congress-trading — congressional stock trade disclosures filed under the STOCK Act, linked to legislator and security records in the companion repos below.
  • warmhub-data/congress-committees — committees and member assignments.
  • warmhub-data/congress-members — current and historical members of Congress.
  • warmhub-data/sec-equities — NYSE and Nasdaq listings.
  • Core Concepts — the mental model behind orgs, repos, shapes, things, assertions, and writes.
  • Data Modeling — wrefs, shapes, things, and assertions in detail.
  • MCP Tool Walkthrough — full tool sequence (warmhub_capabilitieswarmhub_repo_describe → reads → writes).
  • MCP Server — endpoints, OAuth, and protocol details.
  • SDK Overview — client options, surfaces, and error kinds.
  • CLI Reference — full command reference for all wh commands.