ClaudeMap

OS-Memory

Xiaomi's OS-centric personal memory system: turns a device's screen text, SMS, notifications, calendar, locations and recordings into a searchable memory graph, usable as a Python library or as an MCP server for Claude Desktop, Cursor and Claude Code

MCP Serversofficialmcpmemorypython

OS-Memory is a personal memory system for operating systems from Xiaomi, published as the Python package hyperos-mem (imported as hypermem, core class HyperMemory). It takes the fragments a device records — screen content, SMS, push notifications, calendar entries, clipboard, locations, assistant conversations, recording transcripts, notes and more, ten intake types in all — and arranges them into a five-layer memory graph in one SQLite file per user: raw records at the bottom, parsed observations above them, one-sentence facts with their supporting observations, events that group related happenings (a ticket search, the payment SMS and the travel reminder become one trip), and long-term memories induced across events ("the user orders Sichuan food delivery at weekends"). Construction runs on two paths: DRED, a fast path that attributes observations to events in time order using identifiers, entities and semantic similarity with the embedding model only, and SAGE, a slow path that consolidates event boundaries, writes titles, summaries and facts per event, and induces long-term memories with an LLM. Once built, search does semantic retrieval and read browses the graph by time, entity or order number, tracing every item back to the raw record. It is usable as a Python library or through an MCP server whose tools mirror the library methods — Claude Desktop, Cursor and Claude Code clients are documented, and the database can be built offline with the library while the MCP server only queries. The README covers evaluation on PMM-Bench, the project's own benchmark. Apache-2.0 (per the GitHub API license field; the LICENSE carries Xiaomi's copyright).

What it does

  • Five-layer memory graph — long-term memories, events, facts, observations, raw records — in one SQLite file per user, every item traceable back to what the device recorded
  • Two construction paths: DRED attributes observations to events with the embedding model only (no LLM calls), SAGE consolidates boundaries and induces long-term memories with an LLM
  • Ten intake types — screen text, SMS, push, calendar, clipboard, location, assistant chat, recordings, notes — with multimodal content preprocessed to text upstream
  • MCP server whose tools mirror the library methods (add, build, search, read, status), documented for Claude Desktop, Cursor and Claude Code
  • Build the database offline with the library and let the MCP server only query; search needs just the embedding service
  • Evaluation harness and benchmark included (PMM-Bench), with a HYPERMEM_REQUEST_LOG debug switch that is off by default

When to use it

Best for a personal assistant that should remember your life across apps — answer "what do I have scheduled on Wednesday" or "which train tickets did I book recently", link a ticket query with its payment SMS into one trip, or induce habits from repeated events.

Getting started

pip install "hyperos-mem[mcp] @ git+https://github.com/XiaoMi/os-memory.git"
claude mcp add hypermemory \
  -e HYPERMEM_DB=/absolute/path/to/memory.db \
  -e HYPERMEM_EMBEDDING_URL=https://your-gateway/v1/embeddings \
  -e HYPERMEM_EMBEDDING_MODEL=<embedding model> \
  -e HYPERMEM_EMBEDDING_DIMENSION=<vector dimension> \
  -e HYPERMEM_LLM_BASE_URL=https://your-gateway/v1 \
  -e HYPERMEM_LLM_MODEL=<LLM model> \
  -- /absolute/path/to/os-memory/.venv/bin/python -m hypermem.mcp_server

Things to know

Building sends data out: observation text goes to your configured embedding service and events go to the LLM you point it at, so a local database does not mean local processing — deploy the model services yourself for that. add does not check user, one database holds one user, and a build is one-shot (write all records, build once; more data means a new database). Windows is not supported directly (the write lock uses POSIX fcntl — use WSL). The MCP server runs with the starting user's file permissions, so only connect clients you trust. SQLite files are created mode 0600. Apache-2.0.

Repository

XiaoMi/os-memory

Charted

Related on the map

  • Blitz Strike

    MCP Server

    A penetration-testing methodology delivered as one MCP server: BLITZ maps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE live-verifies every finding before it is reported.

    • mcp-server
    • security
    • pentest
    • methodology
  • Ripwire

    MCP Server

    Red Hat's "ripgrep for AI context" — a C++23 zero-dependency CLI that also speaks MCP.

    • mcp
    • code-context
    • cli
    • red-hat
  • Deja Vu

    MCP Server

    One shared session memory for 25+ coding agents — Claude Code, Codex, and Cursor finally remember the same project.

    • mcp
    • memory
    • cross-agent
    • context
  • Exa MCP

    MCP Server

    Exa's official MCP server — live web search, crawling, and deep research wired into Claude.

    • official
    • search
    • web
    • mcp
  • Official Chrome DevTools MCP server — performance tracing, network inspection, and live debugging for coding agents.

    • official
    • chrome
    • debugging
    • browser
  • Vercel's handler for spinning up MCP servers on Next.js, Nuxt, Svelte, and more.

    • deploy
    • vercel
    • serverless
    • edge