Context-Engine

作者 m1rl0k

Context-Engine MCP - Agentic Context Compression Suite

276
Stars
33
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/m1rl0k/Context-Engine

快速入门

使用 Context-Engine 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

CI npm version VS Code Marketplace Join our Discord

Documentation: Getting Started · README · Configuration · IDE Clients · MCP API · ctx CLI · Memory Guide · Architecture · Multi-Repo · Observability · Kubernetes · VS Code Extension · Troubleshooting · Development

Context-Engine

Open-core, self-improving code search that gets smarter every time you use it.

Quick Start: Stack in 30 Seconds

VS Code Extension (Easiest)

  • Install Context Engine Uploader

  • Open any project → extension prompts to set up Context-Engine stack

  • Opened workspace is indexed

  • MCP configs can configure your agent/IDE

That's it! The extension handles everything:

  • Clones Context-Engine to your chosen location (keeps it separate from your project)

  • Starts the Docker stack automatically

  • Sets up MCP bridge configuration

  • Writes MCP configs for Claude Code, Windsurf, and Augment

Claude Code users: Install the skill plugin:

/plugin marketplace add m1rl0k/Context-Engine
/plugin install context-engine

Manual Setup (Alternative)

git clone https://github.com/m1rl0k/Context-Engine.git && cd Context-Engine
make bootstrap  # One-shot: up → wait → index → warm → health

Or step-by-step:

docker compose up -d
HOST_INDEX_PATH=/path/to/your/project docker compose run --rm indexer

See Configuration for environment variables and IDE_CLIENTS.md for MCP setup.

Why This Stack Works Better

Problem Context-Engine Solution

Large file chunks → returns entire files Precise spans: Returns 5-50 line chunks, not whole files

Lost context → missing relevant code Hybrid search: Semantic + lexical + cross-encoder reranking

Cloud dependency → vendor lock-in Local stack: Docker Compose on your machine

Static knowledge → never improves Adaptive learning: Gets smarter with every use

Tool limits → only works in specific IDEs MCP native: Works with any MCP-compatible tool

What You Get Out of the Box

  • ReFRAG-inspired micro-chunking: Research-grade precision retrieval

  • Self-hosted stack: No cloud dependency, no vendor lock-in

  • Universal compatibility: Claude Code, Windsurf, Cursor, Cline, etc.

  • Auto-syncing: Extension watches for changes and re-indexes automatically

  • Memory system: Store team knowledge alongside your code

  • Optional LLM features: Local decoder (llama.cpp), cloud integration (GLM, MiniMax), adaptive rerank learning

Works With Your Local Files

No complicated path setup - Context-Engine automatically handles the mapping between your local files and the search index.

Enterprise-Ready Features

  • Built-in authentication with session management (optional)

  • Unified MCP endpoint that combines indexer and memory services

  • Automatic collection injection for workspace-aware queries

Alternative: Direct HTTP endpoints

{
  "mcpServers": {
    "qdrant-indexer": { "url": "http://localhost:8003/mcp" },
    "memory": { "url": "http://localhost:8002/mcp" }
  }
}

Using other IDEs? See docs/IDE_CLIENTS.md for complete MCP configuration examples.

Supported Clients

Client Transport

Claude Code SSE / RMCP

Cursor SSE / RMCP

Windsurf SSE / RMCP

Cline SSE / RMCP

Roo SSE / RMCP

OpenCode RMCP

Augment SSE

Codex RMCP

Copilot RMCP

AmpCode RMCP

Kiro RMCP

Antigravity RMCP

Zed SSE (via mcp-remote)

Endpoints

Service URL

Indexer MCP (SSE) http://localhost:8001/sse

Indexer MCP (RMCP) http://localhost:8003/mcp

Memory MCP (SSE) http://localhost:8000/sse

Memory MCP (RMCP) http://localhost:8002/mcp

Qdrant http://localhost:6333

Upload Service http://localhost:8004

VS Code Extension

Context Engine Uploader provides:

  • One-click upload — Sync workspace to Context-Engine

  • Auto-sync — Watch for changes and re-index automatically

  • Prompt+ button — Enhance prompts with code context before sending

  • MCP auto-config — Writes Claude/Windsurf MCP configs

See docs/vscode-extension.md for full documentation.

MCP Tools

Search (Indexer MCP):

  • repo_search — Hybrid code search with filters

  • context_search — Blend code + memory results

  • context_answer — LLM-generated answers with citations

  • search_tests_for, search_config_for, search_callers_for

Memory (Memory MCP):

  • store — Save knowledge with metadata

  • find — Retrieve stored memories

Indexing:

  • qdrant_index_root — Index the workspace

  • qdrant_status — Check collection health

  • qdrant_prune — Remove stale entries

See docs/MCP_API.md for complete API reference.

Documentation

Guide Description

Getting Started VS Code + dev-remote walkthrough

IDE Clients Config examples for all supported clients

Configuration Environment variables reference

MCP API Full tool documentation

Architecture System design

Multi-Repo Multiple repositories in one collection

Kubernetes Production deployment

How It Works

flowchart LR
  subgraph Your Machine
    A[IDE / AI Tool]
    V[VS Code Extension]
  end
  subgraph Docker
    U[Upload Service]
    I[Indexer MCP]
    M[Memory MCP]
    Q[(Qdrant)]
    L[[LLM Decoder]]
    W[[Learning Worker]]
  end
  V -->|sync| U
  U --> I
  A -->|MCP| I
  A -->|MCP| M
  I --> Q
  M --> Q
  I -.-> L
  I -.-> W
  W -.-> Q

Language Support

Python, TypeScript/JavaScript, Go, Java, Rust, C#, PHP, Shell, Terraform, YAML, PowerShell

Benchmarks

CoSQA (Dense Retrieval, No Rerank)

Method MRR R@1 R@5 R@10 NDCG@10

Context-Engine (Jina-Code) 0.276 0.146 0.448 0.658 0.365

Context-Engine (BGE-base) 0.253 0.150 0.374 0.550 0.322

CodeT5+ embedding 0.266

BM25 (Lucene) 0.167

BoW 0.065

Corpus: 20,604 code snippets | 500 queries | Pure dense retrieval, no reranking Jina-Code: jinaai/jina-embeddings-v2-base-code (code-specific, 8k context)

CoIR Benchmark (Full Corpus, Dense Retrieval)

Benchmark Corpus Queries NDCG@10

CodeSearchNet-Python 280K 14.9K 74.37%

CodeSearchNet-Go 280K 14.9K 74.51%

CodeSearchNet-JavaScript 280K 14.9K 57.19%

Full CoIR corpus evaluation with dense retrieval (Jina-Code embeddings)

License

BUSL-1.1

常见问题

What is Context-Engine?

Context-Engine is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by m1rl0k. Context-Engine MCP - Agentic Context Compression Suite. It has 276 GitHub stars.

Is Context-Engine safe to use?

Context-Engine returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install Context-Engine?

Clone the repository with "git clone https://github.com/m1rl0k/Context-Engine" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is Context-Engine written in?

Context-Engine is primarily written in Python. It is open-source under m1rl0k on GitHub, so you can review or fork the full source.

Are there alternatives to Context-Engine?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Context-Engine against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情