> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nudj.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Admin Setup

> Generate MCP tokens from the admin panel and connect Claude Desktop to Nudj.

Model Context Protocol (MCP) lets AI assistants talk securely to your Nudj organisation. This page covers the **admin-panel flow**: mint an MCP token, then wire up Claude Desktop (or another stdio-based client) to use it.

<Info>
  For Claude Code (the CLI) see [Claude Code Setup](/developer/mcp/claude-code). For the full tool catalog see [MCP Server](/mcp-server/introduction).
</Info>

## Step 1: Generate an MCP token

1. Open the admin panel at `https://<your-subdomain>.nudj.cx/admin`.
2. Navigate to **Settings → Developer → MCP Tokens**.
3. Click **Generate Token**.
4. **Name the token** (e.g. "My Claude Desktop").
5. **Pick an RBAC scope** — the token inherits the role's permissions:
   * **Viewer**: read-only across the MCP tool surface.
   * **Moderator / Manager**: read + targeted writes.
   * **Admin / SuperAdmin**: full read-write on Nudj resources.
6. **Copy the token immediately** — it's displayed once.

<Warning>
  MCP tokens grant your RBAC-scoped privileges to whichever AI agent you hand them to. Pick the lowest scope that still lets the agent do useful work.
</Warning>

## Step 2: Configure Claude Desktop

Claude Desktop uses a stdio transport — it spawns `mcp-remote` as a child process. Edit the Claude Desktop config file:

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

Add the `nudj` server:

```json theme={null}
{
  "mcpServers": {
    "nudj": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.nudj.cx/mcp",
        "--header",
        "Authorization: Bearer YOUR_TOKEN_HERE",
        "--header",
        "x-api-domain: https://YOUR_SUBDOMAIN.nudj.cx/api/v2/admin"
      ]
    }
  }
}
```

Replace `YOUR_TOKEN_HERE` and `YOUR_SUBDOMAIN` with the values from step 1.

Restart Claude Desktop. The Nudj tools should appear in the MCP panel.

## Step 3: Start chatting

Ask Claude natural-language questions and it will invoke the MCP tools to answer:

> "Which of my challenges completed the most times this week?"
>
> "Create three quiz challenges about space travel, each worth 50 points, with a 'Science Fans' tag."
>
> "Summarise points distributed in the last 30 days and flag any unusual spikes."

## Security & safety

<CardGroup cols={2}>
  <Card title="RBAC-scoped" icon="shield-check">
    The token can only do what your role allows. A Viewer token fails `403` on mutations.
  </Card>

  <Card title="Revoke instantly" icon="trash-can">
    Delete the token from **Settings → Developer → MCP Tokens**. The AI loses access within seconds.
  </Card>

  <Card title="Org-scoped" icon="building">
    Tokens are locked to a single organisation — they won't work against other orgs, even on accident.
  </Card>

  <Card title="No training" icon="brain">
    Your data is used to answer your prompts in that session. Anthropic does not use MCP traffic to train models.
  </Card>
</CardGroup>

## Common questions

<AccordionGroup>
  <Accordion title="What happens if I delete a token?" icon="trash-can">
    The AI immediately loses access to your Nudj community. You'll need to generate a new token and update the Claude Desktop config to reconnect.
  </Accordion>

  <Accordion title="Can I connect multiple AI assistants?" icon="layer-group">
    Yes — generate one token per assistant or teammate so you can track and revoke them independently.
  </Accordion>

  <Accordion title="Do I need to use Claude Desktop?" icon="question">
    No. Any client that speaks MCP works. For the Claude Code CLI, see [Claude Code Setup](/developer/mcp/claude-code). For a custom HTTP client, see [Bearer + Domain Headers](/developer/mcp/bearer-and-domain).
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="MCP Server Overview" icon="server" href="/mcp-server/introduction">
    The full tool catalog and transport details.
  </Card>

  <Card title="Claude Code Setup" icon="terminal" href="/developer/mcp/claude-code">
    Developer-side `.mcp.json` for the Claude Code CLI.
  </Card>
</CardGroup>
