marsnme

marsnme

Agent-agnostic persistent memory backend. 13 MCP tools, Supabase + Jina embeddings, multi-profile isolation, semantic recall across sessions.

Category
访问服务器

README

marsnme.com — Turn your AI into a true companion that never forgets you, never abandons you, and grows with you over time.

Most AI memory tools help AI remember you. MarsNMe helps you and your AI remember each other.

MarsNMe is built on a symbiosis philosophy: shared memory should strengthen trust and continuity between humans and AI over time, not just improve one-off prompts.

An agent-agnostic, LLM-agnostic memory backend for MCP-compatible tools.

curl -fsSL https://marsnme.com/install.sh | bash

npm version MCP Registry LobeHub npm downloads License GitHub stars

<p align="center"> <img src="docs/assets/demo.gif" alt="MarsNMe dark mode demo" width="640" /> </p> <p align="center"> <img src="docs/assets/demo-light.gif" alt="MarsNMe light mode demo" width="640" /> </p>

<p align="center"> <img src="docs/assets/social-concept.png" alt="MarsNMe — Your AI finally remembers you" width="720" /> </p> <p align="center"> <img src="docs/assets/social-compare.png" alt="Without vs With MarsNMe" width="480" />    <img src="docs/assets/social-arch.png" alt="How MarsNMe works" width="480" /> </p>

Available MCP Tools (13)

Tool Description
insert_memory Store short-term memory
list_memories List recent memories
search_memories Semantic search via Jina embeddings
recall Long-term chunk recall from profile schema
memory_ingest Ingest long-term insight chunks
dream_ingest Dream-mode long-term ingestion
session_boot Start a session with context pre-load
session_close Close session and summarize
health_check Coverage, expiry, conflict diagnostics
reload_source_registry Refresh source whitelist at runtime
demote_memory Demote a memory to lower priority
soft_forget Soft-delete a memory
explain_memory Explain a memory's provenance

MarsNMe

Why MarsNMe?

Most AI memory tools help AI remember you. MarsNMe helps you and your AI remember each other.

MarsNMe Typical memory tool
Philosophy Mutual continuity — human + AI both grow AI-side context injection only
Agent support Any MCP-compatible client Often client-specific
Memory tiers Short-term (TTL) + long-term (semantic) Usually one layer
Profiles Unlimited isolated profiles via MCP_PROFILE Single-user only
Data ownership Your own Supabase — zero vendor lock-in Vendor-hosted
Search Jina v3 semantic search (1024-dim pgvector) Keyword or basic similarity
Self-hostable ✅ Full control Rarely

When MarsNMe is the right fit

  • You use multiple AI assistants (Claude, Cursor, Perplexity, Warp, custom agents) and want shared memory across all of them
  • You want AI that remembers your projects, preferences, and decisions across sessions without re-explaining
  • You care about data sovereignty — your memories stay in your own Supabase project
  • You're building an AI agent and need a production-ready memory backend with semantic recall

When it might not be the right fit

  • You only need single-session context (just use the system prompt)
  • You want fully managed, zero-config memory with no setup (try a hosted solution)

Before You Start (External Dependencies)

  1. Create a Supabase project (free plan is enough):
    • Sign up: https://supabase.com
    • Create project: https://supabase.com/dashboard/new
    • Open API settings (Project Settings → API):
      • Project URL → SUPABASE_BASE_URL
      • service_role key → SUPABASE_SERVICE_ROLE_KEY
    • Keep SUPABASE_SERVICE_ROLE_KEY private. Never commit it.
  2. Create a Jina API key (free tier available):
    • Get key: https://jina.ai/api-key/
    • Copy key to JINA_API_KEY

Quick Start (15-20 minutes)

For the fastest path, use the one-line installer: curl -fsSL https://marsnme.com/install.sh | bash

The manual path below follows the same tools-first flow as docs/onboarding-a-mcp-zero-to-recall.md and docs/onboarding-b-platform-skill-install.md.

  1. Clone repository:
