Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyProgramming

Context Engine

Lets your AI agent compress logs, search results and code files into short, ranked context before sending them to the model.

322 stars on GitHubby melonelishLicense MITUpdated 5 months ago

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

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

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Compress this 5,000-line log and show me the likely root cause.
Re-rank these retrieved chunks for the question why did checkout fail.

What it is

Context Engine cleans up long, noisy input so the model sees only the useful parts. It has three modes: logs, rag and code. It exposes one MCP tool, compress_context, and also works as a command line tool and Python package.

What it can do

  • compress_context: compress logs, rag or code context within a budget
  • logs mode: keep likely root cause and traceback tail, fold repeated noise
  • rag mode: re-rank retrieved chunks around the question
  • code mode: rank hotspot files from an issue and test output
  • Returns structured results or structured errors with a hint

When to use

  • β€ΊWhen you have a very long log and only need the likely cause
  • β€ΊWhen search results contain many chunks and only a few answer the question
  • β€ΊWhen you need to choose which files matter for fixing a failing test

What you need

Python 3.11 to 3.13 and pip install "melonelish-context-engine[mcp]". No account is mentioned.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free?

It uses the MIT license and installs from PyPI. The readme does not mention a price.

How do I start the MCP server?

After installing with the mcp extra, run context-engine-mcp. It uses stdio.

What input does it accept?

Plain text logs, and JSON for rag (question and chunks) and code (issue, test output and files). PDFs, images and Office files are not supported.

Are there size limits?

Yes. The readme lists 200000 characters per text, 64 items per list and 2000000 bytes per input file.

Is it production ready?

The readme calls v0.1.0 an early beta, good for trials and integration tests, without production auth, monitoring or audit.

Does it use an AI model?

The readme does not say it calls a model. It describes ranking, deduplication and budget trimming before the text goes to your model.

If it does not work

  • β€ΊCheck that Python 3.11 to 3.13 is installed.
  • β€ΊIf a call fails, read the error_code and hint in the structured error, for example an empty chunks list.
  • β€ΊRestart your MCP client after adding context-engine-mcp.

5 new skills a week. 1 minute to read.