The argument in one line.
Using ref.tools and Exa AI as MCP servers reduces documentation token consumption by 97%, enabling Claude Code to complete Tailwind refactoring audits in 2,800 tokens versus 98,000 in Cursor by fetching only the precise context each task requires.
Read if. Skip if.
- You're a full-stack engineer shipping features in Claude Code or Cursor who's frustrated with token bloat from dumping entire documentation into prompts.
- An AI engineer building agentic workflows who needs multi-step tool calling without exhausting context windows on documentation retrieval.
- A developer new to MCP servers who wants a concrete walkthrough of installing ref.tools and Exa AI across Claude Code, Cursor, Codex, and Factory Droid.
- You're already using MCPs effectively in production and looking for advanced optimization techniques beyond the setup-and-benchmark scope here.
- You work primarily in non-coding domains or don't use Claude Code, Cursor, or similar AI coding environments regularly.
The full version, fast.
Two MCP servers, ref.tools and Exa AI, dramatically cut the token bloat that wrecks AI coding sessions by fetching only the documentation the model needs instead of dumping entire reference sets into context. Install them in Claude Code, Cursor, Codex, or Factory Droid by pasting the provided command with your API key, then explicitly invoke them in prompts ("use ref MCP and exa MCP") while working in plan or spec mode so research happens before any code is written. On a live Tailwind v4 refactor, this approach consumed 2,800 tokens in Claude Code versus 98,000 in Cursor doing the same audit, a thirty-five-fold efficiency gain. Pair targeted retrieval with cheaper agentic models like Haiku for research-heavy refactors to ship faster without exhausting the context window.
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Create a free account →Where the time goes.

01 · The context rot problem
Ray introduces the concept of context rot — LLMs getting dumb as the window fills with irrelevant documentation. Establishes why targeted doc-fetching MCPs beat brute-force token dumps.

02 · Installing ref.tools in Claude Code
One-command install via `claude mcp add`, API key walkthrough, and security warning about committing keys to public repos.

03 · Installing Exa AI in Claude Code
Same pattern as ref.tools. API key generation and paste into terminal. Both MCPs now available globally across any project.

04 · Live demo: Tailwind v4 refactor on Anime Leak
Haiku 4.5 runs a full codebase audit using both MCPs. Ray watches Claude Code research documentation, build a phased implementation plan, and hit /context — revealing only 2,800 tokens used.

05 · The token comparison: Claude Code vs Cursor
Cursor's plan mode finished the same task using 98,000 tokens. Side-by-side makes the 35x gap visceral. Ray notes Cursor asks clarifying questions; Claude Code doesn't.

06 · Setting up MCPs in Codex
Codex uses config.toml instead of JSON. Ray edits the file in Cursor, pastes the API key, verifies with `codex mcp list`.

07 · Setting up MCPs in Factory Droid
Copy the MCP JSON block from Cursor's tools panel directly into .factory/mcp.json. Same pattern, different file path.

