API Reference

Package Architecture

Written by , Product docsLast updated

Use this page when you need to choose the right Hive package, transport, or endpoint for a production integration. For first-run setup, start with Get Started or Install Hive.


Package surfaces

Remote MCP and REST are hosted at mcp.hiveintelligence.xyz; local MCP stdio and terminal workflows ship in hive-intelligence. Custom TypeScript applications can use the official hive-mcp-client adapter, published on npm at v0.1.5 (npm install hive-mcp-client); its source is public in the hive-intel/hive-sdk repo under client/. REST remains the stable path for non-TypeScript stacks and low-level integrations.

SurfaceEntrypointUsed by
Remote MCP serverhttps://mcp.hiveintelligence.xyz/mcpClaude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex CLI, Gemini CLI, OpenAI Responses API, and header-capable MCP clients
MCP stdio wrappernpx -y -p hive-intelligence@latest hiveClients or networks that require a local subprocess instead of remote Streamable HTTP
TypeScript app adapternpm install hive-mcp-client then import { createHiveMcpClient } from 'hive-mcp-client'Node and backend apps that embed Hive MCP
hive CLInpx -y -p hive-intelligence@latest hive … (named bin)Terminal workflows, scripts, and cron jobs

The local executable is named hive, which differs from the package name, so npx uses -p hive-intelligence@latest to pick the package and then hive as the binary.


Remote MCP clients

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
{
  "inputs": [
    {
      "type": "promptString",
      "id": "hive-api-key",
      "description": "Hive API Key",
      "password": true
    }
  ],
  "servers": {
    "hive": {
      "type": "http",
      "url": "https://mcp.hiveintelligence.xyz/mcp",
      "headers": {
        "Authorization": "Bearer ${input:hive-api-key}"
      }
    }
  }
}

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


REST API

REST has no client package. 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.


TypeScript MCP client

The typed adapter is published on npm as hive-mcp-client@0.1.5; its source is mirrored in hive-intel/hive-sdk under client/. Install it from npm:

bash
npm install hive-mcp-client
ts
import {
  createHiveMcpClient,
  invokeHiveEndpoint,
} from 'hive-mcp-client';

const hive = await createHiveMcpClient({
  apiKey: process.env.HIVE_API_KEY,
  clientName: 'my-app',
});

const prices = await invokeHiveEndpoint(hive, 'get_price', {
  ids: 'bitcoin,ethereum',
  vs_currencies: 'usd',
});

console.log(prices.json ?? prices.text);

The adapter keeps custom apps on the same discovery/schema/execution path as MCP agents. For non-TypeScript stacks, use the REST API directly.

The current adapter source includes:

  • core MCP helpers such as createHiveMcpClient, searchHiveTools, getHiveEndpointSchema, invokeHiveEndpoint, normalizeHiveToolCall, rankHiveCategoriesForQuery, normalizeHiveToolResult, and readHiveMetadataSnapshot
  • hive-mcp-client/b2b for signed subject sessions, B2B readiness checks, hive-mcp doctor, and adapter methods for watchlist digest monitors, risk watches, token discovery risk, alerts, reports, memory facts, monitor cleanup, forSubject(), callForSubject(), and subject audit reads
  • hive-mcp-client/ai-sdk for Vercel AI SDK MCP transport config and ranked/core/all tool selection
  • hive-mcp-client/langchain for LangChain tools over Hive's compact root MCP surface; install @langchain/core only in apps that use this export

searchHiveTools, getHiveEndpointSchema, and invokeHiveEndpoint already return normalized results. Use normalizeHiveToolResult only when your code calls client.callTool() directly.

Keep HIVE_API_KEY and HIVE_SUBJECT_SIGNING_SECRET in server-side runtime config. Browser code should call your own backend instead of importing the adapter directly.


CLI

Run tools from the terminal through the published npm package. The 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. Open the sign-in link sent to your inbox
  4. Copy your API key from the dashboard

The email sign-in flow is passwordless. After you confirm the email link, copy your API key from the dashboard.


Next steps