> ## 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.

# Amazon Q Developer

> Connect CodeAlive with Amazon Q Developer CLI and IDE

## Overview

Connect CodeAlive with Amazon Q Developer for AI-powered development with deep codebase understanding. Amazon Q has two integration points: the CLI and the IDE plugin (VS Code / JetBrains).

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

## Prerequisites

* Amazon Q Developer CLI or IDE plugin
* CodeAlive account with API key ([Sign up here](https://app.codealive.ai))
* Indexed repositories in your CodeAlive dashboard

## Setup

<Tabs>
  <Tab title="Q Developer CLI">
    <Steps>
      <Step title="Locate Config File">
        Amazon Q CLI reads MCP configuration from:

        * **Global:** `~/.aws/amazonq/mcp.json`
        * **Workspace:** `.amazonq/mcp.json`
      </Step>

      <Step title="Add CodeAlive Server">
        <Tabs>
          <Tab title="HTTP (Recommended)">
            ```json theme={null}
            {
              "mcpServers": {
                "codealive": {
                  "type": "http",
                  "url": "https://mcp.codealive.ai/api",
                  "headers": {
                    "Authorization": "Bearer YOUR_API_KEY_HERE"
                  }
                }
              }
            }
            ```
          </Tab>

          <Tab title="Docker (STDIO)">
            ```json theme={null}
            {
              "mcpServers": {
                "codealive": {
                  "type": "stdio",
                  "command": "docker",
                  "args": [
                    "run", "--rm", "-i",
                    "-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
                    "ghcr.io/codealive-ai/codealive-mcp:main"
                  ]
                }
              }
            }
            ```
          </Tab>
        </Tabs>

        Replace `YOUR_API_KEY_HERE` with your actual CodeAlive API key.
      </Step>

      <Step title="Restart Q Developer CLI">
        Restart the CLI to pick up the new configuration.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Q Developer IDE (VS Code / JetBrains)">
    <Steps>
      <Step title="Locate Config File">
        Amazon Q IDE plugin reads from:

        * **Global:** `~/.aws/amazonq/agents/default.json`
        * **Workspace:** `.aws/amazonq/agents/default.json`
      </Step>

      <Step title="Add CodeAlive Server">
        ```json theme={null}
        {
          "mcpServers": {
            "codealive": {
              "type": "http",
              "url": "https://mcp.codealive.ai/api",
              "headers": {
                "Authorization": "Bearer YOUR_API_KEY_HERE"
              },
              "timeout": 310000
            }
          }
        }
        ```

        Replace `YOUR_API_KEY_HERE` with your actual CodeAlive API key.

        Or use the IDE UI: **Q panel → Chat → tools icon → Add MCP Server** → choose HTTP or STDIO.
      </Step>

      <Step title="Restart IDE">
        Restart VS Code or your JetBrains IDE to load the configuration.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Usage

Once connected, Amazon Q Developer can:

* **Search your codebase** semantically across all indexed repositories
* **Answer architecture questions** with full project context
* **Find patterns and implementations** across multiple services

```
"Find all API endpoints in the user service"
"Explain how the payment flow works"
"Show me error handling patterns"
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="MCP server not detected">
    1. Verify the config file location matches your setup (CLI vs IDE)
    2. Check JSON syntax
    3. Restart the CLI or IDE
  </Accordion>

  <Accordion title="Authentication errors">
    1. Verify your API key is correct
    2. Ensure `Bearer ` prefix is included in the Authorization header
    3. Try regenerating your API key in the [dashboard](https://app.codealive.ai)
  </Accordion>

  <Accordion title="IDE UI setup not persisting">
    Use the config file method instead of the UI for reliable persistence.
  </Accordion>
</AccordionGroup>

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

## Related Resources

* [MCP Overview](/integrations/mcp)
* [Installation Guide](/installation)
* [Self-Hosting Guide](/integrations/mcp/self-hosting)
* [Agent Skills](/integrations/skills)

## 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).
