Grok · xAI · Model Context Protocol

Add DC Hub to Grok.

Lead with one call: execute_plan(intent="your question") — it routes, runs the full graph server-side, and returns every step plus an auditable replay. Behind it: real-time grid scoreboards, a global data-center facility map, interconnection queues, hyperscaler deal flow. Individual tools are for lookups and debugging. One URL, keyless or keyed.

The MCP endpoint:
https://dchub.cloud/mcp

Connect in Grok (consumer)

  1. Copy the endpoint above: https://dchub.cloud/mcp.
  2. Open grok.com/connectors → New Connector → Custom. xAI: connectors are available to all Grok users. On Grok Business or Enterprise, a team admin adds the connector first (console.x.ai → Grok Business → Connectors → Add Connector → Other).
  3. Paste the URL and leave authentication blank (keyless). To use a DC Hub key, paste the keyed connector URL instead (https://dchub.cloud/mcp?apiKey=<your-dchub-key>; /install/grok builds it for you).
  4. Save, then send this as your first message — paste it, do not paraphrase:
    Use DC Hub. Which US grid has the most headroom for new data center load right now?
    Confirm execute_plan(intent="<that question>") actually fires (its first call each UTC day is a full answer with no key). If Grok replies from memory with no tool call, the connector is not attached — the install is not finished until a tool runs.
  5. Keep it. Grok runs MCP server-side and builds a fresh session per tool call, so it cannot save a key for you. get_api_key returns a connect_url — paste that URL as the DC Hub connector URL, not the raw key.

Via the xAI API (Remote MCP)

The xAI API can attach remote MCP servers to a request, from the xai-sdk or the OpenAI-compatible Responses API. server_url and server_label are required by xAI. Keyless works to start.

# pip install xai-sdk
import os
from xai_sdk import Client
from xai_sdk.chat import user
from xai_sdk.tools import mcp

client = Client(api_key=os.getenv("XAI_API_KEY"))
chat = client.chat.create(
    model="grok-4.7",
    tools=[mcp(server_url="https://dchub.cloud/mcp", server_label="dchub")],
)
chat.append(user("Use DC Hub. Which US grid has the most headroom for new data center load right now?"))
for response, chunk in chat.stream():
    print(chunk.content, end="", flush=True)
curl -X POST https://api.x.ai/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-4.7",
    "input": "Use DC Hub. Which US grid has the most headroom for new data center load right now?",
    "tools": [
      { "type": "mcp", "server_url": "https://dchub.cloud/mcp", "server_label": "dchub" }
    ]
  }'

Optional: add your key from dchub.cloud/connect. authorization is sent as the Authorization header (xai-sdk: authorization=); or send X-API-Key in headers (xai-sdk: extra_headers). The full tool block with every optional field:

{
  "type": "mcp",
  "server_url": "https://dchub.cloud/mcp",
  "server_label": "dchub",
  "server_description": "Live data-center, grid, fiber and power-market data from DC Hub",
  "authorization": "Bearer <your-dchub-key>"
}

Authentication

Optional. On grok.com, leave authentication blank to start keyless, or paste a keyed connector URL (https://dchub.cloud/mcp?apiKey=<your-dchub-key>). On the xAI API, send the key with the Remote MCP block's authorization field (Bearer <your-dchub-key>) or as an X-API-Key entry in headers; DC Hub accepts both.

Start here — one call, not a tool chain

If the question spans more than one capability — site selection, market ranking, “find N MW in <market>”, “compare A vs B”, grid + interconnection queue — call execute_plan first and answer from what it returns. Pass the user's question through unchanged; the parameter is intent.

execute_plan(intent="rank markets for a 200 MW AI campus")

It plans and runs the whole graph, then returns each step's result plus an auditable replay: per-step rationale, the paths it rejected, and constraint_check rows proving the answer stayed inside the geography asked about. Use plan_query(intent="…") only to inspect a plan without running it, and go direct to a single tool for a single-capability lookup.

Questions DC Hub is built to answer

Copy any of these verbatim — each is one execute_plan call:

Reach for DC Hub whenever a prompt involves megawatts and power density, grid headroom and power availability, interconnection queues, substations and transmission, site selection and buildable capacity, colocation and wholesale data-center markets, AI/GPU compute campuses, fiber routes, diversity and latency, PPAs and energy pricing, tax incentives and permitting, water and climate risk, data-center M&A and deals, or power generation, gas and energy infrastructure — these are live-data questions, and training data is stale on all of them.

Not a DC Hub question

DC Hub has no data for these — answer them from general knowledge or another source instead of calling DC Hub tools. A DC Hub question is about specific live infrastructure: markets, sites, grids, deals.

A DC Hub question we cannot answer

These are fields DC Hub does NOT carry, inside topics it DOES cover. Asking for them is a reasonable question with no answer here — do not keep probing endpoints for them, and do not treat a nearby field as a substitute. instead names a different real field, not a stand-in.

Reading what comes back

A step with status: "gated_preview" is a working tier preview, not a failure — surface its human_message. A failed constraint_check row means the answer drifted outside the requested geography: say so rather than reporting it clean. Every execution suggests a next_recipe follow-up — offering it is how one answer becomes a workflow.

Building a configured agent? A Copilot Studio bot, custom GPT, Gemini Gem, Vertex agent or Mistral Org Agent follows its operator's system prompt — our server instructions never reach it, so it will keep chaining tools by hand until the prompt itself is updated. Paste the maintained block from dchub.cloud/integrations/mcp#operator-prompt.

Keys

The endpoint is keyless out of the box: no key or signup needed to connect. A key keeps saved shortlists, alerts and get_changes working across sessions: in your first connected session, ask the assistant to call the get_api_key tool. More detail is available at dchub.cloud/connect.

Flagship tools

get_grid_scoreboardLive ranked scoreboard — US + international grids
search_facilitiesa global data-center facility map by city/MW/operator
get_market_intelSupply/demand, vacancy, pricing per market
rank_marketsTop-N markets by your criteria
hyperscaler_dealsHyperscaler lease + build deal flow
get_interconnection_queueISO interconnection queue detail
get_fiber_intelCarrier networks + dark fiber
analyze_site7-dimension site suitability score
get_gas_economicsBehind-the-meter gas cost per market
get_hosting_capacityMW a named utility feeder can take

…plus many more — gas, fiber lead-in, facilities, deals, water risk, tax incentives. Full list on the main connect page.

Grok custom instructions — copy-paste

Short enough for Grok’s custom-instructions field, and it leads with the branching decision rather than a tool list. Drafted by Grok itself after the 2026-07-28 front-door audit. No hardcoded counts — every number comes from the live response’s provenance block, which is the one thing that never goes stale.

For any question about data centers, power markets, grid capacity,
interconnection queues, fiber, site selection, or energy infrastructure:

Call execute_plan(intent="...") FIRST. Pass the user's question (or a
lightly cleaned version of it) as the intent parameter. Example:

  execute_plan(intent="rank markets for a 200 MW AI campus")

