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

pip install -U entroly
entroly serve --transport stdio

Or with SSE transport for remote connections:

entroly serve --transport sse --port 9378

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. Entroly's Rust engine scores and selects the optimal code fragments in <10ms
  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 — for local IDE connections)
entroly serve --transport stdio

# SSE (for remote / multi-client setups)
entroly serve --transport sse --port 9378

Quality Presets

entroly serve --quality balanced    # recommended
entroly serve --quality max         # best context, slightly more latency
entroly serve --quality speed       # fastest, lighter optimization

Environment Variables

VariableDefaultDescription
ENTROLY_MCP_TRANSPORTstdioTransport mode
ENTROLY_QUALITY0.5Quality dial (0.0-1.0)
ENTROLY_MAX_FILES5000Max files to index

Troubleshooting

MCP server not connecting

entroly doctor

Runs 7 diagnostic checks including MCP connectivity, port availability, and config validation.

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

Switch to a faster quality preset: entroly serve --quality speed. Or install the Rust engine: pip install entroly[native].

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