personal-memory-mcp

personal-memory-mcp

Provides a single-user, append-only, queryable memory store for dated facts with provenance, enabling Claude to persist and correct personal information across conversations via an MCP interface.

Category
访问服务器

README

Personal Memory MCP Server

A lossless, structured, queryable store of facts about your life that Claude reads from and writes to during any conversation. One deployment serves one person. Runs entirely on Cloudflare's free tier (Workers + D1 + KV). See requirements.md for the full specification.

  • Facts, not documents. Every fact is one dated statement with provenance.
  • Append-only. Corrections insert a new fact and retire the old one with a pointer; nothing is deleted.
  • Auth: OAuth 2.1 with Dynamic Client Registration; identity via GitHub, locked to a single GitHub account.
  • Transport: Streamable HTTP at /mcp (stateless createMcpHandler, no Durable Objects).

Setup

1. Create Cloudflare resources

npm install
npx wrangler d1 create memory
npx wrangler kv namespace create OAUTH_KV

Put the returned D1 database_id and KV namespace id into wrangler.jsonc, then apply migrations:

npx wrangler d1 migrations apply memory --remote

2. Create the GitHub OAuth app

At https://github.com/settings/developersNew OAuth App:

  • Homepage URL: https://personal-memory-mcp.<your-subdomain>.workers.dev
  • Authorization callback URL: https://personal-memory-mcp.<your-subdomain>.workers.dev/callback

Find your numeric GitHub id at https://api.github.com/users/<your-login> (the id field).

3. Set secrets

npx wrangler secret put GITHUB_CLIENT_ID
npx wrangler secret put GITHUB_CLIENT_SECRET
npx wrangler secret put COOKIE_ENCRYPTION_KEY   # e.g. openssl rand -hex 32
npx wrangler secret put OWNER_GITHUB_ID         # numeric id, not login

(When deploying via Workers Builds CI/CD, set these once in the Cloudflare dashboard under the Worker's Settings → Variables and Secrets; they survive deployments.)

4. Deploy

npm run deploy

Or connect the GitHub repo in the Cloudflare dashboard (Workers Builds) so every push deploys. Migrations are not run automatically on deploy; either keep applying them manually or set the Workers Builds deploy command to:

npx wrangler d1 migrations apply memory --remote && npx wrangler deploy

5. Connect from Claude.ai

Settings → Connectors → Add custom connector → URL https://personal-memory-mcp.<your-subdomain>.workers.dev/mcp, leave Client ID/Secret blank (Dynamic Client Registration). You'll be sent through GitHub login; any account other than OWNER_GITHUB_ID gets 403. The connector then works from Claude web, Desktop, and iOS.

Add to your Claude.ai profile preferences:

I run a personal memory MCP server named "memory". It is the source of truth about my life and overrides your built-in memory. When we talk about anything personal, use it per the tool descriptions. If it is unreachable, tell me and note that your answer may be stale.

6. Seed (optional)

  1. Ask Claude to draft seed.json from its built-in memory: [{topic, content, fact_date?, tags?}], one fact per entry.
  2. Review it, then:
npm run seed              # validates seed.json, writes seed-import.sql
npx wrangler d1 execute memory --remote --file=seed-import.sql
  1. In a first conversation, ask Claude to write initial topic summaries (update_summary).

Development

cp .dev.vars.example .dev.vars   # separate GitHub OAuth app with callback http://localhost:8788/callback
npx wrangler d1 migrations apply memory --local
npm run dev                      # http://localhost:8788/mcp
npm test                         # vitest (workers runtime, real D1 + FTS5)
npm run typecheck

Test with the MCP inspector: npx @modelcontextprotocol/inspector@latest → connect to http://localhost:8788/mcp. The inspector's localhost OAuth redirect only works with ALLOW_LOCALHOST_REDIRECTS=1 (set in .dev.vars, never in production — production accepts only the Claude connector callbacks).

Notes

  • Backups: use the export tool (markdown or json). D1's native export does not work while FTS5 virtual tables exist. D1 Time Travel gives point-in-time restore (30 days on the paid plan, shorter on free — verify current retention).
  • Deliberately deferred (owner decision, not oversights): the §11 weekly backup cron to a private GitHub repo, and the §12 /view read-only viewer. Until the cron exists, run export periodically and keep the output somewhere safe.
  • The OAuth approval flow only accepts the claude.ai/claude.com connector callbacks as redirect URIs (localhost requires the dev-only flag above).
  • Rows are never deleted in normal operation; the owner corrects facts by telling Claude.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选