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

# MCP Server Setup

> Install and configure the Babou MCP server for use with AI assistants

## Prerequisites

Before setting up the Babou MCP server, ensure you have:

* A Babou account and API key ([get one here](https://babou.ai))
* An MCP-compatible AI assistant (Claude Desktop recommended)

## Setup with Claude Desktop

The easiest way to use Babou's MCP server is through Claude Desktop.

<Steps>
  <Step title="Get Your API Key">
    1. Log in to [babou.ai](https://babou.ai)
    2. Go to **Settings** → **API Keys**
    3. Click **Create New API Key**
    4. Copy the key (starts with `sk-bab-`)
  </Step>

  <Step title="Configure Claude Desktop">
    Add the Babou MCP server to your Claude Desktop configuration:

    **Location:**

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

    **Configuration:**

    ```json theme={null}
    {
      "mcpServers": {
        "babou": {
          "url": "https://api.babou.ai/mcp",
          "apiKey": "sk-bab-your-api-key-here"
        }
      }
    }
    ```

    <Warning>
      Replace `sk-bab-your-api-key-here` with your actual API key. Keep this file secure!
    </Warning>
  </Step>

  <Step title="Restart Claude Desktop">
    Close and reopen Claude Desktop to load the new configuration.
  </Step>

  <Step title="Verify Connection">
    In Claude Desktop, ask:

    ```
    Can you check what Babou tools are available?
    ```

    Claude should respond with a list of available tools like `CreateProject`, `AddChapter`, etc.
  </Step>

  <Step title="Build your first video">
    Try a real flow:

    ```
    Create a project called "Pricing Page Refresh" and build a 30-second
    product launch ad for our new Team tier. Lead with the headline from
    our latest release notes, drop in the new pricing screenshot, and
    resolve brand colors and type from the catalog.
    ```

    Claude will use the Babou MCP tools to create the project, add a chapter, submit the prompt, and return the result.
  </Step>
</Steps>

## Authentication Options

### Option 1: API Key (Recommended)

The simplest method - include your API key directly in the configuration:

```json theme={null}
{
  "mcpServers": {
    "babou": {
      "url": "https://api.babou.ai/mcp",
      "apiKey": "sk-bab-your-api-key-here"
    }
  }
}
```

### Option 2: OAuth (Advanced)

For enhanced security, use OAuth authentication:

1. Contact support to set up OAuth for your account
2. Configure with OAuth credentials:

```json theme={null}
{
  "mcpServers": {
    "babou": {
      "url": "https://api.babou.ai/mcp",
      "oauth": {
        "clientId": "your-client-id",
        "clientSecret": "your-client-secret"
      }
    }
  }
}
```

## Configuration Options

### Basic Configuration

Minimal configuration with just an API key:

```json theme={null}
{
  "mcpServers": {
    "babou": {
      "url": "https://api.babou.ai/mcp",
      "apiKey": "sk-bab-your-api-key-here"
    }
  }
}
```

### Custom Name

Change the server name in Claude:

```json theme={null}
{
  "mcpServers": {
    "babou-video-creator": {  // Custom name
      "url": "https://api.babou.ai/mcp",
      "apiKey": "sk-bab-your-api-key-here"
    }
  }
}
```

### Multiple Environments

Set up different keys for development and production:

```json theme={null}
{
  "mcpServers": {
    "babou-dev": {
      "url": "https://api.babou.ai/mcp",
      "apiKey": "sk-bab-dev-key-here"
    },
    "babou-prod": {
      "url": "https://api.babou.ai/mcp",
      "apiKey": "sk-bab-prod-key-here"
    }
  }
}
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Claude doesn't see the Babou tools" icon="triangle-exclamation">
    **Possible causes:**

    * Configuration file has syntax errors (validate JSON)
    * Claude Desktop wasn't restarted after config changes
    * Wrong file path for the configuration file
    * API key is invalid or expired

    **Solutions:**

    1. Validate your JSON configuration (use a JSON validator)
    2. Restart Claude Desktop completely (quit and reopen)
    3. Verify the config file location for your OS
    4. Generate a new API key and update the config
  </Accordion>

  <Accordion title="Authentication errors" icon="lock">
    **Error:** `Unauthorized - Invalid API key`

    **Solutions:**

    * Check your API key is correct (no typos or extra spaces)
    * Ensure the key starts with `sk-bab-`
    * Verify the key hasn't expired in your dashboard
    * Generate a new API key if needed
  </Accordion>

  <Accordion title="Tools are slow or timing out" icon="clock">
    **Possible causes:**

    * Network connectivity issues
    * Large video processing taking time
    * Rate limiting

    **Solutions:**

    * Check your internet connection
    * Be patient - video creation takes 30-90 seconds
    * Avoid making too many rapid requests
  </Accordion>

  <Accordion title="Can't find configuration file" icon="folder">
    **macOS:**

    ```bash theme={null}
    # Create directory if it doesn't exist
    mkdir -p ~/Library/Application\ Support/Claude

    # Edit configuration
    open -e ~/Library/Application\ Support/Claude/claude_desktop_config.json
    ```

    **Windows:**

    ```powershell theme={null}
    # Create directory if it doesn't exist
    New-Item -ItemType Directory -Force -Path "$env:APPDATA\Claude"

    # Edit configuration
    notepad "$env:APPDATA\Claude\claude_desktop_config.json"
    ```
  </Accordion>
</AccordionGroup>

## Security Best Practices

<Warning>
  Your API key provides full access to your Babou account. Keep it secure!
</Warning>

1. **Never share your API key**
   * Don't commit it to version control
   * Don't share screenshots with the key visible
   * Don't post it in support tickets (we'll never ask for it)

2. **Use separate keys for different purposes**
   * Development key for testing
   * Production key for real usage
   * Team keys for shared access

3. **Rotate keys regularly**
   * Create new keys periodically
   * Delete old keys after rotation
   * Update configurations promptly

4. **Monitor key usage**
   * Check your dashboard for unexpected activity
   * Review API usage logs
   * Set up alerts for unusual patterns

## Testing Your Setup

Once configured, test the MCP server with these commands in Claude:

```
1. "List my Babou video projects"
   (Should return your existing projects or an empty list)

2. "Create a test project called 'MCP Test'"
   (Should create a new project and return its ID)

3. "What tools do you have for Babou?"
   (Should list all 6 available tools)
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Tool Reference" icon="wrench" href="/mcp/tools/create-project">
    Learn about all available tools
  </Card>

  <Card title="Examples" icon="code" href="/mcp/examples">
    See complete workflow examples
  </Card>

  <Card title="MCP Overview" icon="circle-info" href="/mcp/overview">
    Understand how MCP works
  </Card>

  <Card title="REST API" icon="webhook" href="/api-reference/overview">
    Use the REST API directly
  </Card>
</CardGroup>
