MarsNMe
Persistent two-layer memory gateway for AI agents, backed by Supabase and pgvector
- Pricing
- Open source
- Platforms
- self-hosted, CLI, API
- Runs
- Remotely
- Version
- 0.3.2
- Listing updated
- 2 days ago
About MarsNMe
MarsNMe is an open-source MCP server for knowledge and memory. It runs as a hosted remote server, so there is nothing to install locally.
MarsNMe is a self-run MCP gateway that stores what happened between you and your agents, not just notes you wrote. Short-term memory holds session context in a profile's memories table with roughly a 30-day expiry. Long-term knowledge is stored as chunks with Jina v3 embeddings (1024 dimensions) in pgvector, searched by semantic recall.
Retrieval drills down in three steps: recall returns about 80-character previews, get_summary gives about 300 characters, and get_full returns the complete text. Each MCP_PROFILE gets its own isolated schema, so any number of agents can share one codebase without mixing memory. Migrations live in the repository as schema-as-code.
The package is run with npx on Node.js 20 or later and needs a Supabase project, its service-role key and a Jina API key. It serves POST /mcp and GET /health locally on a profile-based port, with optional Bearer enforcement and OAuth. The site also describes a hosted route and a Cloudflare-based self-hosted variant.
Install
Run in a terminal
claude mcp add marsnme --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>' -- npx -y @marsnme/mcp-gatewayAdd to claude_desktop_config.json
{
"mcpServers": {
"marsnme": {
"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>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"marsnme": {
"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>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"marsnme": {
"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>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"marsnme": {
"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>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"marsnme": {
"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>"
}
}
}
}Configuration
MCP_PROFILEProfile ID used to separate memory data (for example: profile-a).RequiredSUPABASE_BASE_URLSupabase REST API project URL.RequiredSUPABASE_SERVICE_ROLE_KEYSupabase service role key.RequiredJINA_API_KEYJina AI API key for embedding-based tools.RequiredPORTLocal HTTP port for the MCP endpoint. If omitted, defaults by MCP_PROFILE (coco=18790, toto=18791, others deterministic in 20000-29999).
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
- recall
- Return about 80-character previews of matching memories.
- get_summary
- Fetch about 300-character excerpts.
- get_full
- Pull complete text.
What it does
- Two memory layers
- Short-term session memory with expiry and permanent long-term chunks.
- Semantic recall
- pgvector search over Jina v3 embeddings.
- Layered retrieval
- Previews, summaries and full text on demand.
- Isolated profiles
- One schema per agent.
- Schema-as-code
- Versioned migrations for reproducible setup.
- Optional auth
- Bearer enforcement and OAuth endpoints.
Good for
- Give a coding agent memory across sessions
- Keep separate memory spaces for several agents
- Recall earlier decisions by meaning
- Self-host agent memory on your own Supabase
Pricing
Open source
Self-hosted; needs Supabase and Jina API accounts
Prices change. Check marsnme.com before you buy.
MarsNMe FAQ
What do I need to run it?
Node.js 20 or later, a Supabase project and service-role key, and a Jina API key.
How long does short-term memory last?
The site says about 30 days.
Can several agents share it?
Yes, each MCP_PROFILE has its own isolated schema.
Is there a health check?
Yes. GET /health on the local port, 18790 by default for the coco profile.
Is MarsNMe free?
Yes. MarsNMe is open source, so you can use and self-host it for free.
How do I add MarsNMe to Claude Code?
Run this command in your terminal: claude mcp add marsnme --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>' -- npx -y @marsnme/mcp-gateway
What are the best alternatives to MarsNMe?
The closest alternatives to MarsNMe are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.
Alternatives to MarsNMe

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Claude Code Ultimate Guide
MCP serverMCP server for searching the Claude Code Ultimate Guide from any MCP client
Runs locally- Open source
- 6.5K GitHub stars
- AI models and LLM tooling

Nautilus Compass Memory
MCP serverLocal-first long-term memory layer for AI agents, served over MCP
Not checked yet- 5 tools
- Remote
- Open source
- 1.3K GitHub stars
- Knowledge and memory

note1
MCP serverMCP server giving AI assistants search and summaries across your note1 meetings
- 4 tools
- Remote
- Free trial
- 1 GitHub star
- Productivity
MedXpert 图书馆连接器(通用版)
MCP serverLocal MCP server that searches and answers questions over your own Markdown wiki
Runs locally- 4 tools
- Open source
- Knowledge and memory