Tutorials & SDKs

Installation

Get Hive running in your environment. Pick the method that matches your workflow.


About the hive-intelligence package

Everything local — the MCP stdio server, the JavaScript SDK, and the hive CLI — ships in a single npm package, hive-intelligence. Install or npx it once and every entrypoint is available:

SurfaceEntrypointUsed by
MCP stdio servernpx -y hive-intelligence@latest (default bin)Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI, Gemini CLI when they spawn Hive over stdio
JavaScript SDKimport { HiveSearchClient } from 'hive-intelligence'Node and browser apps
hive CLInpx -y -p hive-intelligence@latest hive … (named bin)Terminal workflows, scripts, cron

The CLI executable is named hive, which differs from the package name, so npx needs -p hive-intelligence@latest to pick the package and then hive as the binary. The MCP stdio server is the default bin, so it's reached with no -p flag.


MCP Client

Configure Hive as an MCP server in your AI client. One JSON block and you have hundreds of crypto and financial data tools available in your assistant.

Claude Desktop

Open your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add:

{
  "mcpServers": {
    "hive-intelligence": {
      "command": "npx",
      "args": ["-y", "hive-intelligence"],
      "env": {
        "HIVE_API_KEY": "YOUR_HIVE_API_KEY"
      }
    }
  }
}

Restart Claude Desktop. The Hive tools will appear in your tool list.

Cursor

Open Cursor Settings, navigate to MCP, and add a new server with this config:

{
  "mcpServers": {
    "hive-intelligence": {
      "command": "npx",
      "args": ["-y", "hive-intelligence"],
      "env": {
        "HIVE_API_KEY": "YOUR_HIVE_API_KEY"
      }
    }
  }
}

VS Code

Install the MCP extension, then add to your .vscode/mcp.json:

{
  "mcpServers": {
    "hive-intelligence": {
      "command": "npx",
      "args": ["-y", "hive-intelligence"],
      "env": {
        "HIVE_API_KEY": "YOUR_HIVE_API_KEY"
      }
    }
  }
}

Any MCP-compatible client that supports stdio transport uses the same config shape.


REST API

No setup required. Send a POST request directly:

curl -X POST https://mcp.hiveintelligence.xyz/api/v1/execute \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_HIVE_API_KEY" \
  -d '{
    "tool": "get_price",
    "args": {
      "ids": "bitcoin,ethereum",
      "vs_currencies": "usd"
    }
  }'

The payload keys are tool and args. See the API Integration page for the full REST reference.


JavaScript SDK

Install the published npm package:

npm install hive-intelligence
import { HiveSearchClient } from 'hive-intelligence';

const client = new HiveSearchClient({ apiKey: process.env.HIVE_API_KEY });

const prices = await client.execute('get_price', {
  ids: 'bitcoin,ethereum',
  vs_currencies: 'usd',
});

console.log(prices);

The HiveSearchClient handles auth, retries, and response parsing. See the JavaScript SDK guide for full options.


CLI

Run tools directly from the terminal without writing any code. The npm package is hive-intelligence and the executable is hive, so npx needs -p to pick the package before naming the binary:

HIVE_API_KEY=YOUR_KEY npx -y -p hive-intelligence@latest hive market price --ids bitcoin --vs usd

Or install globally and call hive directly:

npm install -g hive-intelligence
hive auth login
hive market price --ids bitcoin --vs usd

See the CLI Reference for all available commands.


Get Your API Key

  1. Go to /dashboard/keys
  2. Enter your email address
  3. Click the magic link sent to your inbox
  4. Copy your API key from the dashboard

The magic link flow takes under 30 seconds. No password required.


Next Steps