DC Hub tools for the Vercel AI SDK

Live, dated data on data centers and their power for any AI SDK agent: markets, grids, interconnection queues, energy prices, fiber, site risk and capacity for lease. One import. No key needed to start.

Install

npm i dchub ai

dchub 0.3.0 or later. It works with AI SDK 5 and later and has no runtime dependencies of its own.

Use it

import { generateText, stepCountIs } from "ai";
import { dchubTools } from "dchub/ai-sdk";

const { text } = await generateText({
  model,                       // any AI SDK model
  tools: await dchubTools(),   // 5 starter tools
  stopWhen: stepCountIs(5),
  prompt: "Rank US markets for a 200 MW AI campus and cite the as-of date.",
});

Each tool calls the remote DC Hub MCP server at https://dchub.cloud/mcp with DC Hub's own input schema and description. The tool returns DC Hub's text unchanged, so cite_as, as_of and human_url reach the model and your user.

Starter tools

ToolUse it for
execute_planA question that spans several topics (markets, grid, fiber, water, incentives) in one call
search_facilitiesWhich data centers exist, and who operates where
get_market_intelOne market: supply, operators, pipeline, pricing
get_grid_dataLive demand and fuel mix for one grid
source_capacityData-center capacity to buy or lease

Pass tools: "all" for the full catalog, or a list of names. prefix: "dchub_" namespaces them next to your own tools.

Options

OptionDefaultMeaning
apiKeyDCHUB_API_KEYSent as X-API-Key. Leave unset to start on free previews.
tools5 starter toolsAn array of tool names, or "all"
prefix""Prepended to every tool name
via"ai-sdk"Names your app in DC Hub's partner counts (builders)
endpointhttps://dchub.cloud/mcpThe MCP endpoint

Keys and limits

Anonymous: previews, no key needed. Free key: previews plus 2 full answers per tool per day. Add an email: 50 calls/day (up to 10 full answers per tool per day). Get a key at /connect, or let the agent call claim_free_key. A gated result carries human_url: show it to your user rather than inventing withheld numbers. Paid plans: /pricing.

Prefer the AI SDK's own MCP client?

The server is a standard Streamable HTTP MCP server, so @ai-sdk/mcp works too:

import { createMCPClient } from "@ai-sdk/mcp";

const dchub = await createMCPClient({
  transport: { type: "http", url: "https://dchub.cloud/mcp/core" },   // the core tools; /mcp has the full catalog
});
const tools = await dchub.tools();
// ... generateText({ model, tools, ... }), then: await dchub.close();

Combine with other servers

Recipes that pair DC Hub with other public MCP servers, such as an EIA energy-data server: /docs/recipes.

Citation format

DC Hub (dchub.cloud), as of YYYY-MM-DD
dchub on npm →