memex

السجل الرسمي أدوات المطورين

Local MCP memory for coding agents. SQLite on your machine — preferences persist across chats.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

OCI package ghcr.io/kioie/memex:0.6.0
Claude Code
claude mcp add memex -e 'MEMEX_DIR=<MEMEX_DIR>' -e 'MEMEX_USER_ID=<MEMEX_USER_ID>' -e 'MEMEX_HYBRID=<MEMEX_HYBRID>' -- docker run -i --rm ghcr.io/kioie/memex:0.6.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "memex": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/kioie/memex:0.6.0"
            ],
            "env": {
                "MEMEX_DIR": "<MEMEX_DIR>",
                "MEMEX_USER_ID": "<MEMEX_USER_ID>",
                "MEMEX_HYBRID": "<MEMEX_HYBRID>"
            }
        }
    }
}

متغيرات البيئة

  • MEMEX_DIR Data directory (default ~/.memex in native install; use /data in Docker)
  • MEMEX_USER_ID Default user scope for memories
  • MEMEX_HYBRID Set to 1 to enable local vector retrieval fusion

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. When to use memex
  2. The outcome
  3. Try it in 2 minutes
  4. How it works
  5. What you get
  6. Documentation
  7. Tools (10)
  8. Settings
  9. Why memex?
  10. Development
  11. License

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.

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

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

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

{
  "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

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

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.

الأسئلة الشائعة

ما هو memex؟

Local MCP memory for coding agents. SQLite on your machine — preferences persist across chats.

كيف أثبّت memex؟

يعمل على جهازك. في Claude Code: claude mcp add memex -e 'MEMEX_DIR=<MEMEX_DIR>' -e 'MEMEX_USER_ID=<MEMEX_USER_ID>' -e 'MEMEX_HYBRID=<MEMEX_HYBRID>' -- docker run -i --rm ghcr.io/kioie/memex:0.6.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج memex إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل memex مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون memex؟

ينشره kioie. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.