# Cortex MCP server

> Indexes a local repository so coding agents can search code, follow symbol relationships, and check change impact.

- Repository: https://github.com/DanielBlomma/cortex
- Page: https://hostedmcp.org/servers/danielblomma/cortex
- Transport: stdio
- Stars: 19
- Latest version: 0.4.2

## Install

### Claude Code

```sh
claude mcp add cortex -- npx -y @danielblomma/cortex-mcp
```

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "npx",
      "args": [
        "-y",
        "@danielblomma/cortex-mcp"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "cortex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@danielblomma/cortex-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "npx",
      "args": [
        "-y",
        "@danielblomma/cortex-mcp"
      ]
    }
  }
}
```

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

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

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "npx",
      "args": [
        "-y",
        "@danielblomma/cortex-mcp"
      ]
    }
  }
}
```

## FAQ

### Does Cortex send my code to a remote service?

No. The index is built and queried locally, and the code stays on your machine.

### Does Cortex require an MCP connection?

No. Agents run Cortex CLI commands directly; MCP is optional for clients that explicitly require it.

### How do I set up Cortex in my project?

Install the npm package globally, then run cortex init --bootstrap in the project directory. This indexes the repo, adds instructions to AGENTS.md, installs Git hooks, and starts the watcher.

### How do I keep the index up to date?

Git hooks and a background watcher normally update Cortex automatically, but you can run cortex update manually after large changes.

### How do I analyze what a change might affect?

Run cortex impact on a topic to estimate the blast radius before refactoring.
