Agent recipes: DC Hub with EIA energy data

One agent, two MCP servers. DC Hub answers the data-center questions; an EIA server answers the federal energy-statistics questions. Each keeps its own sources and citations.

These recipes are additive. DC Hub is not affiliated with the U.S. Energy Information Administration or with any third-party EIA MCP server, and no partnership is implied. Check each server's own terms, keys and limits.

Who answers what

QuestionServerExample tools
Which markets can power a 200 MW campus? Market verdicts (DCPI)DC Hubrank_markets, get_market_dcpi_rank, execute_plan
How deep is a grid's interconnection queue?DC Hubget_interconnection_queue, get_grid_intelligence
Site context: fiber, water, hazard risk, incentives, capacity for leaseDC Hubanalyze_site, get_water_risk, source_capacity
Historical retail electricity prices, generation by fuel, state energy seriesEIA serverVaries by server (EIA Open Data API v2 routes)

Pick an EIA MCP server

The EIA does not publish its own MCP server. Several independent ones wrap the public EIA Open Data API; most need a free EIA API key. Run one yourself or use a hosted one, then set EIA_MCP_URL (and any header it needs) in the examples below. Directories such as Glama list current options.

Recipe 1: Vercel AI SDK

npm i dchub ai @ai-sdk/mcp
import { generateText, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";
import { dchubTools } from "dchub/ai-sdk";

const eia = await createMCPClient({
  transport: { type: "http", url: process.env.EIA_MCP_URL },
});

try {
  const tools = {
    ...(await dchubTools({ prefix: "dchub_", tools: ["execute_plan", "get_interconnection_queue", "rank_markets"] })),
    ...(await eia.tools()),
  };
  const { text } = await generateText({
    model,
    tools,
    stopWhen: stepCountIs(8),
    system: "Use dchub_ tools for data-center markets, DCPI, queues and site context. " +
            "Use the EIA tools for federal energy series. Cite each figure to its own source and date.",
    prompt: "For a 200 MW AI campus in Texas: which ERCOT markets does DC Hub rate BUILD, " +
            "how deep is the ERCOT queue, and how have Texas industrial electricity prices moved over five years?",
  });
  console.log(text);
} finally {
  await eia.close();
}

The dchub_ prefix keeps the two tool sets apart. More on the DC Hub side: /docs/ai-sdk.

Recipe 2: Strands Agents (Python)

pip install strands-agents mcp
import os
from strands import Agent
from strands.tools.mcp import MCPClient

dchub_headers = {"X-API-Key": os.environ["DCHUB_API_KEY"]} if os.environ.get("DCHUB_API_KEY") else {}
dchub, eia = MCPClient.load_servers({
    "dchub": {"url": "https://dchub.cloud/mcp", "headers": dchub_headers},
    "eia": {"url": os.environ["EIA_MCP_URL"]},
})

with dchub, eia:
    agent = Agent(
        tools=dchub.list_tools_sync() + eia.list_tools_sync(),
        system_prompt=(
            "Use DC Hub for data-center markets, power availability, queues and site risk. "
            "Use EIA for federal energy series. Cite each figure to its own source and as-of date."
        ),
    )
    agent("Compare PJM and ERCOT for a 100 MW data center: DC Hub's view of power availability, "
          "and EIA's last three years of commercial electricity prices in Virginia and Texas.")

A runnable single-server sample lives in the DC Hub MCP repo at integrations/strands.

Citing both

DC Hub (dchub.cloud), as of YYYY-MM-DD
U.S. Energy Information Administration, <series name>, retrieved YYYY-MM-DD

Keys and limits on the DC Hub side

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.