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 Server | Entroly MCP Server | |
|---|---|---|
| Serves | Raw files | Optimally compressed context |
| Coverage | Files you ask for | Selected workspace context at variable resolution |
| Dependencies | Not tracked | Auto-included |
| Duplicates | Sent as-is | Detected and merged (SimHash) |
| Token budget | No awareness | Knapsack-optimal allocation |
| Learning | None | RL-based weight optimization |
| Tools provided | 1-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
| Tool | What It Does |
|---|---|
optimize_context | Select optimal context for a query and token budget |
remember_fragment | Store context with auto-dedup and entropy scoring |
recall_relevant | Sub-linear semantic recall via multi-probe LSH |
record_outcome | Feed the reinforcement learning loop |
explain_context | Show why each fragment was included/excluded |
checkpoint_state | Save full session state |
resume_state | Restore from checkpoint |
prefetch_related | Predict and pre-load likely-needed context |
get_stats | Session statistics and cost savings |
health_check | Codebase health: clones, dead code, god files |
How It Works
When your AI tool makes a request:
- The AI tool calls
optimize_contextwith the user's query and token budget - Entroly's Rust engine scores and selects the optimal code fragments in <10ms
- The selected context is delivered at variable resolution — full text, signatures, or references
- The AI tool receives broader useful context under a smaller token budget; exact savings depend on the repo, query, and budget
- After the AI responds,
record_outcomefeeds 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
| Variable | Default | Description |
|---|---|---|
ENTROLY_MCP_TRANSPORT | stdio | Transport mode |
ENTROLY_QUALITY | 0.5 | Quality dial (0.0-1.0) |
ENTROLY_MAX_FILES | 5000 | Max 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