Persistent memory service for AI assistants using the Model Context Protocol (MCP).
This project is currently on pause. The codebase remains available for reference, self-hosting, and future continuation.
This repository provides:
memory_server.py: FastAPI API for memory storage/search, token management, and checkpoints.memory_mcp_direct.py: MCP server (Streamable HTTP + SSE compatibility) that exposes memory tools.frontend/: React app for token generation and integration onboarding.examples/: Node examples for MCP + OpenAI function-calling integration.
- Multi-tenant token auth (
auth_tokenstable) - Semantic memory search with pgvector + SentenceTransformers (
all-MiniLM-L6-v2) - Conflict detection and duplicate prevention
- Checkpoint/resume for short-term conversation handoff
- MCP tools:
remember,recall,forget,what_do_you_know,checkpoint,resume
Client (Claude/Cursor/Custom) -> MCP Server (memory_mcp_direct.py) -> Memory API (memory_server.py) -> PostgreSQL + pgvector
- Frontend: https://usemindmirror.com
- Backend API: https://memory.usemindmirror.com
- Create local secrets file (not committed):
cp .env.local.example .env.local
$EDITOR .env.local- Set required DB config in
.env.local:
DATABASE_URL(recommended), orDB_HOST,DB_NAME,DB_USER,DB_PASSWORD(+ optionalDB_PORT,DB_SSLMODE)
- Start the stack (recommended for AIs and local dev):
docker compose --env-file .env.local up --build- Health checks:
curl http://localhost:8001/health
curl http://localhost:8000/healthOptional non-Docker run:
cp .env.example .env
pip install -r requirements.txt
python memory_server.py
python memory_mcp_direct.pycd frontend
cp .env.example .env
npm install
npm run devSee .env.local.example, .env.example, and frontend/.env.example.
Important runtime variables:
DATABASE_URLorDB_*varsMEMORY_API_BASE(used by MCP proxy service, defaulthttp://localhost:8001)CORS_ALLOW_ORIGINSALLOWED_API_HOSTSMCP_ALLOWED_HOSTSENFORCE_HOST_CHECKBOOTSTRAP_DEFAULT_TOKEN(defaultfalse)
- Do not commit real API keys, tokens, or database credentials.
- Use environment variables for all secrets.
- If this repository was ever exposed with real credentials, rotate them before publishing.
POST /api/generate-tokenPOST /api/join-waitlistPOST /memoriesPOST /memories/searchGET /memoriesGET /memories/{id}DELETE /memories/{id}POST /checkpointPOST /resume
Auth token can be passed via:
Authorization: Bearer <token>?token=<token>(legacy compatibility)
MIT (see LICENSE).