08 · Pro tip + CTA
Always call MCPs explicitly in your prompt. Use plan mode (shift-tab) before writing code. Closes with a pitch for his 1337 coaching intensive and a forward-looking take on agentic AI.
Lines worth screenshotting.
- The same Tailwind v4 refactor used 2,800 tokens in Claude Code with ref.tools versus 98,000 tokens in Cursor without it — a 35x difference from targeted documentation fetching.
- Context rot — the model getting progressively dumber as documentation floods the context window — is the root problem that ref.tools and Exa AI are specifically designed to solve.
- ref.tools indexes public documentation, PDFs, GitHub repos, and private documentation, then serves only the specific section the agent needs for the current step rather than dumping everything.
- Exa AI provides high-quality fast search optimized specifically for coding tasks — combining it with ref.tools gives the agent both targeted doc retrieval and broad technical search.
- Adding 'use context seven' or 'use ref' to a prompt is enough to activate the MCP — the agent automatically calls the server to fetch only what is needed for that specific operation.
- API keys for MCP servers should never be committed to a public repo — anyone who clones the repo can use your key and drain your credits.
- Installing a global MCP server from the root user profile makes it available to every new project automatically without repeating the setup command per project.
- Models operate best with just the right information for just the right task — overloading the context with all available documentation before any task begins is the opposite of optimal.
- Feeding 100,000 tokens of documentation into a context before coding starts was common practice before targeted MCPs — it was slow, expensive, and degraded model output quality.
- The combination of ref.tools for documentation and Exa for search makes Claude Code feel like having multiple senior developers who have already read all the relevant docs before writing a line.
- Plan mode plus these two MCPs allows building features that are near-complete before the coding phase begins — the agent arrives at implementation with full context rather than guessing.
- Documentation currency matters: libraries update constantly, and an MCP that fetches live docs eliminates the training-data cutoff problem that causes AI to generate deprecated API calls.
Targeted Documentation Fetching via MCP Uses 35x Fewer Tokens Than Brute-Force Doc Dumps
Ray Fernando's live benchmark shows that context rot — the model getting progressively dumber as irrelevant documentation fills the window — is the primary source of AI coding quality degradation, and that two MCPs which fetch only the relevant sections solve it at 2,800 tokens versus 98,000.
- Context rot: the model gets dumb as the window fills with irrelevant documentation — the failure is not the model, it is the information management strategy
- The fix is fetching only the relevant sections for the specific task, not the entire documentation set
- One-command install via claude mcp add — API key generation and paste is the entire setup
- Security warning: do not commit API keys to public repos — global install keeps the key in Claude's config, not the project folder
- Haiku 4.5 ran a full codebase audit with both MCPs — the model researched documentation, built a phased plan, and completed the task at 2,800 tokens
- The /context check after the task is the verification step — always confirm token usage against your expectations before starting expensive downstream work
- Same task, same libraries: Claude Code at 2,800 tokens, Cursor at 98,000 — a 35x difference driven entirely by how documentation was fetched
- Cursor asked clarifying questions; Claude Code did not — the behavioral difference is a secondary finding worth tracking across projects
- Always call MCPs explicitly in your prompt — autonomous MCP selection by the agent produces less consistent routing than explicit direction
- Use plan mode (shift-tab) before writing code — surface the documentation needs before implementation, not during it
Terms worth knowing.
- MCP server
- A Model Context Protocol server — a standardized integration that exposes specific tools or data sources to an AI coding agent, allowing the agent to call those tools during a task rather than relying solely on its training data.
- context window
- The total amount of text an AI model can hold in memory during a single session — measured in tokens — determining how much code, documentation, and conversation history the model can consider simultaneously before older content is dropped.
- context rot
- The degradation in an AI model's response quality that occurs when the context window fills with large, loosely relevant content — such as entire documentation dumps — leaving the model without space for precise, task-specific reasoning.
- ref.tools
- An MCP server that indexes public and private documentation — including PDFs, GitHub repos, and websites — and retrieves only the specific excerpts an AI agent needs for a given query, instead of dumping entire documentation files into the context window.
- Exa AI
- A search API and MCP server optimized for code-related queries that returns semantically relevant technical results — used as a complement to documentation-indexing tools to give AI coding agents fast access to up-to-date information during agentic tasks.
- agentic search
- A search pattern where an AI agent issues multiple iterative queries across tools and documents to build up the context needed for a task — as opposed to a single one-shot lookup — designed to gather just enough relevant information without flooding the context window.
- tool call
- An action taken by an AI agent to invoke an external function or API — such as reading a file, querying a database, or calling an MCP server — logged as a discrete step during agentic task execution and consuming tokens from the context window.
- plan mode (Claude Code)
- A Claude Code operating mode activated by pressing Shift+Tab that causes the agent to analyze the codebase and outline an implementation plan without writing any code — allowing the developer to review and approve the approach before execution begins.
- Tailwind v4
- Version 4 of the Tailwind CSS utility framework — a significant rewrite that replaces the JavaScript configuration file with CSS-native design tokens and variables, changing how custom design systems are structured and maintained in a project.
- design token
- A named variable that stores a single design decision — such as a color, spacing value, or font size — defined once in a central stylesheet and referenced throughout a codebase to ensure visual consistency and make global style changes manageable.
- context pruning
- The automatic process by which an AI model discards older or lower-priority content from its context window when that window becomes full — a risk in long agentic sessions where relevant information gathered early in the task may be dropped before it is needed.
- OpenAI Codex (agent)
- An AI coding agent from OpenAI that can execute multi-step software development tasks autonomously in a sandboxed environment — capable of reading codebases, running tests, and committing code changes.
- Factory Droid
- An AI coding agent platform (by Factory) that automates software engineering tasks — configurable with MCP servers so the agent can access external documentation and tools during autonomous code generation and review workflows.
- config.toml
- A plain-text configuration file written in the TOML format — used by tools like Codex CLI to store settings, including which MCP servers are enabled, in a structured, human-readable key-value format.
Things they pointed at.
Lines you could clip.
“I used to use up almost 100k tokens just feeding in tons of documentation.”
“LLMs actually operate best when they have just the right information for just the right specific task.”
“Our MCP servers and tool calls only use a total of 2,800 tokens — which is only 1.4% of the context window.”
“It's almost like as if I hired several developers to read the documentation and implement the code for us.”
“Make sure you use plan mode so that it gathers all that specific context before you start writing code.”
Word for word.
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
The bait, then the rug-pull.
Documentation used to eat 100,000 tokens before a single line of code was written. Ray Fernando — ex-Apple engineer, decade-plus shipping production software — found the fix in two MCP servers that pull only the context the agent needs, precisely when it needs it. The proof is live on screen: a full Tailwind v4 design-token audit across a real codebase clocks in at 2,800 tokens — 1.4% of what Cursor burned on the same task.
Named ideas worth stealing.
Context Rot
The degradation of LLM output quality as the context window fills with broad, untargeted documentation — the agent gets dumb before it writes a line of code.
Targeted Agentic Search
- ref.tools — indexed docs, no context bloat
- Exa AI — high-quality search built for coding tasks
- Explicit MCP calls in prompt
- Plan mode before code mode
Pull only the context needed for the specific sub-task, not everything that might be relevant. Combine ref.tools (documentation precision) with Exa (coding-task search quality) and always call them by name in the prompt.
How they asked for the click.
“I do have a couple more spots that are open for my one three three seven intensive.”
Soft close after delivering all value. Thirty-minute sessions over five days. Credentialed with Apple engineering background. Low pressure but well-timed after a high-value tutorial.








































































