Skip to content
Conduit

mcp server

context-engine

Open-source platform for deterministic, token-aware context selection for AI agents and LLMs

contextenginehq/context-enginecommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 21, 2026

Context Engine

The Context Engine is an open-source platform for deterministic, token-aware context selection. It helps AI agents and LLM applications retrieve exactly the right context within budget constraints.

Architecture

context-engine (you are here)
├── context-core        — Core library: scoring, selection, caching
├── context-cli         — CLI: build, resolve, inspect commands
├── context-mcp-server  — MCP server: JSON-RPC 2.0 stdio transport
├── context-compat      — Compatibility test harness
├── context-specs       — Protocol specifications and ADRs
├── context-docs        — Documentation site
├── context-examples    — Example integrations
├── context-sdk-js      — JavaScript/TypeScript SDK (planned)
└── context-sdk-python  — Python SDK (planned)

Quick Start

# Build the CLI
git clone https://github.com/contextenginehq/context-cli.git
cd context-cli
cargo build --release

# Build a context cache from your documents
./target/release/context build --sources ./docs --cache ./my-cache

# Resolve context for a query within a token budget
./target/release/context resolve --cache ./my-cache --query "deployment" --budget 4000

MCP Integration

The Context Engine exposes its capabilities through the Model Context Protocol, making it compatible with any MCP-aware AI agent.

# Start the MCP server
git clone https://github.com/contextenginehq/context-mcp-server.git
cd context-mcp-server
cargo build --release
./target/release/mcp-context-server --cache-root ./caches

Key Properties

  • Deterministic: Same input always produces identical output, byte-for-byte
  • Token-aware: Respects token budgets for LLM context windows
  • Versioned caches: Backward-compatible cache format with version tracking
  • Frozen contracts: v0 output schemas, error codes, and behaviors are locked

Repositories

RepositoryDescriptionStatus
context-coreCore scoring and selection libraryv0.1.0
context-cliCommand-line interfacev0.1.0
context-mcp-serverMCP serverv0.1.0
context-compatCompatibility test harnessv0.1.0
context-specsProtocol specificationsv0
context-docsDocumentationActive
context-examplesExample integrationsActive
context-sdk-jsJavaScript SDKPlanned
context-sdk-pythonPython SDKPlanned

License

Apache-2.0


"Context Engine" is a trademark of Context Engine Contributors. The software is open source under the Apache License 2.0. The trademark is not licensed for use by third parties to market competing products or services without prior written permission.

↑↓ navigate openesc close