# Open Context Engine MCP server

> Indexes codebases locally using AST-aware chunking and hybrid search to provide semantic and keyword retrieval for AI agents via MCP.

- Repository: https://github.com/Dhaxor/open-context-engine
- Page: https://hostedmcp.org/servers/dhaxor/open-context-engine
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.7.1

## Install

### Claude Code

```sh
claude mcp add open-context-engine -- npx -y @dhaxor/open-context
```

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

```json
{
  "mcpServers": {
    "open-context-engine": {
      "command": "npx",
      "args": [
        "-y",
        "@dhaxor/open-context"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "open-context-engine": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dhaxor/open-context"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"open-context-engine","type":"stdio","command":"npx","args":["-y","@dhaxor/open-context"]}'
```

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

```json
{
  "mcpServers": {
    "open-context-engine": {
      "command": "npx",
      "args": [
        "-y",
        "@dhaxor/open-context"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add open-context-engine -- npx -y @dhaxor/open-context
```

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

```toml
[mcp_servers.open-context-engine]
command = "npx"
args = ["-y", "@dhaxor/open-context"]
```

### Gemini CLI

```sh
gemini mcp add -s user open-context-engine npx -- -y @dhaxor/open-context
```

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

```json
{
  "mcpServers": {
    "open-context-engine": {
      "command": "npx",
      "args": [
        "-y",
        "@dhaxor/open-context"
      ]
    }
  }
}
```

## FAQ

### Does my code leave my machine?

No, the engine is local-first and designed so that no code leaves your machine.

### What programming languages are supported for AST-aware chunking?

It understands TypeScript, JavaScript, Python, Go, Rust, Java, C#, C, C++, Ruby, PHP, Kotlin, and Swift.

### Can I use it without an API key?

Yes, you can use local in-process ONNX embeddings or Ollama for a completely free, offline experience.

### How does the engine handle search results?

It uses hybrid search, fusing dense vector similarity with BM25 keyword search via Reciprocal Rank Fusion.
