MCP + Memory Storage

Empirical V2

A production-ready memory engine with semantic search, embeddings, and MCP tooling for ChatGPT app integration.

Node.js 18+ MongoDB OpenAI MCP stdio

README

Empirical V2 stores personal memories (notes, files, audio, structured data), enriches them with OpenAI embeddings and summaries, and exposes CRUD/search capabilities through both REST and MCP tool calls.

Core Features

  • Hybrid memory retrieval: semantic + filter search
  • Automatic tagging, summarization, and embeddings
  • Memory CRUD + soft-delete lifecycle
  • Optional file upload storage modes: local, Firebase, or S3
  • MCP stdio server for desktop app integrations

Local Installation

1) Install dependencies

npm install

2) Configure environment

cp .env.example .env

Minimum values to set in .env:

  • MONGO_URI
  • OPENAI_API_KEY
  • API_KEY and DEFAULT_USER_ID (for API routes)

3) Run API (optional)

npm run dev

4) Run MCP server

npm run mcp

Install In ChatGPT As An MCP App

This project now exposes a remote MCP endpoint at /mcp using Streamable HTTP transport.

MCP Server URL (ChatGPT form)

https://empirical.gauzza.com/mcp

Auth setting in ChatGPT

Start with No Authentication. Add OAuth only after your MCP auth flow is finalized.

ChatGPT setup checklist

  • Deploy this app and verify https://your-domain/health is healthy.
  • In ChatGPT New App, set MCP Server URL to https://your-domain/mcp.
  • Set auth to No Authentication first, then create.
  • Confirm tools appear: create_memory, query_memories, etc.

Quick verification prompts

  • Create a memory for user u_default: "Buy oat milk on Tuesday".
  • Find memories about groceries for user u_default.

Useful Commands

npm test
npm run test:integration
npm run test:coverage

Friend Access Provisioning

Open /admin for a DaisyUI form that generates friend userId + apiKey credentials.

It calls POST /api/v1/users/provision and requires x-admin-key = ADMIN_API_KEY.