Cody Enterprise Memory in 2026: Persistent Context via MCP
Cody Free, Pro, and Enterprise Starter are gone. Full Cody Enterprise remains — and has supported MCP since May 2025. Here is the current, verified picture and how to add persistent memory to it.
MemNexus Team
Engineering
Updated July 2026: this guide has been substantially revised to reflect Sourcegraph's Cody Enterprise / Amp split and Cody's current MCP support. If you read an earlier version of this page, the setup steps below have changed.
If you're searching for "Cody persistent memory" in 2026, start with the thing most guides on this topic skip: what "Cody" is has changed.
Sourcegraph discontinued Cody Free and Cody Pro — new signups stopped June 25, 2025, and existing access ended July 23, 2025. Enterprise Starter workspaces lost Cody access on that same date. Individual and team developers were pointed to a new product, Amp. In December 2025, Amp split off from Sourcegraph entirely and became its own company, Amp Inc., co-founded by Sourcegraph's Quinn Slack and Beyang Liu. What's left under the Cody name — with continued access and continued MCP support — is full Cody Enterprise. Sourcegraph has said it will "continue to support and invest in" Cody Enterprise going forward.
This guide is for that audience: teams on full Cody Enterprise who want a persistent memory layer on top of Cody's codebase context. If you were on Cody Free, Cody Pro, or Enterprise Starter before mid-2025, this guide doesn't apply to you — none of those plans have Cody anymore, and you're most likely on Amp now. Amp is a different, independently-run product with its own MCP configuration, and we're not covering it here until we've verified it as carefully as we're verifying Cody below.
What Cody Enterprise still does well
Cody Enterprise's real strength hasn't changed: it's built on Sourcegraph's code search engine, which indexes your repositories — local and remote — and gives Cody structural understanding of your codebase at a scale most AI coding tools don't attempt. Symbol search, cross-repo references, and code intelligence that spans your entire org's repos, not just the file you have open. If you ask Cody to trace how a function is used across three services, it can actually go look.
That's a genuinely different kind of context than what a chat-based coding assistant usually offers. It's structural — a real-time picture of what your code IS right now, across every repo Sourcegraph has indexed.
Where that structural context stops
Sourcegraph's own release notes for Cody in VS Code have acknowledged the flip side directly: earlier versions of Cody would "forget" context early in a long conversation once the total context got too large, before Cody for VS Code v1.14.0 (April 2024) expanded the context window. That's the general shape of the limitation, and it hasn't gone away with scale — it's inherent to how chat-based LLM sessions work. Structural knowledge about your code doesn't carry temporal knowledge about your project.
Concretely, here's what a fresh Cody Enterprise chat session doesn't know, no matter how well-indexed your repos are:
- Why a decision was made. Cody's code search can show you that a service uses Kafka. It can't tell you that you chose Kafka over RabbitMQ because the audit service needs replay capability and your ops team already runs Kafka clusters elsewhere.
- What you already debugged. Cody can find every call site of a function. It has no record of the two-hour investigation last month that traced a race condition to that function's error handling.
- What changed between sessions. Close the chat, open a new one, and the code intelligence is exactly as sharp as before — but any reasoning or context you built up in the prior conversation is gone.
Cody knows what your code is. It doesn't know why it got that way, or what you learned building it.
Cody Enterprise supports MCP — with two real caveats
Since May 2025, Cody's agentic context fetching has been able to call Model Context Protocol (MCP) tools mid-conversation — Sourcegraph first added MCP support to Cody in November 2024 and extended it to full agentic tool-calling in a May 28, 2025 changelog entry. That's the mechanism that makes a persistent memory layer possible today, and per Sourcegraph's docs, two things are worth knowing before you set it up:
- MCP is off by default. A Sourcegraph admin has to enable the
agentic-context-mcp-enabledfeature flag on your Enterprise instance first. This isn't something an individual developer can turn on from their editor — it's an instance-level setting. - Cody currently supports MCP Tools only — not the Resources or Prompts parts of the MCP spec. For a memory layer, that's fine: reading and writing memories is a Tools use case. But it does mean some richer MCP integrations you may have seen elsewhere in the ecosystem aren't available in Cody yet.
One more thing worth knowing before an admin flips that flag: MemNexus only receives what's explicitly sent through a tool call — a memory you save, a query you run. It has no access to the codebase Cody indexes; that stays entirely inside Sourcegraph's code search. What MemNexus does store is isolated per user and encrypted at rest (with one documented exception for embedding vectors, which stay unencrypted to support semantic search), processed by the subprocessors named in our Trust Center — primarily Microsoft Azure (the infrastructure, in Azure's US East 2 region) and Neo4j (the graph database, which we run ourselves on that Azure infrastructure). Full detail is in our privacy and security documentation. MemNexus is cloud-hosted today — there's no self-hosted deployment option if your org needs the memory store itself to run on infrastructure you control.
Once MCP is turned on for your instance, individual developers configure servers through the cody.mcpServers setting in their editor (VS Code, JetBrains, or wherever your team runs Cody).
Setting up MemNexus with Cody Enterprise
Cody isn't one of the seven agents mx setup configures automatically today — that list currently covers Claude Code, Claude Desktop, GitHub Copilot, Cursor, Codex CLI, OpenCode, and ChatGPT Desktop. For Cody, the path is manual, but it's short.
Step 1: Install the CLI and authenticate.
npm install -g @memnexus-ai/cli
# Interactive prompt — key stays out of shell history and out of your MCP config file
mx auth login
Step 2: Confirm MCP is enabled on your Sourcegraph instance. Ask your Sourcegraph admin to confirm the agentic-context-mcp-enabled feature flag is on. If it isn't, this is a one-time instance-level change, not something you can work around per-developer.
Step 3: Add MemNexus as an MCP server in your editor's Cody settings. Open your editor settings (settings.json in VS Code) and add:
{
"cody.mcpServers": {
"memnexus": {
"command": "mx",
"args": ["mcp", "serve"]
}
}
}
Restart your editor. Whether that cody.mcpServers entry lives in your personal editor profile or gets distributed more broadly is a question for your Sourcegraph admin — check whether your org pushes out editor settings centrally; the entry goes wherever your team already manages Cody's editor configuration. The same entry also accepts env for passing environment variables and disabledTools if you want to scope down which MemNexus capabilities a given team can call — useful if you're rolling this out gradually across an engineering org. Once it's live, Cody's agentic chat gains a new option mid-conversation: instead of only searching what's in your indexed repos, it can pull up what you already decided and debugged on this project, or save today's finding before you close the session.
Already running Cody Enterprise? Create a free MemNexus account and connect it in about the time it takes to restart your editor.
What a session looks like with both systems active
Say you're tracking down an intermittent 502 on a checkout service. Three weeks ago, in a separate Cody session, you traced a similar symptom to a connection pool exhausting under retry storms in a different service — you fixed it there and moved on.
Today, before you start digging, you ask Cody to check MemNexus: recall surfaces that prior investigation — root cause, fix, and the reasoning you ruled out along the way — as a narrative answer, not a pile of old chat logs you'd have to go find. Cody's own code search then confirms whether the checkout service shares the same retry configuration pattern. One tool tells you what the code looks like right now. The other tells you what you already learned solving a version of this problem before. Together, you skip the first 30 minutes of re-deriving a hypothesis you already had.
What MemNexus doesn't fix here
Worth being direct about the limits of this setup:
- If you're on Amp, not Cody Enterprise, this doesn't apply. Amp is a separate, independently-run product with its own MCP configuration — see the note at the top of this guide.
- MemNexus can't turn on MCP for you. If your Sourcegraph admin hasn't enabled
agentic-context-mcp-enabled, no client-side configuration will make Cody call any MCP tool, ours included. That's a conversation to have with whoever administers your instance. - This doesn't replace Sourcegraph's code search. MemNexus has no visibility into your codebase's current structure — it only knows what you or Cody explicitly save to it. Cody's code intelligence and MemNexus's memory store answer different questions and don't overlap.
- Your memory store starts empty. There's no migration path that back-fills months of prior Cody Free or Pro chat history into MemNexus — those conversations, if you still have them locally, aren't something we can import today. Nothing carries over automatically — but the first thing you save today is there for every session after this one.
If you're evaluating options
Sourcegraph Cody Enterprise sits in the same conversation as GitHub Copilot Enterprise and Cursor for teams standardizing on one AI coding tool — see our comparisons with GitHub Copilot and Cursor if you're weighing that decision. And if the built-in-versus-dedicated-memory question is new to you, our breakdown of built-in memory vs. a dedicated memory layer covers the general trade-off in more depth than fits here.
For a broader look at how teams are approaching memory across the current AI coding tool landscape — including Cursor and Claude Code — see our 2026 roundup of AI coding tools and persistent memory.
Create your MemNexus account — the setup above takes about five minutes once MCP is enabled on your instance.
Give your coding agents memory that persists
MemNexus works across Claude Code, Codex, Copilot, and Cursor — your agents get smarter every session.
Get Started FreeGet updates on AI memory and developer tools. No spam.
Related Posts
Augment Code Memory: How to Add Cross-Tool Persistent Memory to Augment Code
Augment Code has built-in memories and a Context Engine. Here is how to extend them with cross-tool persistent memory via MCP so your context follows you across every coding tool.
Supermaven Memory: How to Give Supermaven Persistent Memory Across Sessions
Supermaven has a massive 1M token context window but no cross-session memory. Here is how to add persistent memory via MCP so Supermaven remembers your project decisions and conventions.
Devin Memory: How to Make Devin Remember Your Codebase Across Sessions
Devin starts fresh every session with no memory of prior work. Here is how to add persistent memory via MCP so Devin remembers your project decisions, conventions, and debugging history.