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

# Connect an AI assistant to Conduktor MCP

> Connect Claude Desktop or another MCP client to Conduktor Console with a personal access token, and ask questions about your Kafka platform.

Connect an AI assistant to the Model Context Protocol (MCP) server built into Conduktor Console. The assistant then uses your own Console permissions to answer questions about your Kafka platform.

## Prerequisites

| Requirement | Required | Details |
| - | - | - |
| **MCP server enabled in Console** | Yes | Enabled by default. Admins can turn it off with `enable_mcp: false` (`CDK_ENABLE_MCP=false`). |
| **MCP client** | Yes | Claude Desktop, or any client that can connect to a remote MCP server. |
| **Node.js and npm** | Yes, for Claude Desktop | The Claude Desktop configuration uses `npx` to run [mcp-remote](https://www.npmjs.com/package/mcp-remote), which bridges it to Console. Download it from [nodejs.org](https://nodejs.org). |
| **Insights enabled** | No | Needed for the **insights-cluster**, **insights-topics**, **query-topics** and **aggregate-topics** tools. See [Insights](/guide/insights#disable-insights). |

## Set up the connection

<Steps>
  <Step title="Open the MCP setup page">
    In Console, go to **Settings** > **MCP**.

    <img src="https://mintcdn.com/conduktor/lwz09TjZSf6Yem1U/images/mcp-setup.png?fit=max&auto=format&n=lwz09TjZSf6Yem1U&q=85&s=74be5bfe0179ecb73a60bcab11593f00" alt="MCP connection setup page in Console" width="691" height="1024" data-path="images/mcp-setup.png" />
  </Step>

  <Step title="Generate a token">
    Click **Generate token and configure**. Console creates a personal access token named `MCP Token - <date>` and adds it to the configuration shown on the page.

    Copy the configuration straight away: the token won't be visible once you leave the page.

    To create the token yourself, click **create a token manually** or go to **Settings** > **API Keys**. Find out more about [personal access tokens](/guide/conduktor-in-production/automate/api-automation#manage-api-keys).
  </Step>

  <Step title="Add the configuration to your MCP client">
    <Tabs>
      <Tab title="Claude Desktop">
        In Claude Desktop, go to **Settings** > **Developer** and click **Edit Config** to open `claude_desktop_config.json`:

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

        Paste the configuration from Console under `mcpServers`. It looks like this:

        ```json theme={null}
        {
          "mcpServers": {
            "conduktor-console": {
              "command": "npx",
              "args": [
                "mcp-remote",
                "<CONSOLE_URL>/api/mcp",
                "--header",
                "Authorization: Bearer ${CONDUKTOR_API_TOKEN}"
              ],
              "env": {
                "CONDUKTOR_API_TOKEN": "<YOUR_PERSONAL_ACCESS_TOKEN>"
              }
            }
          }
        }
        ```
      </Tab>

      <Tab title="Other MCP clients">
        Configure a remote MCP server with these details:

        | Setting | Value |
        | - | - |
        | **Endpoint** | `<CONSOLE_URL>/api/mcp`, for example `https://console.example.com/api/mcp` |
        | **Header** | `Authorization: Bearer <YOUR_PERSONAL_ACCESS_TOKEN>` |

        If your client can't send a custom header to a remote server, run it through `mcp-remote` with the same `command` and `args` as the Claude Desktop configuration.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Restart your client and test the connection">
    Restart your MCP client, then ask it a question such as:

    ```text theme={null}
    Which Kafka clusters can you see in Conduktor?
    ```

    The assistant calls **list-clusters** and lists the clusters you have access to in Console. If it does, you're connected.
  </Step>
</Steps>

## Manage access

The token you connect with decides what the assistant can see and do:

* **Personal access token**: inherits your own permissions in Console. Use this for MCP clients.
* **Admin API key**: also works, but has admin access to every resource. Avoid it for AI assistants.

To disconnect an assistant, revoke its token in **Settings** > **API Keys**. Find out more about [revoking API keys](/guide/conduktor-in-production/automate/api-automation#revoke-api-keys).

## Troubleshoot the connection

**The assistant doesn't list some topics, consumer groups or other resources**: tools that list resources leave out the ones your token can't access, without reporting an error. Check your [permissions](/guide/conduktor-in-production/automate/mcp/tools#permissions) in Console.

**The Insights tools, query-topics or aggregate-topics are missing**: these tools are only available when Insights is enabled. Ask your admin to check the `enable_insights` setting. See [Disable Insights](/guide/insights#disable-insights).

**The client can't connect or gets an authentication error**: check that the endpoint ends in `/api/mcp` and that the token hasn't been revoked. If you use Claude Desktop, check that Node.js and npm are installed and that `npx` is on your `PATH`.

## Next steps

Find out which [tools the assistant can use](/guide/conduktor-in-production/automate/mcp/tools), and what you can ask it about your topics with [aggregate-topics](/guide/conduktor-in-production/automate/mcp/tools#analyze-topics-with-aggregate-topics).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.