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.
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.
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.
| Tool | Use it for |
|---|---|
execute_plan | A question that spans several topics (markets, grid, fiber, water, incentives) in one call |
search_facilities | Which data centers exist, and who operates where |
get_market_intel | One market: supply, operators, pipeline, pricing |
get_grid_data | Live demand and fuel mix for one grid |
source_capacity | Data-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.
| Option | Default | Meaning |
|---|---|---|
apiKey | DCHUB_API_KEY | Sent as X-API-Key. Leave unset to start on free previews. |
tools | 5 starter tools | An 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) |
endpoint | https://dchub.cloud/mcp | The MCP endpoint |
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.
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();
Recipes that pair DC Hub with other public MCP servers, such as an EIA energy-data server: /docs/recipes.
DC Hub (dchub.cloud), as of YYYY-MM-DD
dchub on npm →