Entroly MCP Server Setup Guide

Last updated: July 2026 | Reading time: 6 min

The Model Context Protocol (MCP) is the new standard for connecting AI coding tools to external context sources. Cursor, Claude Code, VS Code, Windsurf, and Cline all support MCP servers — but most MCP servers just expose basic file read/search operations.

Entroly's MCP server is different. It adds local context optimization, exact recovery, Context Receipts, feedback, and verification tools. The best first run proves this locally before you connect a paid model key or proxy.

Start Here

pip install -U entroly
entroly verify-claims
entroly simulate

These commands run locally. They check SDK import, indexing, optimization under budget, exact recovery, and native-or-fallback engine mode. Then choose the integration path that matches how you work.

What is MCP?

Model Context Protocol (MCP) is an open standard by Anthropic that lets AI tools connect to external data sources. Instead of the AI tool searching for files itself, it can call tools on an MCP server to get better context.

Think of it like a database adapter — MCP standardizes how AI tools request and receive context, so any MCP-compatible tool can benefit from better context sources.

Why Entroly's MCP Server is Different

Basic MCP ServerEntroly MCP Server
ServesRaw filesOptimally compressed context
CoverageFiles you ask forSelected workspace context at variable resolution
DependenciesNot trackedAuto-included
DuplicatesSent as-isDetected and merged (SimHash)
Token budgetNo awarenessKnapsack-optimal allocation
LearningNoneRL-based weight optimization
Tools provided1-2 (read, search)10+ specialized tools

Setup by AI Tool

Cursor

pip install -U entroly
entroly init

Entroly auto-detects Cursor and generates .cursor/mcp.json. Restart Cursor and the MCP server connects automatically.

Claude Code

pip install -U entroly
claude mcp add entroly -- entroly

Best path for Claude Code subscription users. Claude Code stays your client; Entroly adds local MCP tools without proxy/API-key assumptions.

VS Code / Windsurf / Cline

pip install -U entroly
entroly init

Auto-detects your IDE and generates the appropriate MCP configuration.

Any MCP-Compatible Tool

{
  "mcpServers": {
    "entroly": { "command": "entroly", "args": [] }
  }
}

Install with pip install -U entroly, then register the bare entroly command. An MCP client's stdio pipe starts the installed Python server without requiring Docker.

Node/WASM, No Python

npm install -g entroly
entroly serve

Or use npx -y entroly-wasm serve in an MCP JSON config when you want a no-Python path.

MCP Tools Provided by Entroly

ToolWhat It Does
optimize_contextSelect optimal context for a query and token budget
remember_fragmentStore context with auto-dedup and entropy scoring
recall_relevantSub-linear semantic recall via multi-probe LSH
record_outcomeFeed the reinforcement learning loop
explain_contextShow why each fragment was included/excluded
checkpoint_stateSave full session state
resume_stateRestore from checkpoint
prefetch_relatedPredict and pre-load likely-needed context
get_statsSession statistics and cost savings
health_checkCodebase health: clones, dead code, god files

How It Works

When your AI tool makes a request:

  1. The AI tool calls optimize_context with the user's query and token budget
  2. The installed engine scores and selects context under the requested budget; the base package can use its pure-Python path and the optional native extra enables supported Rust paths
  3. The selected context is delivered at variable resolution — full text, signatures, or references
  4. The AI tool receives broader useful context under a smaller token budget; exact savings depend on the repo, query, and budget
  5. After the AI responds, record_outcome feeds the learning loop

Configuration

Transport Options

# stdio (default): register this command in the MCP client
entroly

# installed Python runtime in a POSIX shell
ENTROLY_NO_DOCKER=1 entroly serve

# SSE through the installed Python runtime
ENTROLY_NO_DOCKER=1 ENTROLY_MCP_TRANSPORT=sse ENTROLY_MCP_PORT=9379 entroly serve

entroly serve is Docker-first unless ENTROLY_NO_DOCKER=1 is set. The CLI does not accept --transport, --port, or --quality on the serve command.

Environment Variables

VariableDefaultDescription
ENTROLY_MCP_TRANSPORTstdioTransport mode
ENTROLY_MCP_PORT9379SSE port when MCP transport is sse
ENTROLY_MAX_FILES5000Max files to index

Troubleshooting

MCP server not connecting

entroly doctor

Checks the installed package, configuration, optional Docker availability, local index state, and verifier imports. Read the output for warnings; a passing doctor run is not an end-to-end client or model test.

Not sure whether to use MCP or proxy?

Use MCP for Claude Code subscriptions and MCP-native IDEs. Use proxy mode only when you control a provider API key and want transparent Anthropic/OpenAI-compatible request optimization.

Cursor doesn't see the MCP server

Check that .cursor/mcp.json exists and restart Cursor. Entroly needs to be installed globally or in the same environment Cursor can access.

High latency

The first tool call can include indexing work. Confirm the indexed scope and engine mode with entroly verify-claims. Install the optional Rust engine with pip install 'entroly[native]' where a compatible wheel is available, then re-run verification instead of assuming acceleration is active.

Local context OS for AI coding agents.

Verify locally, then add MCP context optimization, receipts, recovery, and feedback tools to supported MCP-compatible clients.

pip install -U entroly
entroly verify-claims
entroly simulate
entroly init

View on GitHub