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
{
"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
| 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 - 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
- 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): 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
| Variable | Default | Description |
|---|---|---|
ENTROLY_MCP_TRANSPORT | stdio | Transport mode |
ENTROLY_MCP_PORT | 9379 | SSE port when MCP transport is sse |
ENTROLY_MAX_FILES | 5000 | Max 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