Skip to content
Skip to content
HCP
Quickstart

Quickstart

Pick the path that matches what you are building (a pack, a runtime, or a host integration) and get to a working exec in minutes.

HCP has three kinds of participants. Each has its own ten-minute path.

Prerequisites

All three paths use the hcp CLI, which is itself the first pack. From the SDK repository:

git clone https://github.com/harnesscontextprotocol/hcp
cd hcp && bun install
alias hcp='bun ./packages/cli/src/hcp.ts'
hcp doctor --json

The first run creates $HCP_HOME (default ~/.hcp) and installs the hcp-cli bootstrap pack, so there is always a working pack to exec against.

{ "ok": true, "cli": "hcp", "protocol": "hcp", "version": 1, "sandbox": true, "installed": ["hcp-cli"] }

Set HCP_HOME to relocate the store. This is useful in CI, or to keep a project store separate from your personal one.

Two gold packs

Every quickstart uses the same two sample packs from examples/packs/. Copy the one closest to what you are building.

PackClassWhat it proves
transitPublic readFive closed read commands, no login, no secrets
ledgerGated writeInstaller family, connect, one read, and a transfer that fails closed without --confirm

Both are wrap packs over tiny demo binaries in examples/bins/. They are the fixtures for the conformance suite, so what they do is what the protocol promises.

What "done" looks like

Whichever path you take, you are finished when this proof script passes:

lint                                  → no issues
one Execute read                      → { ok: true, result: … }
one gated write without confirm       → { ok: false, error: "confirm required" }
the same write with confirm (mock)    → { ok: true }
availability                          → installed · activated · connected · executable

That script is how a pack demonstrates conformance. See Testing.