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

# Continue

> Connect CodeAlive with Continue open-source AI code assistant

## Overview

Integrate CodeAlive with Continue - the first client to offer full support for all MCP features (Resources, Prompts, Tools, and Sampling). Continue is an open-source platform that lets you build custom AI code agents with any model, without vendor lock-in.

<Tip>
  **Quick install:** Run `npx @codealive/installer` to automatically configure CodeAlive for Continue.
  See the [Installation Guide](/installation) for details.
</Tip>

## Prerequisites

* [Continue](https://continue.dev) extension installed in VS Code or JetBrains IDE
* CodeAlive account with API key ([Sign up here](https://app.codealive.ai))
* Indexed repositories in your CodeAlive dashboard

## Configuring Continue with CodeAlive

<Steps>
  <Step title="Install Continue">
    Follow the installation steps above for your IDE
  </Step>

  <Step title="Open Continue Config">
    Access Continue configuration:

    **VS Code:**

    * Click Continue icon in sidebar
    * Click gear icon → "Open config.json"

    **JetBrains:**

    * Open Continue panel
    * Settings → Configuration
  </Step>

  <Step title="Add CodeAlive MCP">
    Continue has full MCP support. Create or edit `~/.continue/config.yaml`:

    ```yaml theme={null}
    mcpServers:
      - name: CodeAlive
        type: streamable-http
        url: https://mcp.codealive.ai/api
        requestOptions:
          headers:
            Authorization: "Bearer YOUR_API_KEY_HERE"
    ```

    Replace `YOUR_API_KEY_HERE` with your actual CodeAlive API key.

    <Info>
      Continue maps MCP features to its existing capabilities:

      * Resources → Context sources
      * Prompts → Slash commands
      * Tools → Tool integrations
      * Sampling → Model configurations
    </Info>
  </Step>

  <Step title="Restart IDE">
    Restart your IDE to load the new configuration
  </Step>

  <Step title="Verify Integration">
    Type `@codealive` in Continue chat to test:

    * "@codealive what repositories are available?"
    * "@codealive find authentication code"
  </Step>
</Steps>

## Configuration Options

### Docker Setup (STDIO)

For local deployment or enhanced privacy:

```yaml theme={null}
mcpServers:
  - name: CodeAlive
    type: stdio
    command: docker
    args:
      - run
      - --rm
      - -i
      - -e
      - CODEALIVE_API_KEY=YOUR_API_KEY_HERE
      - ghcr.io/codealive-ai/codealive-mcp:main
```

## Usage Patterns

<Tabs>
  <Tab title="Context Provider">
    Use `@codealive` to add context to your prompts:

    ```
    @codealive find the user authentication flow
    Then explain how to add OAuth support
    ```
  </Tab>

  <Tab title="Slash Commands">
    Create custom slash commands:

    ```json theme={null}
    {
      "slashCommands": [
        {
          "name": "search",
          "description": "Search codebase with CodeAlive",
          "run": "@codealive search for {{{input}}}"
        },
        {
          "name": "explain",
          "description": "Explain code with context",
          "run": "@codealive explain {{{input}}}"
        }
      ]
    }
    ```
  </Tab>

  <Tab title="Auto-Context">
    Automatically include CodeAlive context:

    ```json theme={null}
    {
      "contextProviders": [
        {
          "name": "codealive",
          "provider": "mcp",
          "autoInclude": true,
          "config": {
            "serverUrl": "https://mcp.codealive.ai/api",
            "headers": {
              "Authorization": "Bearer YOUR_API_KEY"
            }
          }
        }
      ]
    }
    ```
  </Tab>
</Tabs>

## Advanced Features

### Custom Models with CodeAlive

Configure Continue to use CodeAlive with different models:

```json theme={null}
{
  "models": [
    {
      "title": "GPT-4 with CodeAlive",
      "model": "gpt-4",
      "provider": "openai",
      "contextProviders": ["codealive"]
    },
    {
      "title": "Claude with CodeAlive",
      "model": "claude-3-opus",
      "provider": "anthropic",
      "contextProviders": ["codealive"]
    },
    {
      "title": "Local Ollama with CodeAlive",
      "model": "codellama",
      "provider": "ollama",
      "contextProviders": ["codealive"]
    }
  ]
}
```

### Repository Filtering

Limit CodeAlive searches to specific repositories:

```json theme={null}
{
  "contextProviders": [
    {
      "name": "codealive-backend",
      "provider": "mcp",
      "config": {
        "serverUrl": "https://mcp.codealive.ai/api",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        },
        "filters": {
          "repositories": ["backend", "api"]
        }
      }
    }
  ]
}
```

### Custom Prompts

Create templates that leverage CodeAlive:

```json theme={null}
{
  "customPrompts": [
    {
      "name": "Code Review",
      "prompt": "@codealive find similar code to:\n\n{{{input}}}\n\nReview for best practices and suggest improvements"
    },
    {
      "name": "Test Generation",
      "prompt": "@codealive analyze:\n\n{{{input}}}\n\nGenerate comprehensive unit tests"
    }
  ]
}
```

## IDE-Specific Setup

<AccordionGroup>
  <Accordion title="VS Code">
    Additional VS Code settings:

    ```json theme={null}
    {
      "continue.telemetry": false,
      "continue.enableTabAutocomplete": true,
      "continue.contextProviders.codealive.enabled": true
    }
    ```
  </Accordion>

  <Accordion title="JetBrains">
    JetBrains-specific configuration:

    ```json theme={null}
    {
      "jetbrains": {
        "enabled": true,
        "port": 65432
      },
      "mcpServers": {
        "codealive": {
          "type": "http",
          "url": "https://mcp.codealive.ai/api",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Vim/Neovim">
    For Neovim with Continue:

    ```lua theme={null}
    -- In your Neovim config
    require('continue').setup({
      mcp_servers = {
        codealive = {
          type = 'http',
          url = 'https://mcp.codealive.ai/api',
          headers = {
            Authorization = 'Bearer YOUR_API_KEY'
          }
        }
      }
    })
    ```
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="@codealive not recognized">
    **Solutions:**

    1. Check config.json syntax is valid
    2. Restart IDE completely
    3. Verify contextProviders section exists
    4. Check Continue logs for errors
  </Accordion>

  <Accordion title="No context returned">
    **Solutions:**

    1. Verify API key is valid
    2. Check repositories are indexed
    3. Test MCP server URL directly
    4. Review Continue debug output
  </Accordion>

  <Accordion title="Slow performance">
    **Solutions:**

    1. Use more specific queries
    2. Limit repository scope
    3. Consider Docker deployment
    4. Check network latency
  </Accordion>
</AccordionGroup>

<Tip>
  For more solutions, see the [Troubleshooting Guide](/troubleshooting).
</Tip>

## Best Practices

<CardGroup cols={2}>
  <Card title="Context Usage" icon="layer-group">
    Use @codealive for large context needs, reducing token usage
  </Card>

  <Card title="Model Selection" icon="robot">
    Pair faster models with CodeAlive for better performance
  </Card>

  <Card title="Caching" icon="database">
    Enable Continue's cache for repeated queries
  </Card>

  <Card title="Privacy" icon="shield">
    Use Docker or self-hosted for sensitive code
  </Card>
</CardGroup>

## Related Resources

* [MCP Overview](/integrations/mcp)
* [Continue Documentation](https://continue.dev/docs)
* [Self-Hosting Guide](/integrations/mcp/self-hosting)
* [API Reference](/api-reference/toolapi/list-visible-data-sources)

## Instruct Your Agent

Connecting CodeAlive makes its tools available, but the agent may still default to its built-in search. For reliable results, add a short instruction in the agent's native format telling it to prefer `semantic_search` and `grep_search` when exploring indexed code. See [Instructing Coding Agents](https://docs.codealive.ai/guides/instructing-agents).
