Tutorials & SDKs

Integration Libraries

Hive exposes two integration surfaces:

  • REST API for application code and backend services
  • MCP for AI agents, assistants, and tool-aware runtimes

Current REST Contract

Base URL: https://mcp.hiveintelligence.xyz

ActionEndpointNotes
Discover toolsGET /api/v1/toolsUse this to inspect the live catalog and schemas
Execute a toolPOST /api/v1/executeSend JSON with tool and args

Older REST examples that use toolName and arguments are legacy.

Execute Example

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",
      "vs_currencies": "usd"
    }
  }'

Response Example

{
  "bitcoin": {
    "usd": 67234.0
  }
}

Most tools return provider-shaped JSON directly, so you should validate against each tool schema rather than assuming one shared wrapper.


MCP For Agents

Use the root MCP server when you want resource discovery and schema lookup:

{
  "mcpServers": {
    "hive-intelligence": {
      "url": "https://mcp.hiveintelligence.xyz/mcp"
    }
  }
}

Use category-scoped MCP endpoints when you want a smaller direct tools/list surface, for example:

  • /hive_market_data/mcp
  • /hive_security_risk/mcp
  • /hive_portfolio_wallet/mcp
  • /hive_prediction_markets/mcp

Helpful MCP discovery resources:

  • hive://tools
  • hive://providers
  • hive://categories

Language Guides

GuideStatusFocus
JavaScript / TypeScript SDKOfficial (hive-intelligence on npm)Browser, Node.js, Deno, Bun, and TypeScript-first integrations
Python SDKCommunity-maintainedScripts, data pipelines, and backend services. The PyPI package is currently maintained outside the canonical hive-sdk repo — production workloads should call the REST API directly until the official Python SDK ships.
Other languagesUse the REST APIGo, Java, Rust, Ruby, .NET, and any other backend can call POST /api/v1/execute — same auth header, same response envelope.

Minimal Examples

Python

import requests

response = requests.post(
    "https://mcp.hiveintelligence.xyz/api/v1/execute",
    headers={"Authorization": "Bearer YOUR_HIVE_API_KEY"},
    json={
        "tool": "get_price",
        "args": {"ids": "bitcoin", "vs_currencies": "usd"},
    },
    timeout=30,
)

print(response.json())

JavaScript

const response = await fetch("https://mcp.hiveintelligence.xyz/api/v1/execute", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.HIVE_API_KEY}`,
  },
  body: JSON.stringify({
    tool: "get_price",
    args: { ids: "bitcoin", vs_currencies: "usd" },
  }),
});

console.log(await response.json());

Go

payload := map[string]any{
    "tool": "get_price",
    "args": map[string]any{
        "ids": "bitcoin",
        "vs_currencies": "usd",
    },
}

Java

Map<String, Object> payload = Map.of(
    "tool", "get_price",
    "args", Map.of("ids", "bitcoin", "vs_currencies", "usd")
);

Rust

let payload = json!({
    "tool": "get_price",
    "args": { "ids": "bitcoin", "vs_currencies": "usd" }
});