How to Choose Context Engineering Tools for Claude Code in 2026
Compare Claude Code built-ins with tools for live documentation, repository retrieval, shared knowledge, and persistent memory.
Claude Code can refactor an unfamiliar service while following conventions that no longer match the repository. The model can only use the context available at inference time. Context engineering controls what information Claude receives, when it receives it, and what persists over time. A committed project CLAUDE.md moves between machines through version control, but it only contains what someone writes and keeps current. Personal overrides and auto memory stay local unless a team shares them another way.
Dosu publishes this comparison and appears alongside the alternatives. We ask the same questions of every tool. What context does it supply, when does it update, where does it run, and what does it leave out?
The article starts with Claude Code's built-ins, then covers live documentation, repository retrieval, maintained team knowledge, and persistent memory. The closing guide helps readers identify the first missing layer in their setup.
Context engineering controls what the agent sees
Anthropic documents what Claude Code loads at startup. It reads CLAUDE.md, auto memory, MCP tool names, and skill descriptions. Claude Code adds other context during the work and summarizes the conversation when the window fills. After compaction, it reads the project-root CLAUDE.md from disk again. It waits to reload nested instructions and path-scoped rules until it touches a matching file.
Anthropic treats CLAUDE.md as context rather than enforced configuration and recommends keeping each file under 200 lines. Evaluating AGENTS.md, a study from ETH Zurich and LogicStar, found that AGENTS.md-style files raised inference cost by more than 20 percent on average in its tested settings without a statistically significant improvement in task success. The study does not show that every instruction file hurts every task, but it does show that extra context carries a measurable cost and does not guarantee better results.
Those constraints create five layers.
- Instruction files. Files such as
CLAUDE.md, importedAGENTS.md, and.claude/rules/keep stable conventions, commands, and guardrails close to the repository. Someone must update them when the project changes. - Live connectors. MCP servers fetch current state from systems such as GitHub, Linear, Notion, Slack, and documentation indexes.
- Repository understanding and retrieval. These tools index engineering sources and let the agent retrieve relevant context during a task.
- Maintained team knowledge. A team reviews and updates shared engineering context as code and decisions change.
- Memory layers. Persistent stores carry facts, feedback, and corrections from earlier work into later tasks.
How the tools compare
| Tool | Best for | How it refreshes | Main constraint |
|---|---|---|---|
| Claude Code built-ins | Repository and machine-local context | File edits and auto memory | Shared project instructions still need maintenance |
| Context7 | Public library documentation | Retrieves indexed documentation when asked | Does not detect the installed version automatically |
| DeepWiki | Repository maps | Generates from repository content | Private repositories require a Devin account |
| Unblocked | Retrieval across engineering tools | Indexes connected Sources | Does not maintain startup instructions |
| Dosu | Shared repository knowledge | Monitors relevant pull requests and connected Sources | Does not provide conversational memory |
| Mem0 | Conversational memory | Extracts facts from messages and searches | Does not maintain repository documentation |
| Zep | Temporal memory | Invalidates facts over time | Requires an application to send repository context |
| Cognee | Graph and vector memory | Learns from ingested content | Shared team use needs a common backend |
Several tools can belong in one setup because they solve different gaps.
Start with what Claude Code already gives you
Start with Claude Code's built-ins when context can live in the repository or on one developer's machine. Add another system when knowledge must stay current across people, machines, repositories, or agents.
Instruction files use several scopes. Put personal preferences in ~/.claude/CLAUDE.md, shared project guidance in a version-controlled project file, and private overrides in CLAUDE.local.md. Parent files load at launch, while subdirectory files load when Claude works there. Use .claude/rules/ for path-scoped instructions. The /init command can incorporate AGENTS.md, .cursorrules, and .windsurfrules. The /import command can bring configuration from Codex, Gemini CLI, or Cursor into Claude Code.
Auto memory stays local. Claude Code keeps repository-specific notes under ~/.claude/projects/, loads the first 200 lines or 25 kilobytes at startup, and shares the directory across worktrees. The directory stays on one machine and does not travel with the repository.
Skills and subagents preserve context space. Claude invokes a SKILL.md when its description matches the task. After compaction, Claude Code restores recent skill invocations within documented token limits. Subagents perform large reads in their own context windows.
MCP servers bring in external context. Add servers at local, project, or user scope. Project scope writes a .mcp.json that the team can commit, while administrators can distribute servers through managed settings. Plugins package skills, agents, hooks, and MCP servers. Hooks can enforce tool-use rules, while CLAUDE.md supplies instructions that Claude may interpret.
Context7 for version-specific library documentation
Context7, built by Upstash, retrieves current public library documentation. It can return version-specific documentation when the request or library identifier includes a version. Without one, it returns the latest indexed release rather than inspecting the package version in the repository.
Its two MCP tools resolve a library name and retrieve documentation for a question. Run npx ctx7 setup --claude to configure an MCP server or a CLI and skill workflow. The Claude Code plugin also provides a /context7:docs command.
Context7 covers public documentation but does not know the private code, conventions, or architecture decisions behind a project.
DeepWiki for an initial repository map
DeepWiki, from the Devin team, generates a navigable repository wiki with architecture pages and links to source. Its public MCP server provides three unauthenticated tools that read the wiki structure, retrieve a page, and answer a repository question. DeepWiki automatically refreshes public repositories that display its badge. Private repositories require a Devin account, and .devin/wiki.json controls generated pages.
DeepWiki can give Claude Code an initial map of an unfamiliar public repository or large dependency. Its wiki stays grounded in repository content, so it cannot recover decisions that exist only in external review threads or chat. Private repository generation and refresh depend on the team's Devin setup.
Unblocked for cited answers from engineering tools
Unblocked connects 27 engineering Sources and serves cited answers through one read-only MCP server. Its connectors cover source control, project management, chat, observability, and documentation tools. Unblocked recommends retrieving fast-changing facts during a task instead of copying them into instruction files.
Enterprise adds Data Shield permission enforcement. Global enablement covers all current and future connected Sources. An administrator can instead enable selected-source mode, where newly connected Sources start disabled. Unblocked holds SOC 2 Type II and does not maintain the files Claude Code loads at startup.
Dosu for shared repository knowledge
Dosu connects engineering Sources to a shared Library and drafts Documents from that activity. When a monitored pull request opens or changes, Dosu checks published Documents that the diff may affect and can propose updates. By default, eligible updates publish after the merge. A Library can instead require a person to accept, edit, or decline each proposal in Review.
Claude Code reaches that knowledge through the Dosu MCP Server. read_knowledge retrieves curated knowledge and branch notes. write_knowledge saves an append-only note when an agent learns something durable. review_knowledge lets a user inspect and act on pending Document changes or draft replies. The server also renders a receipt for the knowledge an agent read or wrote during the turn. A separate whoami tool helps debug the connection.
The Dosu CLI authenticates the user, selects a deployment, detects supported coding agents, writes their MCP configuration, and installs the Dosu skill.
Add @AGENTS.md as the first line of CLAUDE.md when Dosu maintains that file for the repository. Claude Code then loads the maintained file with the project's stable instructions.
Dosu does not provide conversational memory or replace a company wiki. It focuses on shared repository knowledge. Dosu holds SOC 2 Type II and does not train on customer data. Enterprise customers can use Data Shield to filter supported GitHub, Slack, and Confluence Sources against requester permissions. The first opt-in requires an active Enterprise plan and a feature flag, so readers should confirm availability before planning around it. The Free plan covers public repositories, while Pro costs $16 per month billed annually or $20 month to month for private repositories.
Mem0 for conversational memory across coding agents
Mem0 extracts candidate memories from messages that an application or coding-agent plugin sends to its add operation. Later searches return relevant memories. Its repository includes plugins for Claude Code, Codex, and Cursor alongside an MCP server. Those integrations make conversational memory available during later tasks but do not author or maintain repository documentation.
Teams can use Mem0 as a managed service or self-host the Apache 2.0 project. Evaluate it when an agent needs user-specific conversational memory.
Zep for time-bounded facts
Zep stores entities as nodes and facts as edges. When a new fact contradicts an old one, Zep records the invalidation time instead of overwriting the old fact. That history supports questions about what was true on a given date. Graphiti, the Apache 2.0 engine underneath Zep Cloud, provides an MCP server for Claude Code and Cursor. Zep holds SOC 2 Type II.
Use Zep when an agent's correctness depends on temporal reasoning. Zep sees repository context only when another system sends it, and teams must define the entity and edge types that it models. Teams using Claude Code without building their own agents may not need that layer.
Cognee for an open source memory graph
Cognee is an Apache 2.0 memory engine that turns ingested text into a knowledge graph and vector index. Its recommended v1 MCP tools are remember, recall, forget_memory, and improve. Standalone mode manages its own database and keeps each MCP server instance's data separate. API mode connects multiple clients to one shared backend.
Teams can run Cognee locally, use its managed cloud service, or bring their own cloud environment.
Choose Cognee when you want a graph and vector pipeline that you can run as a standalone service or shared backend. Cognee only knows about repository context that another system sends to it.
Which layer to add and when
First identify the missing context. Then eliminate options that cannot meet the team's permission, deployment, retention, or data-residency requirements.
- Check the built-ins first. Keep
CLAUDE.mdshort, use path-scoped rules for specialized guidance, commit shared MCP configuration, and inspect the loaded context. - Use Context7 for version-specific public documentation. It retrieves dependency documentation without indexing private code.
- Add retrieval when repository context will not fit in an instruction file. DeepWiki maps repository content, while Unblocked retrieves cited answers from connected engineering tools.
- Add shared knowledge when developers and agents need the same current repository context. Dosu maintains that layer through monitored pull requests and connected Sources.
- Add a memory API when conversational history or temporal facts must persist over time. Mem0 extracts conversational memories, Zep tracks temporal facts, and Cognee provides a graph and vector pipeline.
These choices can stack when they solve different gaps.
See what your agents are working from
Open Claude Code in an active repository and run /context, then /memory. Review the loaded CLAUDE.md and mark each line that no longer matches the code. The resulting list shows where the file has gone stale.
If shared repository knowledge is the missing layer, Dosu can capture knowledge from engineering work, propose updates as relevant code changes, and make current team context available to supported coding agents over MCP. Install the CLI with this command.
curl -fsSL https://cli.dosu.dev/install | sh
Connect your first repo to Dosu and give every supported agent the same current repository context.