Skip to main content
Glama

memory-mcp

One shared memory for claude.ai, Claude Code, ChatGPT and other MCP clients. Memories are Markdown files in a git repository hosted on Cloudflare Artifacts. A Cloudflare Worker serves them as a remote MCP server with GitHub sign-in. Every change is a git commit that names the client that made it, and a small job can keep a full copy on a machine you own.

It is built for one person: sign-in accepts exactly one GitHub account.

Terms (full list in GLOSSARY.md):

  • MCP server — a service that offers tools to an AI client. Remote means it runs on the internet, so every client you use can reach the same one.

  • Worker — a small program Cloudflare runs for each HTTP request.

  • Artifacts — Cloudflare's hosted git repositories (open beta as of 2026-11).

  • KV namespace — a small Cloudflare key-value store; this server keeps sign-in records in one.

  • OAuth app (GitHub) — a registration that lets this server ask GitHub who is signing in.

  • Environment — one deployed copy of the server, described by a values file deploy/<name>.json.

What a client gets

Seven tools: memory_context (profile, preferences and a catalog, for the start of a conversation), memory_search, memory_read, memory_write, memory_list, memory_history and memory_delete. Writes are checked: a stale write is refused rather than overwriting, a near-duplicate note is reported instead of created, and text that looks like a credential is refused. docs/design.md has the details.

Related MCP server: Anamnesis

What you need

  • A Cloudflare account on the Workers Paid plan (Artifacts requires it). Normal personal use stays inside the included 10,000 Artifacts operations a month.

  • A GitHub account, for sign-in.

  • Node.js 22 or newer.

Deploy your own

About 20 minutes. The steps use the environment name production; any name works.

  1. Get the code and sign in to Cloudflare.

    git clone https://github.com/curtisgalloway/memory-mcp.git
    cd memory-mcp
    npm ci
    npx wrangler login
  2. Create the notes repo and the KV namespace. The first command prints a repo token; you do not need it, so do not save it. The second prints the namespace id you need in step 5.

    npx wrangler artifacts repos create memory --namespace memory
    npx wrangler kv namespace create memory-mcp-oauth
  3. Find your Worker's address. It will be https://memory-mcp.<your-subdomain>.workers.dev; your subdomain is shown in the Cloudflare dashboard under Workers & Pages.

  4. Create a GitHub OAuth app at https://github.com/settings/developers ("New OAuth App"). Set Homepage URL to the Worker's address and Authorization callback URL to that address followed by /callback. Note the Client ID, then generate a client secret and keep it for step 7.

  5. Write the values file. Copy the example, then replace the four REPLACE-WITH-... values in deploy/production.json: the address followed by /mcp, the KV namespace id, the OAuth app's client ID, and your numeric GitHub account ID. The last command prints that ID if you use the GitHub CLI. Files in deploy/ stay out of git.

    cp deploy/example.json deploy/production.json
    gh api user --jq .id
  6. Deploy. This checks the values, writes wrangler.production.jsonc, and uploads the Worker.

    npm run deploy -- production
  7. Store the OAuth app's client secret. The command asks for it; paste the secret from step 4.

    npx wrangler secret put GITHUB_CLIENT_SECRET --config wrangler.production.jsonc
  8. Check that the server is up and refuses strangers. Replace the address with yours; the expected answer is HTTP 401.

    curl -s -o /dev/null -w '%{http_code}\n' -X POST https://memory-mcp.YOUR-SUBDOMAIN.workers.dev/mcp

Connect your clients

The server's MCP address is your Worker's address followed by /mcp. Each client registers itself and sends you through GitHub sign-in once.

  • claude.ai: Settings → Connectors → add a custom connector with the MCP address.

  • Claude Code:

    claude mcp add --transport http --scope user memory https://memory-mcp.YOUR-SUBDOMAIN.workers.dev/mcp
  • ChatGPT and other clients: add the MCP address wherever the client accepts a remote MCP server that uses OAuth.

Every connected client can read every note, so connecting a client shares the store with that client's vendor.

Keep your own copy

archive/ is a small job for a Linux machine you own. It fetches the notes repo every 15 minutes with a read-only token and never rewrites what it already holds. Its README has the install steps.

You can also clone the notes repo and edit notes with ordinary git, using a write token; the server notices the push and updates its search index.

Operating it

Each script takes --env <name> (reads deploy/<name>.json) or --url <address>, and signs in through your browser the first time.

Command

What it does

node scripts/live-checks.mjs --env staging

Checks the write rules against a deployed server. It writes and deletes test notes, so it is meant for a test environment; any environment not named staging needs --writes

node scripts/timing.mjs --env staging

Times each tool over 50 calls; the same --writes rule applies to its write and delete timings

node scripts/reindex.mjs --env production

Brings the search index in line with the repo; --full rebuilds it

node scripts/operations.mjs --env production --days 30

Counts billed Artifacts operations

A second values file, such as deploy/staging.json with its own Worker name, notes repo, KV namespace and OAuth app, gives you a separate copy to test against.

Develop

npm ci
npm run check
npm test
uv run --with pytest pytest archive

npm run dev starts the Worker locally. Tests run in Cloudflare's local simulator and need no account.

Documents

  • Design — requirements, architecture and the reasons behind them

  • Glossary — terms from Cloudflare, MCP and OAuth in plain language

  • Archive job

License

Apache 2.0; see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Remote MCP server that exposes a personal git repository of markdown notes to Claude, enabling reading, writing, searching, and running scripts with automatic git commits and GitHub OAuth authentication.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides a local-first, file-based memory layer for Claude Code that syncs across machines via git over private networks, with MCP tools for search, write, and sync of human-readable markdown notes.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients to append and create Markdown notes in a Git-backed GitHub repository (Obsidian-friendly), with tools for appending, creating, reading, and listing notes.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude, ChatGPT, and other AI apps to share one MCP-accessible hub of Markdown-based memories and skills, with per-app adapters, versioned writes, git history, saving policies, Google OAuth, and a web UI.
      MIT