# What is an MCP memory server? Durable codebase memory for any AI tool An MCP memory server lets any MCP-compatible AI tool read a persistent memory of your codebase instead of re-scanning it every session. Here's what it is and how to set one up. An **MCP memory server** is a Model Context Protocol server that gives AI tools a persistent, shared memory — so any MCP-compatible tool (Claude Code, Cursor, Windsurf, VS Code, and hosted agents) reads it through one standard interface instead of rebuilding context every session. For a codebase, that memory is a structure-aware map of your repo. ## What MCP is, briefly The Model Context Protocol is an open standard for connecting AI tools to external context. A tool that "speaks MCP" can plug into any MCP server without custom integration. That's what makes a memory server valuable: write once, read from every tool. ## What an MCP memory server does for a codebase Instead of each tool scanning your files from scratch, it exposes: - a structural map of your repo (symbols, signatures, routes) - a resolved call graph (who calls what, and the blast radius of a change) - search over the codebase - your recorded decisions and conventions Your AI tool queries these over MCP and gets accurate, compact context — often [several times fewer tokens](/benchmark) than reading the files cold. ## Why "memory", not just "search" A plain search server finds text. A memory server stays *correct*: it's anchored to your code's structure, so when you rename a function or change the schema, the memory updates and stale notes are flagged. Search finds; memory remembers, and knows when it's wrong. ## How to set one up With SecondOS: 1. Run **bunx @secondos/cli push .** to build and sync a structure-aware map of your repo (your source stays local). 2. Run **bunx @secondos/cli mcp-config** to print ready-to-paste MCP config for Claude Code, Cursor, Windsurf and VS Code. 3. Ask your tool a question — it reads the map over MCP. For hosted agents (claude.ai, ChatGPT) that can't run a local process, connect over HTTP to the remote MCP endpoint. [MCP docs](/docs/mcp) · [quickstart](/docs/quickstart) · [remote MCP](/docs/remote-mcp).