Noel Lee

Agent Memory MCP Server

Python standard library, Model Context Protocol, SQLite FTS5

I use Claude Code and Codex side by side every day. Their sessions are separate, so one can't look up what the other decided yesterday, and neither keeps much between sessions. This server indexes both tools' conversation logs and serves them to both through MCP. The index holds 128K+ messages, and a search takes about 2 ms.

What the tools do

There are 12 MCP tools. The ones I use most search past chats, list a project's sessions, read a session page by page, and open the other agent's latest session to pick up where it stopped. A shared memory folder holds notes both agents can read and write. A session can also be imported from one tool into the other with its messages and tool output.

Implementation

I used SQLite FTS5 because what I search for is usually an exact string: an error message, a file name, a decision. FTS5 answers in milliseconds on the local machine with no model call.

The server is one Python process with no third-party packages, so each agent can start it without an install step.

Session files grow while the agents are writing them. The indexer stores how far it has read in each file and commits only complete lines, then picks up from that offset on the next pass. Very long lines are capped so one oversized log can't hold up indexing.

My part

I designed the schema, the indexer and the MCP tool interfaces, and wrote the test plan. Claude Code and Codex wrote much of the code; I reviewed and tested every change.