Install Hadron with the install script¶
The install script wires Hadron into a project for any
MCP-aware coding agent that reads a
project-local .mcp.json (Claude Code, and any other host that follows
that convention). It also installs the Hadron
Spec Kit extension if your
project uses Spec Kit.
It is the simplest path for coding-agent setups. For other MCP hosts (Cursor, Cline, Codex CLI, GitHub Copilot, Claude Desktop, Windsurf, Antigravity), use the portal-driven flow in Connecting an MCP host instead.
What it does¶
The script drops these files in your project root:
| File | Purpose |
|---|---|
.mcp.json |
Tells the coding agent how to reach Hadron's MCP server over HTTP with a Bearer app key. |
.hadron/config.json |
Stores the app key + server URL for any tool that reads it. 0600 mode. |
.gitignore |
Adds .hadron/ and .mcp.json so app keys never reach the repo. |
.specify/extensions/hadron/ |
The Hadron Spec Kit extension (only if Spec Kit is detected or installed). |
It does not edit .specify/extensions.yml — Spec Kit hook bindings
are yours to choose, and the script prints a recommended block for you
to paste manually.
Prerequisites¶
- A Hadron account at hadronmemory.com
- An app key (
hdr_app_…) — create one at Account → API keys in the portal. Copy it before leaving the page; the portal only shows it once. bashandcurlon your$PATH.- Optional: the Spec Kit
specifyCLI if you want the script to initialise Spec Kit alongside the extension. See the Spec Kit install instructions.
Install¶
From the root of the project you want Hadron in:
The script is interactive. You'll be asked:
- App key — paste it when prompted (unless
HADRON_APP_KEYis set in the environment). - Spec Kit — if
.specify/is missing, whether to runspecify init --here --ai claude. - Hadron Spec Kit extension — if
.specify/is present (or you accepted Spec Kit init), whether to install the extension. .mcp.jsoncollision — if you already have a.mcp.json, the script offers to back it up and replace; otherwise it leaves it untouched and prints the block to merge in by hand..gitignoreentries — append the Hadron lines if missing.
A successful run ends with a "Hadron install complete" banner and a recommended hook-bindings block.
Paste the hook bindings¶
If you installed the Spec Kit extension, paste the printed block into
.specify/extensions.yml under hooks:. The block is intentionally
not auto-merged — you may already have other extensions wired up, and
silent merging into a YAML file you own is risky.
The recommended bindings are:
before_specify:
- extension: hadron
command: speckit.hadron.recall
enabled: true
optional: true
after_plan:
- extension: hadron
command: speckit.hadron.capture
enabled: true
optional: false
after_implement:
- extension: hadron
command: speckit.hadron.review
enabled: true
optional: true
- extension: hadron
command: speckit.hadron.capture
enabled: true
optional: false
speckit.hadron.capture binds twice on purpose: most learnings emerge
during research/recon and would be forgotten by end of implementation.
Two captures with fresher context each beats one end-of-session pass.
Under after_implement, speckit.hadron.review runs before
speckit.hadron.capture so capture reflects what actually shipped —
keep that order when you paste.
Non-interactive use¶
Set environment variables and pass NONINTERACTIVE=1:
NONINTERACTIVE=1 \
HADRON_APP_KEY=hdr_app_... \
INSTALL_SPECKIT=yes \
bash <(curl -sSL https://install.hadronmemory.com/install-speckit-extension-1.0.1.sh)
| Variable | Purpose |
|---|---|
NONINTERACTIVE=1 |
Skip every prompt; defaults are taken automatically. |
HADRON_APP_KEY |
Required in non-interactive mode. |
INSTALL_SPECKIT |
yes to run specify init if Spec Kit is missing; no to skip. |
HADRON_PORTAL_URL |
Override the portal URL (default: https://hadronmemory.com). |
HADRON_SERVER_URL |
Override the MCP server URL (default: https://srv.hadronmemory.com). |
HADRON_EXTENSION_BASE_URL |
Override the extension bundle URL — used for testing against a different bundle version without re-fetching the script. |
SCRIPT_VERSION is pinned per published script and is not
env-overridable. To install a different version, fetch
install-speckit-extension-<that-version>.sh instead.
Verify¶
Open the project in your coding agent and ask it to call a Hadron tool — for example:
List my Hadron memories with
h-list-memories.
You should see the memories that the app key's linked agent can reach. If the list is empty, the app has no agent linked yet — see Building an agent.
Troubleshooting¶
Failed to download …extension.yml- The bundle URL is unreachable. Check your network, or override
HADRON_EXTENSION_BASE_URLif you're behind a proxy. HADRON_APP_KEY is required in non-interactive mode- You set
NONINTERACTIVE=1but didn't export an app key. SetHADRON_APP_KEYor drop the non-interactive flag. .mcp.jsonalready had ahadronentry- The script asks before replacing. Decline and merge by hand if you
have a custom config you want to keep, or accept and let the script
back up the old file to
.mcp.json.bak. - Coding agent doesn't see Hadron tools after install
- Restart the agent (or reload the window). MCP servers are read at
startup; the agent won't notice a freshly written
.mcp.jsonon its own. - Hadron MCP connects but tool calls return empty
- The app's linked agent has no memories attached, or the agent's
surfacesarray doesn't includemcp. Open the app and agent in the portal and check both.
What's next¶
- Building an agent — create memories and link them to the app whose key you pasted.
- Connecting an MCP host — wire up other MCP hosts (Cursor, Claude Desktop, etc.).
- Architecture — understand how
apps, app keys, and
AgentMemoryItemroles cap what the host can do.