Claude Code + Entroly MCP Setup
Last updated: July 2026 | Reading time: 5 min
Claude Code is one of the most powerful AI coding tools available — Anthropic's Claude model is exceptional at reasoning about code. But even Claude Code has a critical blind spot: it can only see a fraction of your codebase at a time.
When Claude Code does not have the right evidence, it can invent function signatures, miss config files, or break dependencies it did not inspect. This guide shows the clean setup: verify Entroly locally, then add it to Claude Code through MCP.
Why Claude Code Hallucinates
Claude Code uses file search, grep, and open files to build context. On a large project, it faces a fundamental constraint: the context window has a token limit. Claude Code is smart about what it reads, but it can't read everything.
The result:
- Partial visibility — Claude Code sees files relevant to your query, but misses related configs, utilities, and type definitions
- Wasted tokens — when it does read files, it reads them in full — including boilerplate, comments, and duplicate code
- No dependency awareness — it doesn't know that
auth.pydepends onauth_config.pyunless it explicitly searches for it - No learning — each conversation starts fresh with no memory of which context worked best
The Fix: Entroly as an MCP Server
Entroly plugs into Claude Code as an MCP (Model Context Protocol) server. Instead of Claude Code searching for files manually, Entroly delivers the optimal context automatically:
| Without Entroly | With Entroly | |
|---|---|---|
| Codebase visibility | Manual search/read loop | Selected context at variable resolution |
| Tokens per request | Raw files and repeated context | Budgeted context; savings depend on repo and query |
| Dependency tracking | Manual | Automatic |
| Learns from usage | No | Yes (RL-based) |
| Duplicate detection | None | SimHash O(1) |
Setup
Step 1: Install and verify locally
pip install -U entroly entroly verify-claims entroly simulate
Step 2: Connect to Claude Code
claude mcp add entroly -- entroly
Claude Code stays your client. Entroly adds local MCP tools for context optimization, exact retrieval, receipts, feedback, and savings reports. You do not need proxy mode for this subscription workflow.
Step 3: Inspect value anytime
entroly simulate entroly status entroly doctor
Use these commands to inspect local savings estimates, runtime status, and common setup issues without making an LLM call.
What Happens Behind the Scenes
When you ask Claude Code a question, Entroly:
- Analyzes your query — extracts intent, keywords, and relevant code areas
- Selects optimal context — uses a knapsack solver to pick the best fragments that fit the token budget
- Delivers at 3 resolution levels — critical files in full, supporting files as signatures, peripheral files as references
- Tracks what worked — reinforcement learning improves selection over time
The goal is better evidence with fewer input tokens. Exact latency and savings depend on repo size, installed engine, query, and budget.
Advanced: Claude Code + Entroly Pro Tips
Use quality presets for different tasks
# MCP path for Claude Code subscriptions claude mcp add entroly -- entroly # Proxy path only when you control a provider API key entroly proxy --quality balanced
Check your savings
entroly dashboard
The dashboard shows lifetime token savings, cost trends, codebase health grades, and PRISM weight evolution.
Role-based optimization
entroly role backend # optimizes for backend-heavy context entroly role frontend # optimizes for UI/component context entroly role fullstack # balanced
FAQ
Does my code leave my machine?
No. Entroly runs 100% locally. It processes your code on your machine and delivers context to Claude Code locally via MCP.
Does it work with Claude Code's free usage?
Yes. Every tier benefits — fewer tokens per request means more requests within your quota.
Can I use it alongside CLAUDE.md files?
Absolutely. CLAUDE.md gives Claude Code your project instructions. Entroly gives it your code context. They're complementary.
Give Claude Code local context tools.
Verify locally first, then connect through MCP.
pip install -U entroly entroly verify-claims entroly simulate claude mcp add entroly -- entroly