A NestJS server with a clean Memory module sits in front of a Postgres database. The same module is wrapped twice. Once as a REST API for the CLI and GUI clients. Once as an MCP tool surface for Claude.ai, ChatGPT, and Claude Code custom connectors.
The MCP layer uses Streamable HTTP in stateless mode. The session ID generator is undefined. Each request brings its own auth and spins up a fresh transport. That means no session affinity is required on Cloud Run, so instances can scale to zero between requests.
01Surface
Claude.ai connector · ChatGPT connector · Claude Code stdio · CLI · GUI
02Transport
Streamable HTTP (stateless) · OAuth 2.1 / API key auth
03Server
NestJS Memory module · MCP wrapper · REST API
04Storage
Postgres (Cloud SQL or self-hosted) · SQLite for local dev