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. The managed endpoint is https://mcp.hiveintelligence.xyz/mcp, and the recommended transport is remote Streamable HTTP wherever the client supports it.

Claude Desktop

Claude Desktop adds remote MCP servers through its Custom Connectors UI, not through claude_desktop_config.json.

text
Name: Hive
URL: https://mcp.hiveintelligence.xyz/mcp
Authentication: Bearer token
Token: YOUR_HIVE_API_KEY

Use the stdio fallback in the Claude Desktop guide only when you need a local subprocess.

Cursor

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

json
{
  "mcpServers": {
    "hive": {
      "url": "https://mcp.hiveintelligence.xyz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    }
  }
}

VS Code

Add this to .vscode/mcp.json:

json
{
  "servers": {
    "hive": {
      "type": "http",
      "url": "https://mcp.hiveintelligence.xyz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    }
  }
}

For Windsurf, Gemini CLI, ChatGPT Desktop, Codex CLI, and stdio fallback configs, use the dedicated install guide or the unified setup page.


REST API

No setup required. Send a POST request directly:

bash
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:

bash
npm install hive-intelligence
javascript
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:

bash
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:

bash
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