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 the public URL, complete browser authorization, then verify that /mcp can see the server.


Before you start

  1. Claude Code installed. See the Claude Code installation guide.

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.

Add the hosted URL without a credential in the command:

bash
claude mcp add --transport http hive https://mcp.hiveintelligence.xyz/mcp

Claude Code writes the config, discovers Hive's OAuth metadata, and opens browser authorization when it connects.

Useful flags:

  • -s user installs 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.
  • -t http must come before the server name. The positional args are <name> <url>; there is no --url flag.

Headless API-key fallback

For CI or environments that cannot open browser authorization, use a key from /dashboard/keys. Keep the secret in an environment variable and add the header only in that headless environment:

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

Claude may write the expanded header to its configuration. Prefer interactive OAuth on shared machines.

Option 2: local stdio server

If you need a subprocess or want to run Hive with your own upstream provider credentials:

bash
claude mcp add hive \
  -- npx -y -p hive-intelligence@latest hive

The 1.3.0 release candidate requires Node 22.12+. Local stdio does not use HIVE_API_KEY; add provider-specific --env flags before -- only for the local integrations you want to enable.

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, then 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 chains 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

Restart browser authorization by removing and re-adding the URL:

bash
claude mcp remove hive
claude mcp add --transport http hive https://mcp.hiveintelligence.xyz/mcp

Force a fresh stdio install so Claude Code starts the latest local server package and tool catalog:

bash
claude mcp remove hive
claude mcp add hive -- npx -y -p hive-intelligence@latest hive

Troubleshooting

HTTP transport, 401 Unauthorized or Authentication failed. Remove and re-add the server to restart OAuth discovery. For the headless fallback, the header format is Authorization: Bearer <key> with a literal space after Bearer.

HTTP transport, connection error or timeout. Hive's endpoint is mcp.hiveintelligence.xyz over HTTPS. Corporate firewalls sometimes block it; test on another network to isolate. Use Option 2 only when you can reach the required provider APIs from the local Node process.

stdio transport, "hive: command not found" or tool calls fail. Check node --version. The 1.3.0 release candidate requires Node 22.12+. Upgrade Node and re-run claude mcp add.

stdio transport reports missing_key. Add the relevant provider credential with --env PROVIDER_KEY=..., then recreate or update the local entry. Do not pass HIVE_API_KEY to local stdio.

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