# Constellation MCP server

> Provides AI coding assistants with intelligent access to codebase structure, dependencies, and relationships using metadata-based knowledge graphs.

- Repository: https://github.com/ShiftinBits/constellation-mcp
- Page: https://hostedmcp.org/servers/shiftinbits/constellation-mcp
- Transport: stdio
- Stars: 3
- License: AGPL-3.0
- Latest version: 1.3.0

## Install

### Claude Code

```sh
claude mcp add --env 'CONSTELLATION_ACCESS_KEY=<YOUR_CONSTELLATION_ACCESS_KEY>' constellation-mcp -- npx -y @constellationdev/mcp
```

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

```json
{
  "mcpServers": {
    "constellation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@constellationdev/mcp"
      ],
      "env": {
        "CONSTELLATION_ACCESS_KEY": "<YOUR_CONSTELLATION_ACCESS_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "constellation-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@constellationdev/mcp"
      ],
      "env": {
        "CONSTELLATION_ACCESS_KEY": "<YOUR_CONSTELLATION_ACCESS_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"constellation-mcp","type":"stdio","command":"npx","args":["-y","@constellationdev/mcp"],"env":{"CONSTELLATION_ACCESS_KEY":"<YOUR_CONSTELLATION_ACCESS_KEY>"}}'
```

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

```json
{
  "mcpServers": {
    "constellation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@constellationdev/mcp"
      ],
      "env": {
        "CONSTELLATION_ACCESS_KEY": "<YOUR_CONSTELLATION_ACCESS_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add constellation-mcp --env 'CONSTELLATION_ACCESS_KEY=<YOUR_CONSTELLATION_ACCESS_KEY>' -- npx -y @constellationdev/mcp
```

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

```toml
[mcp_servers.constellation-mcp]
command = "npx"
args = ["-y", "@constellationdev/mcp"]

[mcp_servers.constellation-mcp.env]
CONSTELLATION_ACCESS_KEY = "<YOUR_CONSTELLATION_ACCESS_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'CONSTELLATION_ACCESS_KEY=<YOUR_CONSTELLATION_ACCESS_KEY>' constellation-mcp npx -- -y @constellationdev/mcp
```

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

```json
{
  "mcpServers": {
    "constellation-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@constellationdev/mcp"
      ],
      "env": {
        "CONSTELLATION_ACCESS_KEY": "<YOUR_CONSTELLATION_ACCESS_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CONSTELLATION_ACCESS_KEY` | yes | yes | Your Constellation access key |

## FAQ

### Does Constellation transmit my source code?

No, the service only transmits structural metadata and relationships, never the raw source code.

### How do I install the Constellation MCP server?

You can add it to your AI assistant's configuration using npx to run @constellationdev/mcp@latest with a CONSTELLATION_ACCESS_KEY environment variable.

### How does the code analysis process work?

A CLI tool analyzes the source code in your environment to extract structural metadata like functions, classes, and imports, which is then uploaded to a knowledge graph.
