mem-port

Open source AI memory, zero external infra

Every copilot you run keeps its own memory. mem-port gives them one.

mem-port is an open source AI memory server: one local MCP daemon holding a single agent memory graph that Claude Code, Cursor, Windsurf, and any other MCP client read and write together.

npx @rsl-innovation/mem-port serve
No PostgresNo QdrantNo Neo4jMIT licensed

The problem

Copy-pasting context is a snapshot, not a sync.

Every AI copilot (Claude Code, Cursor, Windsurf) keeps its own memory, siloed to that tool. Switch tools mid-project and you're re-explaining yourself from zero.

The usual workaround is copying context, summaries, or exported notes from one agent into another. That only captures what was true the moment you copied it. From there, the copies drift: each agent keeps learning on its own, nothing keeps them in sync, and the longer you go the more your copilots disagree about what's actually true.

Without mem-port

With mem-port

Each copilot starts cold in a new session

Every copilot reads the same graph

You copy-paste a frozen snapshot of context

Nothing to copy: one live source

The copies drift apart as each agent keeps learning alone

Nothing to drift: there's only one

How it works

One daemon. One embedded graph. Every copilot reads and writes the same thing.

mem-port runs the whole AI memory layer as a single local process: no Postgres, no Qdrant, no Neo4j, no external services at all. It's one embedded SurrealDB instance combining graph storage and vector search, with zero-config local semantic search that needs no API key. Any number of MCP clients connect to it over Streamable HTTP with a library-id header; every client using the same library-id shares the same agent memory, and different library-ids are fully isolated from each other. There's no cross-tenant leakage. That is the default and it stays the default: hosted storage and accounts are opt-in, and only matter if you deploy it.

Record types
Entities, memories, episodes, skills, and architectural decision records
Storage
Embedded SurrealDB by default (surrealkv://): graph + vector search in one process. Interchangeable with hosted SurrealDB or Postgres + pgvector
Embeddings
Local ONNX model, Xenova/all-MiniLM-L6-v2, no API key required
Isolation
library-id header → its own SurrealDB namespace/database per workspace
Transport
Streamable HTTP on 127.0.0.1:8787, bridgeable to stdio via mcp-remote
Portability
export_library / import_library → one portable .memport.json bundle
Rendered results
Read tools declare an MCP Apps UI, so supporting hosts draw result cards styled from the host's own theme
Accounts
None on loopback, where the OS is already the boundary; required on any other interface, with an admin portal at /admin
Deployment
Container image and Cloud Run manifests under deployments/, both defaulting to closed
Claude CodeCLI + VS Code extensionCursorMCP clientWindsurfMCP clientClaude Desktopvia mcp-remote bridgeAny MCP clientStreamable HTTP + headersmem-port127.0.0.1:8787

What it stores

Five kinds of knowledge in one graph.

Not everything worth keeping has the same shape. A distilled claim, a record of what happened, the thing they're both about, a procedure you'll repeat, and a decision whose reasoning outlives it are five different questions, so mem-port stores them as five different record types instead of flattening them into one pile of text.

  1. Memories

    What's true about this project?

    The core unit: one durable, self-contained statement worth recalling in a later session that starts from zero context. Each carries a type (fact, preference, decision, task, or reference) that search can filter on, plus an importance from 0 to 1.

    save_memory · search_memory · forget_memory

  2. Episodes

    What happened last Tuesday?

    The raw material memories get derived from: a conversation, a debugging session, a meeting, each recorded with its content, the copilot that saw it, and when it happened. Where a memory is a distilled claim, an episode is an unedited record of something that occurred.

    save_episode · list_episodes

  3. Entities

    Everything relevant to checkout-service?

    People, projects, and tools: the connective tissue. Naming an entity when you save anything links the two and creates the entity on first mention, so one lookup returns every memory, episode, skill, and decision that touches it. Typed edges connect entities to each other.

    get_entity · relate_entities

  4. Skills

    How do we do this here?

    Reusable procedures for recurring tasks, like debugging a flaky test in this repo or the deploy steps for a service. A skill carries the instructions plus a description that acts as its trigger condition. A skill saved by Claude Code is visible to Cursor the moment it connects to the same library.

    save_skill · search_skills · list_skills · get_skill · forget_skill

  5. Decision records

    Why aren't we using Postgres?

    Architectural decision records: the consequential technical choices whose reasoning matters months later. Each gets a sequential number in its library and holds the context that forced the decision, the decision itself, its consequences, and the alternatives that lost. Reversals supersede rather than overwrite, so the chain stays readable from either end.

    save_adr · search_adrs · list_adrs · get_adr · forget_adr

All five live in the same graph and travel together: one export_library call writes every record type into a single portable .memport.json bundle.

In the box

Quick start

Four commands. No account, no API key, no docker-compose.

  1. 01

    Start the daemon

    Starts a daemon on http://127.0.0.1:8787/mcp. Running mem-port often? Install it globally instead: npm install -g @rsl-innovation/mem-port, then mem-port serve is a plain command on your PATH.

    Terminal
    npx @rsl-innovation/mem-port serve
  2. 02

    Connect Claude Code

    --scope user makes it available in every project on this machine, not just the one you're in when you run the command.

    Terminal
    claude mcp add --transport http mem-port http://127.0.0.1:8787/mcp \
      --header "library-id: my-personal-workspace" \
      --scope user
  3. 03

    Confirm the connection

    Run inside Claude Code (the CLI or the VS Code extension's chat panel) to confirm mem-port shows as connected.

    Claude Code
    /mcp
  4. 04

    Connect anything else the same way

    Any MCP client that supports Streamable HTTP with custom headers connects identically. stdio-only clients bridge through mcp-remote.

    Terminal
    npx -y mcp-remote@latest http://127.0.0.1:8787/mcp --header "library-id:my-personal-workspace"

Free. Open source. Runs on your machine.

Open source AI memory under the MIT license: no external services, no account required.