# Cortex MCP server

> Provides semantic search over a local knowledge base to let AI clients find relevant document passages without consuming context windows.

- Repository: https://github.com/VBlackJack/Cortex
- Page: https://hostedmcp.org/servers/vblackjack/cortex
- Transport: stdio
- Stars: 1
- License: Apache-2.0
- Latest version: 2026.1021.3

## Install

### Claude Code

```sh
claude mcp add --env CORTEX_KB_PATH=<CORTEX_KB_PATH> cortex -- uvx cortex-local-rag
```

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "uvx",
      "args": [
        "cortex-local-rag"
      ],
      "env": {
        "CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "cortex": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "cortex-local-rag"
      ],
      "env": {
        "CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "uvx",
      "args": [
        "cortex-local-rag"
      ],
      "env": {
        "CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
      }
    }
  }
}
```

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

```toml
[mcp_servers.cortex]
command = "uvx"
args = ["cortex-local-rag"]

[mcp_servers.cortex.env]
CORTEX_KB_PATH = "<CORTEX_KB_PATH>"
```

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

```json
{
  "mcpServers": {
    "cortex": {
      "command": "uvx",
      "args": [
        "cortex-local-rag"
      ],
      "env": {
        "CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CORTEX_KB_PATH` | yes | no | Absolute path to the local knowledge base Cortex indexes and serves. |

## Tools (4)

- `cortex_search`
- `cortex_sync`
- `cortex_list_sections`
- `cortex_freshness`

## FAQ

### Does Cortex send my document content to the cloud?

No, Cortex processes and indexes the knowledge base locally without sending its content.

### What languages does the semantic search support?

The search is multilingual, supporting both French and English.

### Can I use Cortex with Confluence?

Yes, there is an optional Confluence writer that downloads explicitly allowlisted spaces.
