# MarsNMe

A persistent memory gateway linking AI agents to Supabase and Jina embeddings. Preserves context across conversations.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: Marsmanleo
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Marsmanleo/MarsNMe/tree/HEAD/marsnme-supabase
- Updated: 2026-10-18
- HTML: https://affpapa.org/en/nevibecode/mcp/marsnme

## What it does

The `@marsnme/mcp-gateway` package runs an HTTP-based MCP server providing memory tools at `POST /mcp` alongside a `GET /health` status route. It enables assistants to persist dialogue context across sessions instead of losing state after a reset.

Setup depends on Node.js version 20 or higher, an active Supabase database with schema migrations, and a Jina API key for vector lookups. Agents are partitioned by the `MCP_PROFILE` environment variable. Built-in profile identifiers like `coco` or `toto` default to ports 18790 and 18791, while custom profiles resolve to ports between 20000 and 29999.

Migrations require a role capable of running DDL, specifically `supabase_admin`. Without that role and a valid Jina key, vector search across stored agent interactions will fail.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MCP_PROFILE`, `SUPABASE_BASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, `JINA_API_KEY`, `PORT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Supabase

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MCP_PROFILE=<MCP_PROFILE> --env SUPABASE_BASE_URL=<SUPABASE_BASE_URL> --env SUPABASE_SERVICE_ROLE_KEY=<SUPABASE_SERVICE_ROLE_KEY> --env JINA_API_KEY=<JINA_API_KEY> --env PORT=<PORT> --transport stdio marsnme-supabase -- npx -y @marsnme/mcp-gateway
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add marsnme-supabase --env MCP_PROFILE=<MCP_PROFILE> --env SUPABASE_BASE_URL=<SUPABASE_BASE_URL> --env SUPABASE_SERVICE_ROLE_KEY=<SUPABASE_SERVICE_ROLE_KEY> --env JINA_API_KEY=<JINA_API_KEY> --env PORT=<PORT> -- npx -y @marsnme/mcp-gateway
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "marsnme-supabase": {
            "command": "npx",
            "args": [
                "-y",
                "@marsnme/mcp-gateway"
            ],
            "env": {
                "MCP_PROFILE": "<MCP_PROFILE>",
                "SUPABASE_BASE_URL": "<SUPABASE_BASE_URL>",
                "SUPABASE_SERVICE_ROLE_KEY": "<SUPABASE_SERVICE_ROLE_KEY>",
                "JINA_API_KEY": "<JINA_API_KEY>",
                "PORT": "<PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "marsnme-supabase": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@marsnme/mcp-gateway"
            ],
            "env": {
                "MCP_PROFILE": "<MCP_PROFILE>",
                "SUPABASE_BASE_URL": "<SUPABASE_BASE_URL>",
                "SUPABASE_SERVICE_ROLE_KEY": "<SUPABASE_SERVICE_ROLE_KEY>",
                "JINA_API_KEY": "<JINA_API_KEY>",
                "PORT": "<PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MCP_PROFILE=<MCP_PROFILE> -e SUPABASE_BASE_URL=<SUPABASE_BASE_URL> -e SUPABASE_SERVICE_ROLE_KEY=<SUPABASE_SERVICE_ROLE_KEY> -e JINA_API_KEY=<JINA_API_KEY> -e PORT=<PORT> marsnme-supabase npx -y @marsnme/mcp-gateway
```
Replace <…> with your own values

## When to use it
- persist user context and memories across separate chat sessions
- search past interactions using Jina vector embeddings
- connect assistant memory storage to a Supabase Postgres database
- partition conversation history between distinct agent profile IDs

## Example prompts
- Save our decision about switching to Supabase into my persistent memory profile
- Query past agent memories for mentions of the deployment safety gate
- Check the memory gateway health status using the `/health` endpoint

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
