# Context Engine MCP server

> Compresses noisy logs, RAG retrieval chunks, and code context into structured, high-signal inputs optimized for LLMs.

- Repository: https://github.com/melonelish/context-engine
- Page: https://hostedmcp.org/servers/melonelish/context-engine
- Transport: stdio
- Stars: 324
- License: MIT
- Latest version: 0.1.0

## Install

### Claude Code

```sh
claude mcp add context-engine -- uvx melonelish-context-engine
```

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

```json
{
  "mcpServers": {
    "context-engine": {
      "command": "uvx",
      "args": [
        "melonelish-context-engine"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "context-engine": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "melonelish-context-engine"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "context-engine": {
      "command": "uvx",
      "args": [
        "melonelish-context-engine"
      ]
    }
  }
}
```

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

```toml
[mcp_servers.context-engine]
command = "uvx"
args = ["melonelish-context-engine"]
```

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

```json
{
  "mcpServers": {
    "context-engine": {
      "command": "uvx",
      "args": [
        "melonelish-context-engine"
      ]
    }
  }
}
```

## FAQ

### What modes does Context Engine support?

It supports three specialized modes: logs for root cause extraction, rag for question-aware evidence reordering, and code for minimal repair context.

### How can I use Context Engine with an MCP client?

You can use it as an MCP Server by running the command `context-engine-mcp`, which exposes the `compress_context` tool.

### What are the input limitations for security?

The engine has built-in limits including a maximum single text length of 200,000 characters, a maximum of 64 structured items, and a maximum input file size of 2,000,000 bytes.
