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.
Build a pack
You have a CLI or an API and want agents, humans, and UIs to run it as one governed command.
Implement a runtime
You are building the thing that loads packs, enforces grants, and executes, with the SDK or from scratch.
Adopt in a host
You ship an agent product and want native pack intake with the same ease as adding an MCP server.
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 --jsonThe 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.
| Pack | Class | What it proves |
|---|---|---|
transit | Public read | Five closed read commands, no login, no secrets |
ledger | Gated write | Installer 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 · executableThat script is how a pack demonstrates conformance. See Testing.