Install in Your AI Client

Connect Hive to Claude Code

Written by , Product docsLast updated

Connect Claude Code to Hive's remote MCP endpoint so Anthropic's CLI agent can call live crypto tools. Add Hive with claude mcp add, pass the Bearer header, then verify that /mcp can see the server.


Before you start

  1. Claude Code installed — instructions here.
  2. A Hive API key from /dashboard/keys.

Configure Claude Code

Pick one of the two transports below. Option 1 (remote HTTP) is recommended for normal use because Claude Code connects directly to Hive's managed endpoint and does not need a local Node wrapper.

claude mcp add accepts the auth header inline via -H (alias --header), so you never have to open ~/.claude.json by hand:

bash
claude mcp add --transport http hive https://mcp.hiveintelligence.xyz/mcp \
  -H "Authorization: Bearer YOUR_HIVE_API_KEY"

Replace YOUR_HIVE_API_KEY with the key from /dashboard/keys. Claude Code writes the config for you and picks up Hive on the next session.

Useful flags:

  • -s user — install into ~/.claude.json so Hive is available in every project. Default scope is local (this repo only). -s project commits it to the repo's .mcp.json.
  • -H is repeatable if you need more than one header: -H "Authorization: Bearer …" -H "X-Workspace: prod".
  • -t http must come before the server name. The positional args are <name> <url>; there is no --url flag.

Secret hygiene. Your key lands in plaintext in the config file either way, and your shell history will capture the full command. If that's a concern, export the key first and reference it:

bash
export HIVE_API_KEY=…
claude mcp add --transport http hive https://mcp.hiveintelligence.xyz/mcp \
  -H "Authorization: Bearer $HIVE_API_KEY"

The shell still expands it into the written config, but the raw token stays out of history.

Option 2 — Local stdio wrapper

If you'd rather run Hive as a subprocess (useful when the machine can't reach mcp.hiveintelligence.xyz directly and you route through a corporate proxy at the Node layer):

bash
claude mcp add hive \
  --env HIVE_API_KEY=YOUR_HIVE_API_KEY \
  -- npx -y -p hive-intelligence@latest hive

This requires Node 20+. Everything after -- is the subprocess command, so flags like --env must come before it.

Verify it worked

Start a new Claude Code session and run /mcp — you should see hive in the list with a tool count. Or ask:

"What is the current price of BTC and ETH?"

Claude Code will call Hive's get_price tool. If the tool invocation shows up in the session log, you're connected.


What to ask once connected

Claude Code is especially good at multi-step data flows. Try:

  • "Check the top 10 DeFi protocols by TVL, then flag any whose TVL dropped more than 5% in the last 24 hours."
  • "Scan the top 50 coins by market cap for any showing >15% price drop today — summarize as a briefing."
  • "For this wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, show every token held, current USD value, and 24h P&L."
  • "Run a security check on this token list and tell me which ones are safe to hold."

Claude Code will chain multiple Hive tools together automatically — you don't need to name each one.


Managing the MCP server

List configured MCP servers:

bash
claude mcp list

Remove Hive if you need to:

bash
claude mcp remove hive

Rotate the API key (HTTP transport) — remove and re-add with the new Bearer token:

bash
claude mcp remove hive
claude mcp add --transport http hive https://mcp.hiveintelligence.xyz/mcp \
  -H "Authorization: Bearer NEW_HIVE_API_KEY"

Force a fresh stdio install (tool catalog is server-side, so @latest matters only for the local wrapper):

bash
claude mcp remove hive
claude mcp add hive --env HIVE_API_KEY=YOUR_HIVE_API_KEY -- npx -y -p hive-intelligence@latest hive

Troubleshooting

HTTP transport — 401 Unauthorized or Authentication failed. The header format matters: -H "Authorization: Bearer <key>" with a literal space after Bearer. Don't wrap the key in quotes inside the header string. Verify the key at /dashboard/keys.

HTTP transport — connection error / timeout. Hive's endpoint is mcp.hiveintelligence.xyz over HTTPS. Corporate firewalls sometimes block it; test on a home network first to isolate. If you must stay behind the proxy, fall back to Option 2 (stdio) and route Node through the proxy.

stdio transport — "hive: command not found" or tool calls fail. Check node --version — the local wrapper requires Node 20+. Upgrade Node and re-run claude mcp add.

stdio transport — "HIVE_API_KEY is invalid". Verify at /dashboard/keys. The key should not contain quotes inside the --env value.

MCP server not listed after add. Run claude mcp list to confirm the entry exists. If it's there but Claude Code doesn't see it in-session, restart your terminal — environment sometimes doesn't propagate until a fresh shell. Scope matters too: a local (default) entry is only visible inside the directory where you ran claude mcp add; install with -s user if you want it globally.


Other clients


Next steps