Index
3 min read Updated Feb 18, 2026

Context7: Use Skills and Subagents, Not Just MCP

Connecting Context7 via MCP floods your main context with docs. Skills and subagents isolate queries, keeping long coding sessions stable.

Many developers connect Context7 through MCP to reference up-to-date library documentation. It works - you get current docs right inside your coding session. But there’s a cost: every document you pull lands directly in your main context window. Query a few libraries, and your context fills up fast. In long coding sessions, that means degraded performance and forgotten mid-session details.

I’ve been thinking about how to solve this in Claude Code using skills and subagents, and the difference in practice is significant.

The Limitation of Plain MCP Connections

When you call Context7 directly through MCP, the full document content streams into your main context. This is fine for a quick one-off lookup. But in a real working session, you’re rarely looking up just one thing.

Check the docs for a React hook. Then a Tailwind utility. Then an Astro API. Each response stacks on top of the last. Your context window fills up, and the model starts losing track of earlier conversation - your actual code, your requirements, the architectural decisions you made three exchanges ago.

As the Manus team emphasized in their architecture notes, a single massive context is not the answer. The key insight is that not everything needs to live in the same context window.

Skills and Subagents: Isolated Context Queries

The Context7 plugin offers two mechanisms that keep documentation lookups out of your main context.

  • Skill: When you ask a question about a library or API, Context7 is invoked automatically. It fetches the latest docs and responds without requiring any special prompting from you. The lookup happens behind the scenes.
  • docs-researcher agent: This is the core architectural piece. Document queries run in an isolated context - a separate subagent that handles the lookup, extracts what’s relevant, and returns only the answer. Your main context never sees the raw documentation.

When you want to explicitly query documentation, you can use the command:

/context7:docs <library> [query]

This gives you direct control while still keeping the heavy lifting out of your primary context window.

Installation

Install the Context7 plugin in Claude Code with:

/plugin marketplace add upstash/context7
/plugin install context7-plugin@context7-marketplace

The Design Difference

Using the same Context7 backend, the two approaches produce very different results in practice.

Plain MCP: Every doc lookup adds to your main context. Three lookups in, you’ve consumed a significant chunk of your context window. By mid-session, the model is working with degraded recall of your actual project state.

Skill + Subagent: Doc lookups happen in isolated contexts. Only the extracted answer - the specific function signature, the configuration option, the usage example - flows back into your main context. The raw documentation never touches it.

This pattern solves two problems at once. It addresses the knowledge cutoff issue by pulling live documentation, and it does so without destabilizing long coding sessions. You get current information without paying the context cost.

The broader principle applies beyond Context7: any time you’re pulling large external content into an AI session, consider whether it needs to live in the main context or whether it can be processed in isolation and summarized back. That single architectural decision - isolate and summarize - is what separates a session that stays sharp for hours from one that starts forgetting what you’re building.

Join the newsletter

Get updates on my latest projects, articles, and experiments with AI and web development.