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

# Claude Code CLI

> Connect Claude Code CLI to the Danube MCP Server

## Prerequisites

Before starting with Claude Code CLI, ensure you have **Node.js and npm** installed:

```bash theme={null}
node --version
npm --version
```

If not installed, download from [nodejs.org](https://nodejs.org/).

Install Claude Code CLI globally using npm:

```bash theme={null}
npm install -g @anthropic-ai/claude-code
```

After installation, verify the `claude` command is available:

```bash theme={null}
claude --version
```

## Setup

<Steps>
  <Step title="Add the Danube MCP Server">
    Use the Claude Code CLI command to add Danube as a remote HTTP server:

    ```bash theme={null}
    claude mcp add --transport http danube https://mcp.danubeai.com/mcp \
      --header "danube-api-key: YOUR_API_KEY"
    ```

    <Tip>
      Already set up Danube in Claude Desktop? Import it directly:

      ```bash theme={null}
      claude mcp add-from-claude-desktop
      ```
    </Tip>
  </Step>

  <Step title="Verify Connection">
    Launch Claude Code CLI and use the `/mcp` command to verify the connection:

    ```bash theme={null}
    claude code
    ```

    Then in Claude Code CLI, type:

    ```
    /mcp
    ```

    You should see the `danube` server listed and connected.
  </Step>
</Steps>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Command not found: claude">
    If you see "Unknown command: claude" or "command not found":

    1. **Verify installation**:
       ```bash theme={null}
       npm list -g @anthropic-ai/claude-code
       ```

    2. **Check npm global bin directory**:
       ```bash theme={null}
       npm config get prefix
       ```
       The `claude` command should be in `{prefix}/bin/`

    3. **Add to PATH** (if needed):

       On macOS/Linux, add to `~/.zshrc`, `~/.bashrc`, or `~/.config/fish/config.fish`:

       ```bash theme={null}
       export PATH="$(npm config get prefix)/bin:$PATH"
       ```

       Then restart your terminal or run `source ~/.zshrc`

    4. **Reinstall if needed**:
       ```bash theme={null}
       npm uninstall -g @anthropic-ai/claude-code
       npm install -g @anthropic-ai/claude-code
       ```
  </Accordion>

  <Accordion title="Config not loading">
    * Verify the config file path is correct
    * Check JSON syntax (no trailing commas)
    * Restart the CLI
  </Accordion>

  <Accordion title="401 Unauthorized">
    * Verify your API key is correct
    * Ensure the header is `danube-api-key` (lowercase)
    * Check that the API key hasn't expired or been revoked
  </Accordion>
</AccordionGroup>

***

## Recommended: Add the Agent Skill

For the best experience with Claude Code CLI and Danube, we recommend adding the [Agent Skill](/skill). The Agent Skill teaches Claude how to effectively discover and use tools through the Danube MCP Server, providing better tool discovery patterns, authentication handling, and workflow guidance.

<Card title="Learn About the Agent Skill" icon="book" href="/skill">
  See installation instructions and learn how the skill enhances Claude's ability to use Danube
</Card>