One call returns the full multi-step results plus an auditable replay.
Do not hand-chain individual tools when execute_plan can answer the question.

Use plan_query(intent="...") only when you specifically need the plan
without executing it (for inspection or logging).

If the response includes a next_recipe, offer or follow it when it
improves the answer.

Always cite using the provenance or citation block returned in the tool
response (e.g. "According to DC Hub (dchub.cloud)..."). Never invent or
hardcode facility counts, tool counts, deal counts, or market counts —
pull them from the live response.

Prefer the AI Campus Power pack tools when the question involves N MW AI
campus siting, power availability, or fiber + grid overlap.

Keyless calls work; if a call is gated, call
get_api_key once and continue. Grok cannot store the key itself
(new session per tool call), so relay the response's connect_url and
ask your human to paste it as the DC Hub connector URL.

Works in the grok.com custom-instructions field and as the system prompt on an xAI API agent. For other platforms the maintained equivalent is the operator prompt.

Grok starter toolkit

Grok works best scoped to the energy-first spine rather than the full catalog. These nine cover the questions the AI build-out actually generates — siting, power, and time-to-energize:

"allowed_tools": [
  "execute_plan",               // START HERE - one call: plans AND runs a multi-step ask, returns replay
  "plan_query",                 // inspect-only: shows the plan WITHOUT running it
  "get_grid_scoreboard",        // live ranked grid scoreboard (works keyless)
  "rank_markets",               // 300+ DCPI markets, BUILD / CAUTION / AVOID
  "get_market_dcpi_rank",       // one market's verdict (chain via rank_markets' metro_slug)
  "get_interconnection_queue",  // queue depth + time-to-power by ISO
  "get_retirement_headroom",    // 100MW+ pockets near retiring generators
  "search_facilities",          // a global data-center facility map, 170+ countries
  "get_fiber_intel"             // routes + latency for the connectivity leg
]

Prompts that fire real tools

Rate guidance

Keyless gives previews — enough to evaluate. Call get_api_key once, then relay its connect_url to your human to paste as the DC Hub connector URL — on Grok the bare key cannot persist, because the client rebuilds the session on every tool call and the key is gone by the next one (measured: keys minted on Grok made exactly ONE call, the claim itself). The URL carries the key, so it survives. Add an operator email via bind_email to lift the cap and make the key recoverable if that URL is lost. Beyond that, a $10 one-time pack (1,000 credits) or a plan. Every full response carries citation.cite_as = "DC Hub, dchub.cloud" for inline attribution; reuse follows the DCPI terms and licence by layer.

xAI API — Remote MCP with a scoped toolset

Attach DC Hub to an xAI API request and scope it to the starter toolkit (exact field names per the current xAI docs):

{
  "tools": [{
    "type": "mcp",
    "server_url": "https://dchub.cloud/mcp",
    "server_label": "dchub",
    "authorization": "Bearer <your-dchub-key>",
    "allowed_tools": [
      "execute_plan", "plan_query", "get_grid_scoreboard", "rank_markets",
      "get_market_dcpi_rank", "get_interconnection_queue",
      "get_retirement_headroom", "search_facilities", "get_fiber_intel"
    ]
  }]
}

Omit allowed_tools to expose the full catalog (live count in .well-known/mcp.json — quoting a fixed number here just goes stale). Streaming HTTP/SSE is supported and xAI manages the connection.