AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Memex

mcp-timurgaleev-memex · by timurgaleev

Self-hosted personal AI knowledge brain -- hybrid (vector + keyword + entity-graph) search over your notes and code, served to any MCP agent (Claude Code, Cursor, Codex). One AWS account, zero telemetry, MIT.

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add mcp-timurgaleev-memex

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-timurgaleev-memex)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Memex? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

memex

Long-term memory for your AI agent — that never leaves your cloud.

Self-hosted on your own AWS. memex indexes your notes and code and lets any MCP agent (Claude Code, Cursor, Codex) search it and cite the source. No SaaS, no telemetry — your second brain stays yours.

[](./LICENSE)


What is memex?

You write a lot — notes, decisions, docs, code. Six months later you can't find any of it, and your AI assistant has no idea it exists.

memex is a personal knowledge brain you run in your own cloud. It reads your markdown notes and your code, turns them into a searchable index, and hands that search to your AI agent over the Model Context Protocol (MCP). Now your agent answers "what did I decide about X?" with your own words, cited back to the exact note — instead of guessing.

It's a second brain for you, and long-term memory for your AI.

See it work

memex returns the evidence, cited to the exact file. Your agent writes the answer. (The brain retrieves — it doesn't chat.)

Why it exists

  • Your knowledge is private. Most "AI memory" tools upload everything to

someone else's servers. memex runs entirely inside one AWS account you control — your notes never leave your cloud, and there's zero telemetry.

  • One brain, every agent. It exposes a single MCP endpoint. Any

MCP-compatible tool connects to it; you don't re-index your life per app.

  • Search that actually finds things. It blends meaning (vector

embeddings), exact words (keyword search), and relationships (an entity graph) — so the thing you only half-remember still surfaces.

  • Understands your code too. It indexes your source (TypeScript, Python) and

can answer "who calls this function / what does it call" from a real call graph — not just your prose.

  • Surfaces notes before you ask. Hand it a conversation and it volunteers the

pages most likely relevant — deterministic, no AI guessing.

  • Small and boring on purpose. No orchestrator, no SaaS to depend on. It

fits on one small EC2 box, and you can read the whole thing in an afternoon. One brain serves one person; every remote credential (OAuth client, PAT) is scoped to the sources it may read (opt-in fail-closed).

How it's different

| | memex | Hosted "AI memory" | A plain RAG script | |---|:---:|:---:|:---:| | Your data stays in your cloud | ✅ | ❌ | ✅ | | Any MCP agent, one shared index | ✅ | sometimes | ❌ | | Vector + keyword + entity-graph | ✅ | varies | vector-only | | Understands code (real call graph), not just notes | ✅ | ❌ | ❌ | | Zero telemetry, no SaaS dependency | ✅ | ❌ | ✅ |

Who it's for: developers who live in Claude Code / Cursor / Codex, note-takers with a markdown vault, and anyone who refuses to put their second brain on someone else's servers.


How it works

memex indexes your content once, then answers searches on demand. When your agent asks a question, here's the round trip — note that memex hands back evidence, and the agent composes the answer:

sequenceDiagram
    autonumber
    actor You
    participant Agent as Your AI agent
    participant memex as memex (MCP)
    participant DB as Postgres + pgvector
    You->>Agent: "What did I decide about X?"
    Agent->>memex: tools/call search { q }
    memex->>DB: vector + keyword + graph query
    DB-->>memex: top chunks, ranked (RRF)
    memex-->>Agent: cited chunks (evidence, not an answer)
    Agent-->>You: answer, grounded in your own notes

Under the hood: a small Bun + TypeScript service, Postgres 16 with pgvector, AWS Bedrock for embeddings, and a Cloudflare Tunnel for HTTPS — so no EC2 port is ever exposed. The entire public surface is two routes: GET /health and POST /mcp. That's the whole attack surface.

> Full topology, every container, and the security model: > [ARCHITECTURE.md](./ARCHITECTURE.md).


Quickstart

You'll need an AWS account, Terraform 1.6+, docker compose v2, and a domain you control (for the Cloudflare Tunnel).

git clone https://github.com//memex.git
cd memex

make init     # interactive bootstrap: AWS account, domain, buckets -> .env + tfvars
make audit    # PII / secrets gate (must pass on a clean clone)
make plan     # preview the AWS resources
make apply    # create them

make apply boots one EC2 host, pulls the repo, fetches secrets from AWS Secrets Manager, and starts the two containers (memex + cloudflared). Your brain is then live at https://brain./mcp.

Connecting Claude Code (or any MCP client): [deploy/memex/docs/CLAUDE-CODE.md](./deploy/memex/docs/CLAUDE-CODE.md).


What's in the box

| Piece | What it does | |---|---| | memex | The brain: hybrid search, entity + code call graph, code/markdown indexers, MCP server, a built-in advisor that ranks what to fix, push-context that volunteers relevant pages, an opt-in (off-by-default) step that distils notes into concepts/opinions in a separate store (your original notes are never touched) with a take-review lifecycle (list_takes / takes_search / set_take_status), and a self-maintaining background cycle. 63 MCP tools. | | cloudflared | Public HTTPS ingress via Cloudflare Tunnel — no open EC2 ports. | | Terraform | All AWS infra (VPC, EC2, RDS, EFS, Secrets Manager) as one module. | | AWS Bedrock | Titan v2 embeddings + Claude Haiku for query intent and the optional, off-by-default note synthesis (Claude Sonnet for the paid opt-in deep-reasoning slices). Your agent still writes the answers. |

Learn more: [How it works](./docs/HOW-IT-WORKS.md) · [ARCHITECTURE.md](./ARCHITECTURE.md) · [Deployment](./docs/DEPLOYMENT.md) · [Configuration](./docs/CONFIGURATION.md) · [API / MCP tools](./deploy/memex/docs/API.md) · [Operations](./deploy/memex/docs/OPERATIONS.md) · [Privacy](./PRIVACY.md) · [Changelog](./CHANGELOG.md)


Like the idea?

If a private, self-hosted brain for your AI agent is something you want to exist, give it a ⭐ — it's the signal that keeps this maintained. Bugs and ideas welcome in [issues](../../issues).

Contributing

memex is intentionally small — one box, multi-source tenant isolation, no SaaS — so open an issue before anything that adds infrastructure or changes the deploy story. Please read [CLAUDE.md](./CLAUDE.md) (the repo's working rules) first.

Security

Found a vulnerability? Please don't open a public issue — see [SECURITY.md](./SECURITY.md) for the private disclosure channel.

License

[MIT](./LICENSE). Fork it, redeploy it, modify it, ship it. Solo-maintained, no SLA — if you need guarantees, fork and pin.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.