Skip to main content
Every HTTP-based MCP client — Claude Code, Cursor, ChatGPT, custom mcp-remote wrappers — authenticates to the production Nudj MCP server with a Bearer token header:
The MCP server validates the token against Nudj’s auth layer and resolves your organisation’s Admin API directly from the verified token. In production (https://mcp.nudj.cx/mcp), do not send x-api-domain — caller-supplied x-api-domain headers are rejected with HTTP 400 in production and are only accepted in development, preview, and local environments:
stdio-based MCP clients (Claude Desktop, older Cursor) connect through mcp-remote and send the Authorization header with --header. See MCP Admin Setup.

How routing works

The MCP server is a single deployment serving many organisations. In production, the verified Bearer token identifies both the user and the organisation, and the MCP server resolves the tenant’s Admin API domain from that verified organisation record rather than trusting a request header. In development, preview, and local environments, you may pass x-api-domain to route requests to devapi.nudj.cx or localhost:3000 (see Bearer Token Authentication).

Generate a token

  1. Sign into the admin panel at https://<subdomain>.nudj.cx/admin.
  2. Navigate to Settings → Developer → MCP Tokens.
  3. Click Generate Token and pick an RBAC scope (Viewer, Moderator, Manager, Admin, or SuperAdmin).
  4. Copy the token immediately — it is shown once.
MCP tokens inherit your RBAC role. A Viewer-scoped token will fail 403 on any mutation tool; match the scope to the agent’s actual needs.

Configure an HTTP MCP client

Most clients accept an mcp-remote config block. The canonical shape:
Store the token in an env var rather than pasting it into the config directly. Only add "--header", "x-api-domain: ..." when targeting development, preview, or local endpoints.

Endpoint map

For local development, see Claude Code Setup — the local flow needs a TLS bypass.

Verifying the connection

Once configured, the client exposes Nudj tools in its tool catalog. Quick sanity check — ask the agent:
“Use the Nudj MCP to list my five most recent challenges.”
If auth is wrong, you’ll see a 400, 401, or 403 in the client’s error log. Common causes:
  • Sending x-api-domain to the production endpoint (https://mcp.nudj.cx/mcp) — returns 400 Bad Request
  • Token copied with leading/trailing whitespace
  • In dev/local: x-api-domain missing the /api/v2/admin suffix or mismatched with the token’s org
  • Token expired (re-generate from the admin panel)

Claude Code Setup

Full .mcp.json walkthrough for Claude Code specifically.

MCP Tools Reference

The full tool catalog exposed by the Nudj MCP server.