Memex logo

Memex

Local MCP memory for coding agents. SQLite on your machine β€” preferences persist across chats.

Install Memex

Run the project’s own setup commands, in order.

Setup steps from the project

memex installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    go install github.com/kioie/memex/cmd/memex@latest
    
  2. 2. Check the setup
    memex doctor    # confirm local store is ready
    

Overview

Tools10

What Memex lets your agent do. Expand a tool for its parameters.

Self-reported~110 tokens of context

Security & health

What it can reach and how reliably it runs β€” from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 65d

Supply-chain signal

2 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage β€” this is a directional signal, not a security audit.

Critical 1High 1Medium 0Low 0

Scanned 9/12/2026 via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

GitHub stars1Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.

From the project README

memex β€” long-term memory for AI coding agents

Stop re-explaining your stack every chat. Long-term memory for AI coding agents β€” stored on your machine.

memex gives Cursor, Claude Desktop, and other MCP clients a memory that survives across chats. Save preferences, decisions, and facts once; the agent finds them again later. No cloud account, no API keys, no vector database to run.

Unit Tests Integration Tests Go Reference

Current release: v0.6.0 Β· Requires: Go 1.26+


When to use memex

Use memex if you:

  • Code with Cursor, Claude Desktop, or any MCP client
  • Want preferences and project facts to persist across chats
  • Need memory on your machine β€” no vendor account or API keys
  • Are building or running an agent that should recall past context

Good fits β€” ask memex to remember things like:

SituationExample
Coding preferences"Prefers Go, table-driven tests, no Python for services"
Project decisions"This repo uses SQLite; don't suggest Postgres"
Conventions"Branch names: feature/…, commits: conventional commits"
Agent commitments"Will add integration tests before merging"
Session startAgent loads your prefs instead of re-interviewing you

memex is not for:

  • Passwords, API keys, or secrets
  • Full chat transcripts or log archival
  • Team-wide cloud memory synced across machines (local-first, per device)
  • Non-MCP apps (memex speaks MCP over stdio)

Agents: if the user repeats themselves across sessions, or asks you to "remember" something durable β€” use memex. See docs/FOR-AGENTS.md.


The outcome

Without memexWith memex
Every new chat starts from zeroAgent recalls your stack, style, and past decisions
You repeat the same preferencesYou say it once; memex stores it locally
Memory lives in a vendor's cloudMemory lives in ~/.memex/memex.db on your disk
Extra services and API keysgo install + one MCP config line

Try it in 2 minutes

bash
go install github.com/kioie/memex/cmd/memex@latest
memex doctor    # confirm local store is ready

Add to your MCP client (e.g. Cursor):

config.json
{
  "mcpServers": {
    "memex": {
      "command": "memex",
      "args": ["serve"]
    }
  }
}

In chat:

Remember that I prefer table-driven tests and Go over Python.

Open a new chat:

What are my testing preferences?

Full walkthrough: docs/GETTING-STARTED.md

Try in browser (no Cursor): npx @modelcontextprotocol/inspector memex serve

Smithery: kioie/memex (local Docker via MCPB β€” no hosting) Β· Registry metadata in server.json


How it works

Code
You or the agent          memex (local)              Later sessions
      β”‚                        β”‚                           β”‚
      β”‚  remember("prefers Go")β”‚                           β”‚
      β”‚ ──────────────────────►│  saved to SQLite          β”‚
      β”‚                        β”‚                           β”‚
      β”‚                        β”‚  recall("testing prefs")  β”‚
      β”‚                        β”‚ ◄─────────────────────────│
      β”‚                        β”‚ ─────────────────────────►│ relevant facts
  1. Save β€” remember stores a short fact (deduplicated per user)
  2. Find β€” recall or retrieve_context searches when the agent needs context
  3. Update β€” update_memory revises a fact; old versions stay in the audit trail

Data never leaves your machine unless you copy the database file.


What you get

FeatureWhat it means for you
Local storageSQLite file under ~/.memex β€” you own it
Smart searchKeyword search built in; optional MEMEX_HYBRID=1 for paraphrase-friendly matching
Context limitsretrieve_context returns only what fits your token budget
Safe updatesRevising a fact keeps history; nothing is silently overwritten
Agent + user factsTrack who said what (source: user / agent / system)
Multi-project scopingSeparate by user, agent, session, or metadata tags
Built-in guidanceMCP prompts teach agents when and how to use memory
Health checkmemex doctor shows path, counts, and config

Documentation

DocFor
Getting startedFirst-time setup in Cursor
For AI agentsWhen agents should read/write memory
ExamplesMCP configs and scoping recipes
All docsIndex

Agents: fetch MCP prompts memory_guide, session_start, and remember_fact from the connected server.


Tools (10)

Everyday use β€” you usually only need the first three:

ToolPlain English
rememberSave a fact
retrieve_contextFind relevant facts, sized for the model context window
recallSearch by keywords (query required)
list_memoriesBrowse stored facts without searching
update_memoryChange an existing fact (keeps history)
get_memoryLook up one fact by ID
forgetRemove one fact (soft delete)
delete_memoriesRemove several facts
delete_all_memoriesWipe a user's memories (confirm=true)
memory_historySee how a fact changed over time

Settings

VariablePurpose
MEMEX_DIRWhere to store data (default ~/.memex)
MEMEX_USER_IDYour memory namespace (default default)
MEMEX_AGENT_IDSeparate memories per agent
MEMEX_RUN_IDTag memories to a session or run
MEMEX_HYBRID=1Turn on extra local matching for paraphrases
MEMEX_VERBOSE=1Log database path while debugging

Why memex?

Hosted memory products typically need API keys, cloud embeddings, and network calls on every recall. memex is the opposite: a small MCP server on your machine, writing distilled facts that agents choose to store β€” no extraction pipeline, no vendor lock-in.

memexTypical hosted memory
Setupgo install + MCP configAPI keys, SDK, often Docker
DataYour diskVendor cloud
OfflineYesUsually no
CostFree (local compute only)Usage-based

Development

bash
git clone https://github.com/kioie/memex.git && cd memex
make test              # fast unit tests
make test-integration  # MCP stdio roundtrip
memex doctor

See CONTRIBUTING.md Β· CHANGELOG.md Β· SECURITY.md


License

MIT β€” see LICENSE.

Reviews

No reviews yet β€” be the first to share how it worked for you.

Frequently Asked Questions about Memex

memex is an MCP server that gives AI coding agents long-term memory across chats by storing preferences, project decisions, conventions, and other durable facts in a local SQLite database. It works with Cursor, Claude Desktop, and other MCP clients over stdio, and requires no cloud account, API keys, or separate vector database.

Install memex with Go, verify the local store with `memex doctor`, and configure your MCP client to run `memex serve`. The documented installation command is `go install github.com/kioie/memex/cmd/memex@latest`, and memex requires Go 1.26 or later.

memex stores memory locally in SQLite at `~/.memex/memex.db`. This makes memory local-first and persistent across chats on the same machine, without a vendor account or API keys.

memex saves short facts with `remember` and finds relevant information with `recall` or `retrieve_context`. It is intended for durable preferences, project decisions, conventions, and agent commitments rather than passwords, API keys, secrets, full chat transcripts, or log archival.

Related MCP servers

Add a badge to your READMEShow it’s listed β€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMemex AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/memex-4?style=directory)](https://allmcps.com/mcp/memex-4)
HTML Embed
<a href="https://allmcps.com/mcp/memex-4"><img src="https://allmcps.com/api/badge/memex-4?style=directory" alt="Memex on AllMCPs" /></a>