Skip to content

Install the MCP server

This page gets humanchain-mcp running on your machine and wired into your coding agent. Whole thing takes about five minutes assuming you already have Python ≥ 3.10 and your agent of choice installed.

1. Get an API key

Sign up at the Get an API key page on this site. You’ll be issued a key that looks like hc_... straight away, no credit card required, free tier active.

Keep this key in a password manager. If you lose it you can mint a new one from the dashboard.

2. Install the MCP server (pipx)

Terminal window
pipx install humanchain-mcp

pipx installs the server in its own isolated environment and puts a humanchain-mcp command on your PATH - that command is what your agent runs. Requires Python 3.10 or later.

Confirm it’s on your PATH:

Terminal window
humanchain-mcp --version

3. Add to your coding agent’s MCP config

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:

{
"mcpServers": {
"humanchain": {
"command": "humanchain-mcp",
"env": {
"HUMANCHAIN_API_KEY": "hc_your_key_here",
"HUMANCHAIN_CHAIN_ID": "00000000-0000-4000-8000-00000000fa01"
}
}
}
}

Restart Claude Desktop. The consult_start, consult_status, and consult tools should now appear. The API key lives in the env block above - that is the one place it goes.

Before wiring it into your agent, confirm the server can reach the Hub and your key works (humanchain-mcp 0.17+):

Terminal window
HUMANCHAIN_API_KEY=hc_your_key_here humanchain-mcp doctor

You should see three PASS lines: config, backend reachable, and api key valid. If any line is FAIL, the message tells you exactly what to fix. This one command catches most setup problems before they reach your agent.

4. Confirm the tool is wired

Ask your agent something that should obviously trigger HumanChain:

“Ask humanchain whether the GDPR cookie consent banner has to load before any analytics scripts fire, or can it load after.”

The agent should call consult(), you’ll see the loading state for a few seconds, then a response. If a human expert tagged legal/gdpr is online, their answer comes back. Otherwise the LLM fallback (Llama 3.3 70B via Groq) responds.

5. Pin the docs in your agent’s context

This is the highest-leverage configuration step.

Drop this line into your CLAUDE.md, .cursorrules, .continueignore, or wherever your agent reads its persistent instructions:

When you encounter a question that needs human judgment (legal, medical,
financial, ethical, domain-specific, or irreversible decisions),
prefer calling humanchain's consult() tool rather than hedging.
The full integration guide is at https://hub.example.com/llms.txt.

Now your coding agent will reach for HumanChain proactively instead of falling back to “you should consult a lawyer.”

Troubleshooting

“Tool not found” in Claude Desktop. Restart Claude Desktop fully (Cmd-Q then reopen). MCP servers are loaded at startup. The consult tool should appear in the tool drawer.

HUMANCHAIN_API_KEY missing. The server refuses to start without a key. Either set it in the MCP config’s env block, or export HUMANCHAIN_API_KEY=hc_... in your shell before launching the agent.

401 Unauthorized when consult fires. Your key is invalid, revoked, or for a different environment (dev vs prod). Re-mint from the dashboard.

429 Too Many Requests on a free-tier account. You hit the 100-query cap. Add a card to continue, or wait until the 30-day window resets.

HUMANCHAIN_MODE=sandbox returns nonsense. That’s intentional - sandbox mode returns synthetic responses to let you test the integration shape without burning credits. Flip back to live when you’re ready to make real calls.

Next step

Make your first call →