Skip to content

v0.1.0 · MIT · zero API keys

Memory for AI agents that never leaves your machine

localmem-mcp gives your agent persistent memory backed by SQLite and on-device embeddings. No cloud, no keys, no per-call billing — and after one model download, no network at all.

PyPI - Version PyPI - Python Versions

~/your-project
$ uvx localmem-mcp
  • Working in 30 seconds

    One line in your MCP client config. uvx handles the rest — nothing to install, nothing to configure.

    Quickstart

  • Genuinely private

    Memories live in one SQLite file you own. The only network call in the entire project is a one-time model download.

    Privacy model

  • Finds meaning, not keywords

    "Which database did we pick?" finds "we went with SQLite" — while exact terms like error codes still land.

    How search works

  • A library, not just a server

    The MCP server is a thin shell over a MemoryStore you can import and use in any Python project.

    Python library

The problem

Every new session, your agent starts from nothing. You re-explain the project. You re-state the decisions. You re-paste the context you pasted yesterday.

The usual fix is a hosted memory service — which means your project context, your preferences, and your half-finished thoughts get shipped to someone else's server, metered per call, behind an API key you have to manage.

The fix

One line in your client config, and your agent gets three tools: store a memory, search memories by meaning, recall a specific one. Everything lands on disk, in a file you can read, back up, or delete.

"Remember that we chose SQLite over Postgres for this project because it ships in a single file."

The agent calls store_memory. The text is embedded locally and written to a SQLite row.

"What database did we pick, and why?"

The agent calls search_memory. Semantic similarity surfaces the memory even though you never said the word "SQLite" this time.

from localmem_mcp import MemoryStore

store = MemoryStore()
store.add("We chose SQLite over Postgres", tags=["decision"])

for hit in store.search("what database are we using?"):
    print(hit.score, hit.memory.content)

What makes it different

localmem-mcp Hosted memory services
Where memories live A SQLite file you own Someone else's database
Network calls at runtime None Every store and every recall
API keys None Required
Cost per call Zero Metered
Works offline Yes No
Deleting your data rm memories.db Trust their retention policy

Where to next