# CodeAlive MCP server

> Lets AI assistants semantically search and read indexed codebases, inspect file trees, and trace code relationships via MCP.

- Repository: https://github.com/CodeAlive-AI/codealive-mcp
- Page: https://hostedmcp.org/servers/codealive-ai/codealive-mcp
- Transport: stdio
- Stars: 91
- License: MIT
- Latest version: 3.0.3

## Install

### Claude Code

```sh
claude mcp add --env CODEALIVE_API_KEY=<YOUR_CODEALIVE_API_KEY> codealive-mcp -- docker run -i --rm ghcr.io/codealive-ai/codealive-mcp:3.0.3
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "codealive-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/codealive-ai/codealive-mcp:3.0.3"
      ],
      "env": {
        "CODEALIVE_API_KEY": "<YOUR_CODEALIVE_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "codealive-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/codealive-ai/codealive-mcp:3.0.3"
      ],
      "env": {
        "CODEALIVE_API_KEY": "<YOUR_CODEALIVE_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "codealive-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/codealive-ai/codealive-mcp:3.0.3"
      ],
      "env": {
        "CODEALIVE_API_KEY": "<YOUR_CODEALIVE_API_KEY>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.codealive-mcp]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/codealive-ai/codealive-mcp:3.0.3"]

[mcp_servers.codealive-mcp.env]
CODEALIVE_API_KEY = "<YOUR_CODEALIVE_API_KEY>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "codealive-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/codealive-ai/codealive-mcp:3.0.3"
      ],
      "env": {
        "CODEALIVE_API_KEY": "<YOUR_CODEALIVE_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CODEALIVE_API_KEY` | yes | yes | Your CodeAlive API key. Get one at https://app.codealive.ai/ under MCP & API. |
| `CODEALIVE_MCP_ALLOWED_HOSTS` | no | no |  |
| `CODEALIVE_MCP_ALLOWED_ORIGINS` | no | no |  |

## Tools (11)

- `get_data_sources`
- `semantic_search`
- `grep_search`
- `get_repository_ontology`
- `get_file_tree`
- `read_file`
- `fetch_artifacts`
- `get_artifact_relationships`
- `get_artifact_query_schema`
- `query_artifact_metadata`
- `chat`

## FAQ

### What does CodeAlive MCP let an AI assistant do?

It gives AI clients semantic code search, exact grep search, file reading, file tree inspection, and artifact relationship lookups across indexed repositories.

### How do I authenticate with the CodeAlive MCP server?

You create an API key in the CodeAlive app under MCP & API and send it as a Bearer token in the Authorization header, or set CODEALIVE_API_KEY for local runs.

### Which search tools should an agent use first?

semantic_search and grep_search are the default tools; chat is a slower stateless synthesis fallback used only when explicitly requested.

### Can I self-host the CodeAlive MCP server?

Yes, it can be run locally over HTTP with Python 3.11+ and uv, with configurable allowed hosts and origins for shared deployments.
