API Key & Remote MCP

Connect to Hud MCP without the IDE extension - run the server standalone with an API key, or use Hud's hosted server over HTTPS.

📘

Most users should use the local MCP via the Hud IDE extension or npm

Remote MCP exists for cases where that isn't possible - typically because you can't install the Hud IDE extension, or because your workflow runs in an environment that doesn't support local MCP servers.


How it works

There are two ways to connect, and most clients support both:

  • Standalone - the client launches the Hud MCP server as a local process (npx), authenticating with an API key in the HUD_MCP_KEY environment variable.
  • Remote (hosted) - the client connects to Hud's hosted server at https://mcp.hud.io/mcp, authenticating with either OAuth (interactive, for humans) or an API key in the X-Hud-Mcp-Key header (for machines, CI, and agentic workflows).

Both API-key methods use the same key. Pick your client below.


Get your API key

Your API key lives in your Hud account settings:

👉 app.hud.io/settings/api-keys

📘

No API key in your account? Not every account has one provisioned yet. Contact us via the in-app chat or email [email protected] and we'll issue one for you.

Treat the key like a password - never commit it to source control or share it in a public channel.


Cursor

Add Hud to your Cursor mcp.json (project-level at <project>/.cursor/mcp.json or user-level at ~/.cursor/mcp.json).

Standalone (API key):

{
  "mcpServers": {
    "hud": {
      "command": "npx",
      "args": ["-y", "hud-mcp"],
      "env": {
        "HUD_MCP_KEY": "<Your API key>"
      }
    }
  }
}

Remote - OAuth (interactive use):

{
  "mcpServers": {
    "hud": {
      "type": "http",
      "url": "https://mcp.hud.io/mcp",
      "auth": {
        "CLIENT_ID": "XyvD6NaPGbrpOL9mxglq7KUYuPXbyNB4"
      }
    }
  }
}

Toggle hud on in Cursor Settings → Tools & MCP; Cursor opens a browser tab to sign you in. Cursor doesn't yet support signing in without a pre-registered client, so it needs the CLIENT_ID. The value is identical for all users and should not be changed.

Remote - API key (automations, Cursor Background Agents, headless setups):

{
  "mcpServers": {
    "hud": {
      "type": "http",
      "url": "https://mcp.hud.io/mcp",
      "headers": {
        "X-Hud-Mcp-Key": "<Your API key>"
      }
    }
  }
}

Claude Code

Standalone (API key):

claude mcp add hud -e HUD_MCP_KEY=<Your API key> -- npx -y hud-mcp

Remote - OAuth (interactive use):

claude mcp add --scope user -t http hud https://mcp.hud.io/mcp

Then go into Claude Code and authenticate by running /mcp and following the OAuth flow. No client ID is needed.

Remote - API key (CI, scripted agents, containers):

claude mcp add -t http hud https://mcp.hud.io/mcp \
  -H "X-Hud-Mcp-Key: <Your API key>"

Other MCP clients

Any client that can launch a command runs the standalone server the same way - point it at npx -y hud-mcp and set HUD_MCP_KEY in its environment:

{
  "mcpServers": {
    "hud": {
      "command": "npx",
      "args": ["-y", "hud-mcp"],
      "env": {
        "HUD_MCP_KEY": "<Your API key>"
      }
    }
  }
}

For clients that connect over HTTP instead, use https://mcp.hud.io/mcp and authenticate in one of these ways:

  • OAuth, automatic: clients that support OAuth Client ID Metadata Documents (CIMD) sign in with no extra setup. Add the URL and follow the sign-in flow.
  • OAuth, with a client ID: clients that require a pre-registered OAuth client, such as Cursor, need the client ID XyvD6NaPGbrpOL9mxglq7KUYuPXbyNB4. It is identical for all users and should not be changed.
  • API key: send your key in the X-Hud-Mcp-Key header.


Did this page help you?