supermem

supermem

Enables storing and querying a personal knowledge graph as a shared memory, allowing agents and tools to remember facts, entities, relations, and recall relevant context via natural language hybrid search.

Category
访问服务器

README

Supermem

A personal super-memory graph that acts as a shared execution layer: it stores everything you're building — projects, tools, decisions, people, files — as a graph, and exposes it over MCP so any tool or agent (and you) can query and grow the same context in natural language.

  • Backend: Turso (managed libSQL / SQLite) — free, low-maintenance, network-addressable, native vector search, and portable (it's just a SQLite file). Dev runs against a local file: DB with no account.
  • Retrieval: hybrid — graph edges for exact traversal, vector search as the natural-language front door, and FTS5 keyword search as an exact-term complement.
  • Embeddings: local, free, offline via @huggingface/transformers (Xenova/all-MiniLM-L6-v2, 384-dim). No API keys, no cost.

Quick start

npm install
cp .env.example .env        # defaults to a local file: DB — no account needed
npm run migrate             # create the schema
npm run seed                # optional: a small example graph about Supermem itself
npm run verify              # end-to-end checks (embedding → recall → traversal)
npm run mcp:smoke           # live MCP client↔server check

First run downloads the ~22 MB embedding model once, then works offline.

Use it from Claude Code

Register the stdio server (use the absolute path to this repo):

claude mcp add supermem -- npx tsx /ABSOLUTE/PATH/TO/supermem/src/mcp/stdio.ts

Then, in any session, the agent can call these tools:

Tool Purpose
remember Store a fact in natural language (optionally about a named entity).
add_entity Create/update an entity (type, name); attrs merged.
add_relation Connect two entities with a typed edge (uses, decided, …).
add_observation Attach an embedded fact to a specific entity.
recall Primary query — hybrid search → relevant entities + facts + neighbors.
get_entity Full detail for one entity: attrs, all facts, connections.
neighbors Traverse the graph from an entity, up to N hops.
list_entities List entities, optionally by type.
forget Delete an observation or an entire entity.

Reachable over HTTP (Phase 2)

The same server also speaks the MCP Streamable HTTP transport, so agents and people can reach one shared memory remotely. It runs statelessly (a fresh server per request), which suits serverless and horizontal scaling.

Run it locally or on any always-on host:

export SUPERMEM_AUTH_TOKEN=$(openssl rand -hex 32)   # required before exposing publicly
npm run http                                         # → http://localhost:3000/mcp
npm run http:smoke                                   # verifies auth + remember/recall over HTTP
  • GET /health — liveness (no auth).
  • POST /mcp — MCP endpoint; requires Authorization: Bearer $SUPERMEM_AUTH_TOKEN whenever the token is set. If it's unset, auth is disabled (local dev only) and the server warns.

Register the remote server with Claude Code:

claude mcp add --transport http supermem-remote https://YOUR_HOST/mcp \
  --header "Authorization: Bearer $SUPERMEM_AUTH_TOKEN"

Deploy to Vercel

api/index.ts exports the Express app and vercel.json routes all traffic to it, so:

vercel                       # preview
vercel --prod                # production
vercel env add SUPERMEM_AUTH_TOKEN     # and TURSO_DATABASE_URL / TURSO_AUTH_TOKEN

Embeddings caveat. The default embedder (transformers.js/onnxruntime) is a heavy native dependency for serverless functions (bundle size + cold starts). For a smooth reachable deploy today, either run npm run http on a small always-on host (Railway/Fly/Render/VPS), or swap the embedder in src/embed/embedder.ts for a hosted embedding endpoint. Phase 2's HTTP transport + auth work identically in all of these.

Point at Turso (reachable deployment)

Create a free Turso DB, then set in .env:

TURSO_DATABASE_URL=libsql://your-db.turso.io
TURSO_AUTH_TOKEN=...

npm run migrate and everything else behave identically — the schema and code are backend-agnostic.

Data model

  • nodes(id, type, name, attrs, …) — entities, unique on (type, name).
  • edges(id, src_id, dst_id, type, attrs, …) — typed, directed relationships.
  • observations(id, node_id, text, source, embedding F32_BLOB(384), …) — atomic facts, embedded on write; mirrored into an FTS5 index and a libSQL vector index.

Roadmap

  • Phase 1 (done): core memory graph over stdio MCP, Turso-ready.
  • Phase 2 (done): Streamable-HTTP MCP transport + bearer-token auth + Vercel/self-host deploy path so agents and people reach it remotely. ← you are here
  • Phase 3: auto dev-activity ingestion (scan git repos/commits/files → same write tools).
  • Phase 4: integrations (Gmail/Drive/…) and a thin REST + web UI for non-agent users.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选