mem-port
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mem-portsave that I prefer dark mode in all my apps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mem-port
A local MCP (Model Context Protocol) server for portable, long-term agentic memory — a thumb drive for your AI context.
Every AI copilot (Claude Code, Cursor, Windsurf, ...) keeps its own memory, siloed to that tool. The usual workaround — copy-pasting context, summaries, or exported notes from one agent into another — only captures a snapshot frozen at the moment you made it. From there the copies drift: each agent keeps learning on its own, nothing keeps the copies in sync, and the longer you go the more your copilots disagree about what's actually true. mem-port runs as a single local daemon that any number of copilots can connect to, backed by an embedded knowledge graph (entities, episodes, memories, skills, and the relations between them) that survives restarts and can be exported to a portable file and moved anywhere. Every connected copilot reads and writes the same graph, so there's nothing to paste and nothing to drift.
Unlike other memory-for-agents projects, mem-port needs no external services — no Postgres, no Qdrant, no Neo4j. It's one process, one embedded SurrealDB instance combining graph storage and vector search, and zero-config local semantic search (no API key required).
Connecting a client (below) gives it the ability to use mem-port; for more detailed, tunable instructions on what it should actually save and when — including keeping personal/team/project memory in separate scopes — see MEMORY_GUIDE.md.
Quick start
npx @rsl-innovation/mem-port serveThis starts a daemon on http://127.0.0.1:8787/mcp. Point any MCP client at it over Streamable HTTP, with a library-id header identifying your workspace. Every copilot that connects with the same library-id shares the same memory; different library-ids are fully isolated from each other (each maps to its own SurrealDB namespace/database) — there's no cross-tenant leakage.
npx re-checks the registry on every invocation. If you'll be running mem-port commands often, install it globally instead so mem-port is a plain command on your PATH:
npm install -g @rsl-innovation/mem-port
mem-port serveThe rest of this README uses mem-port <command> for brevity. If you didn't install globally, substitute npx @rsl-innovation/mem-port <command> wherever you see that — it works identically, just slower to start.
Connecting from Claude Code
Easiest: use the CLI (--header accepts any number of Key: Value pairs). Add --scope user so the server is available in every project on this machine, not just the one you happen to be in when you run the command — the default local scope ties it to a single project directory:
claude mcp add --transport http mem-port http://127.0.0.1:8787/mcp \
--header "library-id: my-personal-workspace" \
--scope userOr add it directly to ~/.claude.json (user scope, applies everywhere) or .mcp.json (project scope, shareable via version control with that repo's team). The type field is required — an entry with a url but no type is treated as a misconfigured stdio server:
{
"mcpServers": {
"mem-port": {
"type": "http",
"url": "http://127.0.0.1:8787/mcp",
"headers": { "library-id": "my-personal-workspace" }
}
}
}Run /mcp inside Claude Code to confirm it shows mem-port as connected.
Connecting from the Claude Code VS Code extension
The extension shares the exact same MCP configuration as the CLI (.mcp.json / ~/.claude.json) — there's no separate settings UI to add a server from. Open the integrated terminal (Ctrl+` / Cmd+`) and run the same command as above:
claude mcp add --transport http mem-port http://127.0.0.1:8787/mcp \
--header "library-id: my-personal-workspace" \
--scope userThis requires the standalone claude CLI to be installed — the extension bundles its own private copy for the chat panel and does not put claude on your terminal PATH, so claude mcp add won't work in the integrated terminal until you install the CLI separately. Editing .mcp.json directly (the JSON block above) works too and doesn't need the CLI.
Once added, type /mcp in the chat panel to confirm mem-port shows as connected, or to enable/disable/reconnect it.
Connecting from other MCP clients
Any client that supports Streamable HTTP with custom headers can connect the same way. Clients that only support stdio-based servers (some Claude Desktop configurations, for example) need a stdio-to-HTTP bridge such as mcp-remote:
{
"mcpServers": {
"mem-port": {
"command": "npx",
"args": ["-y", "mcp-remote@latest", "http://127.0.0.1:8787/mcp", "--header", "library-id:my-personal-workspace"]
}
}
}Getting your copilot to use it proactively
Connecting the server gives your copilot the ability to save/recall memory — the server's MCP instructions and tool descriptions already nudge any client toward using it proactively. For more explicit control (and for keeping personal/organizational/project memory in separate library-id scopes instead of one bucket), see MEMORY_GUIDE.md for instructions to paste into your copilot's own custom-instructions file.
Related MCP server: local-memory-mcp
Tools
Tool | Purpose |
| Save a fact/preference/decision/task/reference, optionally linked to entities |
| Semantic (vector) search over memories |
| Record a raw interaction/event that memories can be derived from |
| List recorded episodes, filterable by time range/source |
| Save a reusable procedure, optionally linked to entities |
| Semantic (vector) search over skills, by task/situation |
| List saved skills, filterable by tag/source |
| Look up a skill by exact name or id |
| Soft-archive (default) or permanently delete a skill |
| Look up an entity plus everything that mentions or relates to it |
| Create a graph relation between two entities |
| Soft-archive (default) or permanently delete a memory |
| Export this library to a portable |
| Import a |
Skills memory
Alongside episodes and memories, mem-port stores skills — reusable procedures for recurring tasks (e.g. "how to debug a flaky test in this repo," "the deploy steps for checkout-service"). A skill has a name, a description (the trigger condition — when a copilot should reach for it, matched by search_skills), and content (the actual instructions).
Skills are what makes "porting common skills across AI" work with no extra machinery: since they live in the same shared knowledge graph as everything else, a skill saved by Claude Code is immediately visible to Cursor or Windsurf the moment they connect with the same library-id — no file format conversion needed. export_library/import_library carry skills between machines exactly like entities, episodes, and memories.
Porting memory between machines
Same-machine sharing across copilots needs no extra step — they just connect to the same daemon with the same library-id. export_library/import_library solve a different problem: moving to a new machine, backing up, versioning (the bundle is plain JSON — commit it to a private git repo if you like), or handing a curated slice of memory to someone else.
# on the old machine
mem-port export --library-id my-personal-workspace
# -> writes <data-dir>/exports/my-personal-workspace-<timestamp>.memport.json
# on the new machine, after copying the file over
mem-port import --library-id my-personal-workspace --in ./my-personal-workspace-....memport.jsonimport defaults to --mode merge (dedupes entities by name+type, memories/episodes by content hash — importing the same bundle twice is a no-op). Pass --mode overwrite to wipe the target library first, or --dry-run to see what would happen without writing anything.
Running persistently
mem-port serve runs in the foreground — it's a long-lived daemon, not a one-shot command, so it blocks whatever terminal started it and dies when that terminal closes. If your MCP client can't connect (ECONNREFUSED 127.0.0.1:8787), that's almost always the reason: nothing is actually listening. Check with lsof -i :8787.
For a quick session, background it: mem-port serve & (or nohup mem-port serve > ~/.mem-port.log 2>&1 & to survive closing the terminal). For something that survives reboots and restarts itself if it ever crashes, set it up as a proper background service.
macOS (launchd)
which node # note this path
which mem-port # note this path too, then resolve the symlink:
readlink -f "$(which mem-port)" # -> .../lib/node_modules/@rsl-innovation/mem-port/bin/mem-port.jsWrite ~/Library/LaunchAgents/com.rsl-innovation.mem-port.plist, substituting the two paths above. Invoke node directly with the resolved script path — don't point ProgramArguments at the mem-port shim itself. launchd doesn't inherit your shell's PATH, so the shim's #!/usr/bin/env node shebang fails with env: node: No such file or directory when launchd runs it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.rsl-innovation.mem-port</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/lib/node_modules/@rsl-innovation/mem-port/bin/mem-port.js</string>
<string>serve</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/YOUR_USERNAME/Library/Logs/mem-port.log</string>
<key>StandardErrorPath</key>
<string>/Users/YOUR_USERNAME/Library/Logs/mem-port.error.log</string>
</dict>
</plist>launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.rsl-innovation.mem-port.plist # start now + on every login
launchctl bootout gui/$(id -u)/com.rsl-innovation.mem-port # stop and unregister
tail -f ~/Library/Logs/mem-port.log ~/Library/Logs/mem-port.error.log # logsTo pick up a new version after npm install -g @rsl-innovation/mem-port, restart the running job in place — no need to unload/reload the plist:
launchctl kickstart -k gui/$(id -u)/com.rsl-innovation.mem-portTo stop it and start it again later, use bootout/bootstrap (above) rather than launchctl stop — this plist's KeepAlive is unconditionally true, so a plain stop gets immediately relaunched by launchd. bootout actually unregisters the job, and bootstrap registers and starts it again.
Linux (systemd --user)
# ~/.config/systemd/user/mem-port.service
[Unit]
Description=mem-port
[Service]
ExecStart=/usr/bin/node /path/to/lib/node_modules/@rsl-innovation/mem-port/bin/mem-port.js serve
Restart=on-failure
[Install]
WantedBy=default.targetsystemctl --user enable --now mem-port
journalctl --user -u mem-port -fConfiguration
Env var | Default | Purpose |
|
| HTTP port |
| OS-appropriate app data dir | Where the SurrealDB store and cached embedding model live |
|
| Local embedding model id (reserved for future use) |
|
| Override the embedding model cache location |
All state lives under one data directory — the SurrealDB store (surrealkv://, persistent across restarts) and the cached local embedding model. Delete the data dir to fully reset.
Development
npm install
npm run dev # start the daemon with tsx, no build step
npm test # vitest: tenancy isolation + export/import round-trip
npm run typecheck
npm run build # tsup -> dist/, what npx @rsl-innovation/mem-port actually runsscripts/smoke.sh is a plain-curl smoke test against a already-running daemon (no Node/Inspector dependency, usable in CI):
npm run dev &
./scripts/smoke.shGotchas
mem-port is a localhost server — it only works with clients running on the same machine. Web/cloud-hosted chat sessions (e.g. chatgpt.com or claude.ai in a browser tab) run server-side and have no route to
127.0.0.1on your computer, so they can't reach mem-port no matter how it's configured. To connect ChatGPT, Claude, or similar tools, install their desktop app and add mem-port there — the desktop app runs locally and can reach the daemon, whereas the same account's web session cannot.Claude Code's CLI and VS Code extension both run locally already, so they work out of the box (see the connection instructions above) — this gotcha mainly matters for tools you might otherwise only use through a browser.
Known limitations (v1)
Vector search is brute-force (no HNSW/DISKANN index yet) — fine at personal-memory-store scale, revisit if a library grows very large.
export_library's scope filtering supportsmemory_typesandsince; filtering byentity_idsisn't implemented yet.No authentication — the daemon binds to
127.0.0.1only and trusts anything running locally on your machine.@huggingface/transformers' bundledonnxruntime-node/sharpcarry known transitive advisories (ZIP/image parsing libs) with no upstream fix yet. mem-port never feeds them untrusted input, butnpm auditwill flag them.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceA local-first MCP server for personal memory management, enabling AI agents to store, search, and retrieve developer insights with offline semantic search and auto-categorization.Last updated353MIT
- Flicense-qualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.Last updated864
- Alicense-qualityAmaintenanceA universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.Last updated1MIT
- Alicense-qualityCmaintenanceA local semantic memory MCP server for AI coding agents that provides persistent, searchable project knowledge including architecture notes, file symbols, git history, progress tracking, and a knowledge graph, all stored locally.Last updatedMIT
Related MCP Connectors
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Secure, user-owned long-term memory for AI agents over OAuth-protected remote MCP. Save, search, recall, update, and govern preferences, project context, decisions, and task state across ChatGPT, Claude, Copilot, IDEs, and CLIs.
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rialytics-software/mem-port'
If you have feedback or need assistance with the MCP directory API, please join our Discord server