loading…
Search for a command to run...
loading…
A lightweight MCP server that gives Claude Code Channels on Telegram persistent memory by storing facts, conversation logs, and session summaries in Supabase.
A lightweight MCP server that gives Claude Code Channels on Telegram persistent memory by storing facts, conversation logs, and session summaries in Supabase.
Persistent memory for Claude Code Channels via Telegram, powered by Supabase and MCP.
Claude Memory is a lightweight MCP server built to give Claude Code Channels on Telegram a practical long-term memory layer. It stores facts, conversation logs, and session summaries in Supabase so Claude can recall useful context across sessions instead of starting from scratch every time.
It was created for the real-world workflow of staying connected to Claude through Telegram, where convenience is high but continuity can easily get lost.
Claude Code Channels on Telegram make it incredibly convenient to stay connected to Claude from anywhere, but useful context can disappear between sessions unless you provide a memory layer.
This project solves that problem by adding persistent memory through Supabase. It allows Claude to remember important facts, recall previous conversations, and carry forward relevant context over time.
The goal is not to build a giant, overengineered framework. The goal is to create a simple, practical memory system that is easy to run, easy to understand, and genuinely useful in everyday Claude Code workflows via Telegram.
While it was built specifically for Claude Code Channels on Telegram, the same overall pattern may also be useful for other trusted MCP-based Claude workflows.
remember — save an important factrecall — search previous facts, messages, and summariesforget — deactivate a factstart_session — begin a new conversation sessionend_session — close a sessionload_context — load useful recent contextlog_message — store conversation messagescurl -fsSL https://bun.sh/install | bash)claude-memory), set a password, and pick a regionThis creates three tables: messages, summaries, and facts.
https://abc123.supabase.co)service_role key, NOT the anon key)git clone https://github.com/jordanl61/claude-memory.git
cd claude-memory
# Create your .env file
cp .env.example .env
Edit .env and paste in your credentials:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
bun install
bun run build
Add this to your .claude.json file (in your home directory or project root):
{
"mcpServers": {
"memory": {
"command": "bun",
"args": ["run", "/full/path/to/claude-memory/dist/server.js"],
"env": {
"SUPABASE_URL": "https://your-project-id.supabase.co",
"SUPABASE_SERVICE_ROLE_KEY": "your-service-role-key-here"
}
}
}
}
Important: Replace
/full/path/to/claude-memory/with the actual absolute path where you cloned the repo.
Add the same config to your claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"memory": {
"command": "bun",
"args": ["run", "/full/path/to/claude-memory/dist/server.js"],
"env": {
"SUPABASE_URL": "https://your-project-id.supabase.co",
"SUPABASE_SERVICE_ROLE_KEY": "your-service-role-key-here"
}
}
}
}
Restart Claude Code or Claude Desktop. The memory tools should now be available.
To verify: Ask Claude "Do you have memory tools available?" — it should list the remember, recall, forget tools.
Once installed, just talk to Claude naturally:
rememberrecallforgetClaude will also automatically load context from past sessions when starting a new conversation (if you or Claude calls start_session).
The scripts/ directory contains hook scripts that automatically log every message and generate session summaries without you having to do anything. These only work with Claude Code (not Desktop), since they rely on Claude Code's hook system.
See the scripts in scripts/ if you want to set these up — they require additional configuration in your Claude Code settings.json.
You <-> Claude <-> MCP Server <-> Supabase
|
memory tools
(remember, recall, etc.)
server.ts) — Exposes memory tools via the Model Context Protocoldb.ts) — Handles all Supabase queriesschema.sql) — Three tables: messages, summaries, facts| File | Purpose |
|---|---|
server.ts |
MCP server entry point — defines all tools |
db.ts |
Supabase database helpers |
schema.sql |
Database table definitions |
package.json |
Dependencies and build scripts |
scripts/sync-to-supabase.ts |
Auto-sync hook (logs messages after each turn) |
scripts/session-summary.ts |
Session end summary hook |
scripts/save-fact.ts |
Utility to save facts directly |
scripts/memory-health-check.sh |
Health check script |
This project is intended to run in a trusted local or server-side MCP environment for Claude Code Channels via Telegram.
service_role key only in environments you controlservice_role key in browser-based apps or client-side code.env file or API keys to GitHubRow Level Security (RLS) is enabled in the Supabase setup, but the service_role key still has elevated privileges and should always be treated as highly sensitive.
Claude Memory is designed for a trusted MCP runtime using Supabase server credentials.
This project uses Supabase as the persistent memory layer and is intended to run locally or in a server environment you control. Row Level Security (RLS) is enabled, but the MCP server uses the Supabase service_role key for trusted server-side access.
That means:
service_role key must remain privateIf you want to adapt this project for a broader multi-user or less-trusted environment, you may want to extend it further with:
This project is provided in good faith as a practical tool for trusted Claude Code Channels via Telegram workflows.
It is provided as is, without warranty of any kind. You are responsible for reviewing the code, securing your environment, protecting your secrets, and deciding whether it is appropriate for your use case.
Please do not expose privileged Supabase credentials in untrusted or client-side environments. See the LICENSE file for the full license terms.
"Missing SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY"
Your .env file is missing or the env vars aren't being passed. Make sure the env block in your MCP config has the correct values.
Memory tools don't show up
Restart Claude Code/Desktop after adding the MCP config. Check that the path to dist/server.js is correct and absolute.
"logMessage error" / database errors
Make sure you ran schema.sql in the Supabase SQL Editor. Check that you're using the service_role key (not the anon key).
Created by Lawrence Jordan
MIT
Выполни в терминале:
claude mcp add claude-memory -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.