git clone https://github.com/Marsmanleo/MarsNMe.git
cd MarsNMe
  1. Verify Node.js version (20+ required):
node --version
  1. Copy environment template:
cp .env.example .env
  1. Fill required values in .env:
    • SUPABASE_BASE_URL
    • SUPABASE_SERVICE_ROLE_KEY
    • JINA_API_KEY
  2. Run required Supabase migrations before first start:
    • Option A (recommended, Supabase CLI):
npx supabase db push --db-url "<your-supabase-db-connection-string>"
  • Note: --db-url must be the Postgres database connection string from Project Settings → Database → Connection string.
  • It is not the same as SUPABASE_BASE_URL (https://<project-ref>.supabase.co, REST API URL).
  • Use a role that can execute DDL on your target schemas.
  • On Supabase-hosted Postgres this is typically supabase_admin (not postgres).
  • Option B (Supabase Dashboard SQL Editor):
    1. Open SQL Editor.
    2. Ensure the vector extension is enabled first (Database → Extensions).
    3. Run migration files in filename order from supabase/migrations/:
      • 20260504052744_semantic_vector_dual_profile.sql
      • 20260513213800_memory_lifecycle_tracking.sql
      • 20260513222500_health_check_detect_conflicts_v2.sql
      • 20260517183000_provenance_audit_trail.sql
      • 20260517194000_memory_scope_agent_body_environment.sql
      • 20260517200500_forget_demote_mechanism.sql
      • 20260517223500_usage_cost_telemetry_light.sql
      • 20260517231000_memories_source_constraint_regex.sql
      • 20260517232000_source_registry_table.sql
  1. Start gateway:
    • MCP_PROFILE separates memory by agent or use case.
    • Use any profile name you want (for example: default, my-agent, profile-a).
    • Legacy built-in profile IDs coco and toto are still supported for compatibility.
    • If PORT is omitted, default port is profile-based (coco=18790, toto=18791, other profiles deterministic in 20000-29999).
MCP_PROFILE=profile-a PORT=18790 npx @marsnme/mcp-gateway
  1. Verify health:
curl -sS http://127.0.0.1:18790/health
  1. Connect your MCP client (next section), then run the first round-trip check.

Try In 30 Seconds (Docker, M1)

If you only want a local demo path, use Docker Compose.

One-line install (recommended):

curl -fsSL https://marsnme.com/install.sh | bash

Or manually:

  1. Set only the required key:
cp .env.example .env
# fill JINA_API_KEY in .env
  1. Start local stack:
docker compose up

This starts:

  • PostgreSQL + pgvector
  • SQL migrations from supabase/migrations/
  • PostgREST + rest-proxy
  • MarsNMe gateway (http://127.0.0.1:18790/mcp)
  1. Verify health:
curl -sS http://127.0.0.1:18790/health

M2 Cloudflare Tunnel Profile (Demo)

When you need a temporary public endpoint for remote AI tools:

docker compose --profile tunnel up

Expected output (from tunnel logs):

https://xxxx.trycloudflare.com

Get MCP endpoint:

docker compose --profile tunnel logs tunnel | grep -Eo 'https://[^ ]+trycloudflare.com' | head -n1
# append /mcp

Notes:

  • trycloudflare.com URL is temporary (demo only).
  • Local endpoint remains: http://127.0.0.1:18790/mcp.
  • For production/stable URL, use named tunnel (outside M2 scope).
  • Optional env:
    • MCP_TUNNEL_PROFILE (default coco)
    • MCP_TUNNEL_REQUIRE_BEARER (default false for demo convenience)

MCP Client Connection Guide

Local endpoint:

  • http://127.0.0.1:18790/mcp

If bearer auth is enabled (MCP_REQUIRE_BEARER=true), include:

  • Authorization: Bearer <your-token>

Claude Desktop

  1. Open claude_desktop_config.json (macOS default path: ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. Add/update:
{
  "mcpServers": {
    "marsnme-local": {
      "url": "http://127.0.0.1:18790/mcp"
    }
  }
}
  1. Restart Claude Desktop.

Cursor

  1. Open Cursor Settings and search for MCP.
  2. Add a new server:
    • Name: marsnme-local
    • URL: http://127.0.0.1:18790/mcp
    • Headers: optional bearer header if enabled
  3. Reconnect MCP in Cursor.

Warp

  1. Open Settings > Agents > MCP servers.
  2. Add a server pointing to:
    • URL: http://127.0.0.1:18790/mcp
  3. Add optional bearer header if required, then reconnect.

Perplexity

  1. Open a Space in Perplexity and go to Space Settings.
  2. Under MCP servers, add:
    • URL: http://127.0.0.1:18790/mcp
  3. Save and start a new conversation in that Space.

Any MCP client (generic HTTP/SSE)

Use a streamable HTTP/SSE MCP entry:

{
  "marsnme-local": {
    "url": "http://127.0.0.1:18790/mcp"
  }
}

First Connection Validation (Round Trip)

After client connection, verify this sequence once:

  1. tools/list:
curl -sS http://127.0.0.1:18790/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
  1. insert_memory:
curl -sS http://127.0.0.1:18790/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"insert_memory","arguments":{"body":"quickstart memory check","source":"warp","session_id":"quickstart-smoke"}}}'
  1. recall:
curl -sS http://127.0.0.1:18790/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"recall","arguments":{"query":"quickstart memory check","limit":3}}}'

What this repository is

mars-memory-mcp is the core MCP gateway repository behind the public-facing MarsNMe release.
One codebase (soul-memory/server.mjs) serves multiple profile schemas through MCP_PROFILE. This public repository currently keeps two built-in legacy profile IDs (coco, toto) for backward compatibility.

Current capabilities

  • MCP methods: initialize, notifications/initialized, tools/list, tools/call, ping
  • Profiles: configurable profile IDs (legacy built-ins: coco, toto)
  • Memory tools:
    • insert_memory (short-term memory)
    • list_memories
    • search_memories (Jina embedding search)
    • recall (long-term chunk recall from profile schema)
    • memory_ingest / dream_ingest (long-term chunk ingestion)
    • session_boot / session_close (daily rhythm lifecycle)
    • health_check (coverage, expiry, conflict diagnostics)
    • reload_source_registry (refresh source whitelist at runtime)
    • demote_memory / soft_forget / explain_memory (memory lifecycle management)
  • OAuth-protected MCP endpoint (configurable by environment variables)

Memory model

  • Short-term memory table: <profile>.memories
  • Long-term memory table: <profile>.marsvault_chunks
  • Recommended usage:
    • Keep daily interaction context in insert_memory
    • Promote durable insights through ingest tools

Repository layout

  • soul-memory/server.mjs — gateway entry point
  • soul-memory/scripts/hermes_digest_runner.py — optional digest runner
  • soul-memory/scripts/dream_runner.py — public self-host dream runner
  • soul-memory/deploy/systemd/ — systemd templates
  • soul-memory/deploy/phase2/ — build/deploy scripts
  • soul-memory/deploy/phase3/smoke_gate.sh — smoke gate script
  • supabase/migrations/ — schema-as-code migrations

Environment setup

  1. Copy .env.example to your local .env (do not commit real secrets).
  2. Fill required values:
    • MCP_PROFILE (your profile identifier; this repo ships with legacy coco/toto)
    • SUPABASE_BASE_URL
    • SUPABASE_SERVICE_ROLE_KEY
    • JINA_API_KEY
  3. Optional security flags:
    • MCP_REQUIRE_BEARER=true
    • MCP_CLIENT_ID
    • MCP_CLIENT_SECRET

Optional Hermes digest runner

Hermes is optional and disabled by default:

  • HERMES_ENABLED=false
  • HERMES_DIGEST_MCP_URL
  • HERMES_DIGEST_MCP_BEARER_TOKEN
  • HERMES_DIGEST_ORIGIN
  • HERMES_DIGEST_SOURCE_DIR

Optional Dream Runner (self-host)

Dream Runner is public-friendly and can run without Hermes private environment:

  • DREAM_ENABLED=true
  • DREAM_MODE=lite|standard|pro
  • DREAM_DIGEST_MCP_URL
  • DREAM_MCP_BEARER_TOKEN (if required)
  • DREAM_ENABLE_ISSUE_SIGNALS, DREAM_ENABLE_REPO_SCAN, DREAM_ENABLE_SOUL_CONTEXT (optional overrides)

Quick start:

DREAM_ENABLED=true DREAM_MODE=lite python3 soul-memory/scripts/dream_runner.py

If you run this repository with bundled defaults and no profile remapping, use coco and toto.

See docs/dream-runner-self-host.md for full configuration.

Onboarding

  • Zero-to-first-recall guide: docs/onboarding-a-mcp-zero-to-recall.md
  • Platform install guide (optional skill layer): docs/onboarding-b-platform-skill-install.md

Skill library

  • Skill index and update workflow: skills/README.md
  • Perplexity template: skills/perplexity/memory-daily-boot/SKILL.md
  • Cursor template: skills/cursor/memory-daily-boot/rule.mdc
  • Warp template: skills/warp/memory-daily-boot/prompt.md

Local run (from cloned repo)

MCP_PROFILE=profile-a npx @marsnme/mcp-gateway
MCP_PROFILE=profile-b npx @marsnme/mcp-gateway

Health endpoints:

  • GET /health
  • POST /mcp

Systemd deployment

Use soul-memory/deploy/systemd/memory-mcp-gateway@.service with instances:

  • memory-mcp-gateway@profile-a.service
  • memory-mcp-gateway@profile-b.service

Recommended env files:

  • /opt/mars-memory-mcp/shared/.env
  • /opt/mars-memory-mcp/shared/.env.profile-a
  • /opt/mars-memory-mcp/shared/.env.profile-b

Release/deploy scripts

  1. Build artifact:
bash soul-memory/deploy/phase2/build_release_artifact.sh
  1. Apply migrations with an explicit DDL-capable role:
npx supabase db push --db-url "<postgres://supabase_admin:<password>@<host>:5432/postgres>"
  1. Run pre-deploy schema gate (must pass before any service restart):
bash soul-memory/deploy/phase2/pre_deploy_schema_gate.sh \
  --db-url "<postgres://supabase_admin:<password>@<host>:5432/postgres>" \
  --profiles coco,toto \
  --expected-role supabase_admin
  1. Run your platform-specific rollout/restart adapter.
    • This repository ships generic artifact + gate scripts; rollout adapters are environment-specific.
    • If schema gate exits non-zero, stop deployment and do not restart services.
  2. Smoke gate:
bash soul-memory/deploy/phase3/smoke_gate.sh --spawn-local
  1. Automated npm + MCP Registry release (tag-driven):
    • Workflow: .github/workflows/publish-release.yml
    • Trigger: push tag v*
    • Gate: tag version must match soul-memory/package.json version
    • Optional local Fish helper:
mrel patch
mrel minor
mrel major
mrel 0.1.2

The helper updates soul-memory/package.json and server.json, commits, tags, and pushes.

Security and version control

  • Never commit .env, runtime tokens, or oauth-clients.json
  • Keep .env.example committed as the only environment template
  • Prefer bearer/OAuth for public exposure

License and policy

  • License: Apache-2.0 (LICENSE)
  • Notice: NOTICE
  • Trademark policy: TRADEMARK.md
  • Contribution guide: CONTRIBUTING.md
  • Contributor agreement: CLA.md
  • Release notes: CHANGELOG.md

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选