zerodb_store_memory
Store conversation context in agent memory with automatic importance scoring and embedding. Supports multi-session tracking and memory decay.
roletagscontent必填user_idmetadatasession_id必填
io.github.AINative-Studio由 GitHub 账号 AINative-Studio 发布v1.2.12更新于 Nov 8, 2026
ZeroDB agent-memory MCP — 18 tools: memory + write-back to Slack, Gmail, Calendar, GitHub.
发布方自己的服务:Memory.fit
为助手提供由 ZeroDB 支持的持久化、可搜索的智能体记忆,并可回写到 Slack、Gmail、日历、GitHub 和 Notion。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
Persistent Memory for AI Agents
Optimized MCP server providing 14 tools for agent memory management, context synthesis, auto-context middleware, and write-back actions to external services.
Before: Monolithic server with 77 tools consuming 10,400+ tokens After: Focused server with 14 tools consuming ~1,400 tokens Result: 87% reduction in context footprint, faster agent decisions, better accuracy
Tip: API key authentication (
ZERODB_API_KEY) is preferred over username/password. It avoids token expiry issues and is not affected by shell environment variable conflicts.
zerodb_store_memoryStore conversation context with automatic importance scoring and embedding.
Input:
Output:
Features:
zerodb_search_memorySearch memory semantically using natural language.
Input:
Output:
Features:
scope: "agent"zerodb_get_contextGet full conversation context with smart pruning.
Input:
Output:
Features:
zerodb_embed_textGenerate vector embeddings for text.
Input:
Output:
Features:
zerodb_semantic_searchSearch by semantic similarity without text query.
Input:
Output:
Features:
zerodb_clear_sessionClear all memories for a session.
Input:
Output:
Features:
zerodb_synthesize_contextRetrieve and LLM-synthesize relevant memories into a coherent context string. Wraps POST /memory/v2/context. (Issue #2631)
Input:
Output:
Features:
narrative, bullet, structuredagent_id for per-user memory isolationzerodb_configure_auto_contextEnable auto-context middleware so that relevant memories are automatically prepended to every tool response for a given agent. (Issue #2678)
Input:
Output:
Features:
agent_id automatically prepends _auto_context to the responseauto_trace: true stores each tool response as a new episodic memory for future recall/remember — survives MCP server restartszerodb_get_auto_context_configRetrieve the current auto-context configuration for an agent.
Input:
Output:
Five tools that write back to external services using OAuth tokens stored in ZeroDB sync connections. Connect accounts at /api/v1/public/memory/v2/connections.
Agent workflow:
zerodb_recall→zerodb_synthesize_context→ take action (send Slack, reply email, create event, etc.)
zerodb_slack_sendSend a Slack message using the user's stored OAuth token. (Issue #2645)
Input:
Output:
Notes: thread_ts is optional — omit to post a new message, include to reply in a thread.
zerodb_gmail_replyReply to a Gmail thread using the user's stored Google OAuth token. (Issue #2646)
Input:
Output:
zerodb_calendar_createCreate a Google Calendar event using the user's stored Google OAuth token. (Issue #2647)
Input:
Output:
Notes: Uses the same Google OAuth token as Gmail. calendar_id defaults to "primary".
zerodb_github_create_issueCreate a GitHub issue using the user's stored GitHub OAuth token. (Issue #2648)
Input:
Output:
zerodb_notion_create_pageCreate a Notion page using the user's stored Notion OAuth token. (Issue #2649)
Input:
Output:
Notes: Content is converted to Notion paragraph blocks (one per non-empty line). Lines longer than 2000 characters are truncated.
Enable natural memory decay over time:
Example:
important tag: never decayCompress old conversations automatically:
Behavior:
summary tagKEEP_ORIGINALS=true)Choose embedding model based on needs:
Trade-offs:
Enable auto-context so every tool call gets relevant memories prepended automatically:
ZeroLocal (localhost:8000):
ZeroDB Cloud (api.ainative.studio):
Common cause: Shell environment variables (~/.zshrc, ~/.bashrc) override the credentials set in your MCP config (e.g., .claude.json or Claude Desktop config). The MCP server inherits all shell env vars, and stale ZERODB_USERNAME/ZERODB_PASSWORD values in your shell profile will take precedence.
Fix:
ZERODB_USERNAME/ZERODB_PASSWORD exports from ~/.zshrc or ~/.bashrcZERODB_API_KEY) which is not typically set in shell profilesenv block to override shell varsAlso check:
ZERODB_USERNAME and ZERODB_PASSWORD are correctCheck:
ZERODB_PROJECT_ID is correctIf using ZeroLocal:
If using Cloud:
Check configuration:
Contributions welcome! Please read our contributing guidelines first.
MIT License - see LICENSE file for details
Built with by AINative Studio
Making AI agents smarter, one memory at a time.
来源:README.md,提交 3feb2d3
Store conversation context in agent memory with automatic importance scoring and embedding. Supports multi-session tracking and memory decay.
roletagscontent必填user_idmetadatasession_id必填Search agent memory semantically using natural language queries. Supports cross-session search and filtering by tags, user, or time range.
tagslimitquery必填scopeuser_idsession_idmin_importanceGet full conversation context window for a session with smart pruning. Automatically manages token limits, applies memory decay, and prioritizes important/recent memories.
max_tokenssession_id必填include_statsGenerate vector embeddings for text using BAAI BGE models. Useful for manual vector operations or custom similarity calculations.
text必填modelnormalizeSearch memory by semantic similarity without needing a text query. Directly search using vector embeddings or similar memories.
textlimitvectorsession_idmin_similarityClear all memories for a session. Use with caution - this permanently deletes conversation history.
confirm必填session_id必填keep_importantRetrieve and LLM-synthesize relevant memories into a coherent context string. Searches memory for the query, retrieves top results, then uses Claude Haiku to synthesize a narrative, bullet list, or structured summary. Returns a ready-to-use context string for grounding AI responses.
query必填top_kagent_id必填max_tokenssynthesis_styleConfigure ambient memory injection. When enabled, ZeroDB automatically retrieves relevant memories before each tool call and prepends them as context — agents get memory without calling recall() explicitly.
enabled必填agent_id必填auto_tracemax_resultssynthesis_styleGet the current auto-context configuration for an agent.
agent_id必填Send a Slack message using your stored Slack OAuth connection. No API key required — uses the token from your connected Slack account in ZeroDB.
channel必填message必填thread_tsReply to a Gmail thread using your stored Google OAuth connection. Sends from your connected Gmail account.
ccbody必填thread_id必填Create a Google Calendar event using your stored Google OAuth connection.
end必填start必填title必填attendeescalendar_iddescriptionCreate a GitHub issue using your stored GitHub OAuth connection.
bodyrepo必填title必填labelsCreate a Notion page using your stored Notion OAuth connection.
title必填contentparent_id必填Create a persistent plan, PRD, or task artifact in ZeroDB. Returns an artifact ID you can pass to zerodb_plan_get/update/history in future sessions.
typetitle必填content必填session_idRetrieve a plan artifact by ID. Use this at session start to restore a plan from a previous session.
id必填Update a plan artifact. Content changes are diffed and stored in version history automatically.
id必填titlestatuscontentGet version history for a plan artifact. Returns list of diffs showing how the plan evolved.
id必填已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

fit.memory官方发布者
托管式 Memory.fit 服务器,让 AI 读取你的训练、睡眠、恢复与饮食数据,并写回每周计划、每日目标和饮食计划。
io.ddx.pg官方发布者
pg.ddx.io: the PostgreSQL community's memory 的托管 MCP 服务,由 pg.ddx.io 发布;无需登录;Streamable HTTP;29 个工具。
gg.var官方发布者
远程 MCP 服务器,可根据领域概念推荐并检索韩、日、中、越、英多语言的代码标识符名称,并提供 ERD 结构查询。

ai.counterparts
面向 Claude Code 与 Claude Desktop 的本地优先长期记忆:助手自行写下关于你和项目的笔记,并在之后的会话中回忆起来。

由 GitHub 账号 pedramgholizadeh 发布
以波斯语为先的地理记忆平台:发现地点,起草并发布仅限波斯语的记忆。AI 翻译
# Clone repositorygit clone https://github.com/ainative/zerodb-memory-mcp.gitcd zerodb-memory-mcp
# Install dependenciesnpm install
# Configure environmentcp .env.example .env# Edit .env with your credentials
# Test locallynpm start# Recommended: API key auth (no login needed)ZERODB_API_KEY=sk_xxxZERODB_API_URL=https://api.ainative.studioZERODB_PROJECT_ID=your-project-id
# OR username/password auth:[email protected]ZERODB_PASSWORD=your-passwordZERODB_API_URL=https://api.ainative.studioZERODB_PROJECT_ID=your-project-idexport ZERODB_API_URL="http://localhost:8000" # or cloud URLexport ZERODB_API_KEY="sk_your-api-key" # recommendedexport ZERODB_PROJECT_ID="your-project-id"{ "mcpServers": { "zerodb-memory": { "command": "node", "args": ["/path/to/zerodb-memory-mcp/index.js"], "env": { "ZERODB_API_URL": "http://localhost:8000", "ZERODB_USERNAME": "your-username", "ZERODB_PASSWORD": "your-password", "ZERODB_PROJECT_ID": "your-project-id" } } }}{ "mcpServers": { "zerodb-local": { "command": "node", "args": ["/path/to/zerodb-memory-mcp/index.js"], "env": { "ZERODB_API_URL": "http://localhost:8000", "ZERODB_USERNAME": "your-local-username", "ZERODB_PASSWORD": "your-local-password", "ZERODB_PROJECT_ID": "your-local-project-id" } }, "zerodb-cloud": { "command": "node", "args": ["/path/to/zerodb-memory-mcp/index.js"], "env": { "ZERODB_API_URL": "https://api.ainative.studio", "ZERODB_USERNAME": "your-cloud-username", "ZERODB_PASSWORD": "your-cloud-password", "ZERODB_PROJECT_ID": "your-cloud-project-id" } } }}{ "content": "User prefers technical explanations over simplified ones", "role": "system", "session_id": "chat-123", "tags": ["preference", "important"], "user_id": "user-456"}{ "success": true, "memory_id": "mem_abc123", "importance": 0.85, "message": "Memory stored successfully"}{ "query": "What are the user's dietary restrictions?", "limit": 10, "session_id": "chat-123", "scope": "agent", "min_importance": 0.5}{ "results": [ { "content": "User is allergic to peanuts", "role": "user", "importance": 0.95, "timestamp": "2026-02-28T10:30:00Z", "tags": ["health", "critical"], "similarity": 0.89, "session_id": "chat-123" } ], "count": 1, "scope": "agent"}{ "session_id": "chat-123", "max_tokens": 8192, "include_stats": true}{ "memories": [ { "content": "Hello, how can I help?", "role": "assistant", "importance": 0.6, "timestamp": "2026-02-28T10:00:00Z", "tags": [] } ], "total_tokens": 2048, "stats": { "pruned": true, "original_count": 50, "returned_count": 25, "token_limit": 8192 }}{ "text": "The quick brown fox jumps over the lazy dog", "model": "BAAI/bge-small-en-v1.5", "normalize": true}{ "embedding": [0.123, -0.456, 0.789, ...], "model": "BAAI/bge-small-en-v1.5", "dimensions": 384, "normalized": true}{ "text": "food preferences", "limit": 10, "session_id": "chat-123", "min_similarity": 0.7}{ "results": [ { "content": "User prefers vegetarian meals", "similarity": 0.85, "metadata": { "role": "user", "tags": ["preference"] } } ], "count": 1, "search_vector_dims": 384}{ "session_id": "chat-123", "keep_important": true, "confirm": true}{ "success": true, "deleted_count": 45, "kept_count": 5, "message": "Session cleared, important memories preserved"}{ "query": "What did we decide about the pricing model?", "agent_id": "user-456", "synthesis_style": "narrative", "max_tokens": 1000, "top_k": 10}{ "context": "In previous discussions, the team decided to use a usage-based pricing model...", "synthesis_style": "narrative", "sources_count": 5, "confidence": 0.87, "token_count": 312, "agent_id": "user-456"}{ "agent_id": "user-456", "enabled": true, "max_results": 10, "synthesis_style": "bullet", "auto_trace": false}{ "success": true, "agent_id": "user-456", "config": { "enabled": true, "max_results": 10, "synthesis_style": "bullet", "auto_trace": false }, "message": "Auto-context enabled for agent user-456"}{ "agent_id": "user-456"}{ "agent_id": "user-456", "config": { "enabled": true, "max_results": 10, "synthesis_style": "bullet", "auto_trace": false }}{ "agent_id": "user-456", "channel": "C012AB3CD", "message": "Sprint planning scheduled for Monday 10am", "thread_ts": "1609459200.000100"}{ "ts": "1609459201.000200", "channel": "C012AB3CD", "message": "Message sent successfully"}{ "agent_id": "user-456", "thread_id": "17abc123def456", "body": "Thanks for the update. I'll review the PR by EOD.", "cc": ["[email protected]"]}{ "id": "17abc123def999", "thread_id": "17abc123def456", "message": "Reply sent successfully"}{ "agent_id": "user-456", "title": "Sprint Planning", "start": "2026-05-10T10:00:00Z", "end": "2026-05-10T11:00:00Z", "description": "Q2 sprint kickoff", "attendees": ["[email protected]", "[email protected]"], "calendar_id": "primary"}{ "id": "evt_abc123", "html_link": "https://calendar.google.com/event?eid=abc123", "title": "Sprint Planning", "message": "Event created successfully"}{ "agent_id": "user-456", "repo": "acme/widget", "title": "Fix null pointer in payment flow", "body": "Steps to reproduce:\n1. Add item to cart\n2. Proceed to checkout\n3. Observe crash", "labels": ["bug", "priority:high"]}{ "number": 142, "html_url": "https://github.com/acme/widget/issues/142", "title": "Fix null pointer in payment flow", "message": "Issue created successfully"}{ "agent_id": "user-456", "parent_id": "parent-page-uuid", "title": "Meeting Notes — May 10", "content": "Attendees: Alice, Bob\n\nDecisions:\n- Ship v2 on Friday\n- Rollback plan: revert to v1.9"}{ "id": "page-uuid-xyz", "url": "https://notion.so/page-uuid-xyz", "title": "Meeting Notes — May 10", "message": "Page created successfully"}# Set maximum tokens (default: 8192)CONTEXT_WINDOW=16384
# Choose pruning strategy (default: hybrid)# - relevance: Keep highest-scored memories# - recency: Keep most recent memories# - hybrid: Combine both (70% relevance, 30% recency)PRUNE_STRATEGY=hybrid
# Always keep N recent messages (default: 5)KEEP_RECENT=5
# Keep memories tagged as important (default: true)KEEP_IMPORTANT=true# Enable decay (default: false)DECAY_ENABLED=true
# Half-life in days (default: 30)# After 30 days, importance score is halvedDECAY_HALFLIFE=30
# Protect tags from decayPRESERVE_TAGS=important,permanent,critical# Enable summarization (default: true)SUMMARIZE_ENABLED=true
# Summarize after N messages (default: 20)SUMMARIZE_AFTER=20
# Model for summarizationSUMMARY_MODEL=claude-3-haiku-20240307
# Keep original messages (default: false)KEEP_ORIGINALS=false# Small (384 dimensions) - Fast, efficientEMBEDDING_MODEL=BAAI/bge-small-en-v1.5
# Base (768 dimensions) - BalancedEMBEDDING_MODEL=BAAI/bge-base-en-v1.5
# Large (1024 dimensions) - Most accurateEMBEDDING_MODEL=BAAI/bge-large-en-v1.5// Store user preferencesawait zerodb_store_memory({ content: "User prefers email support over phone", role: "user", session_id: "support-session-123", tags: ["preference", "communication"], user_id: "customer-456"});
// Later, search across all sessions for this userconst prefs = await zerodb_search_memory({ query: "communication preferences", scope: "agent", user_id: "customer-456"});// Store important factsawait zerodb_store_memory({ content: "User's birthday is March 15th", role: "system", session_id: "assistant-123", tags: ["important", "permanent", "personal"], metadata: { category: "birthday" }});
// Retrieve context before respondingconst context = await zerodb_get_context({ session_id: "assistant-123", max_tokens: 4096});// Store findingsawait zerodb_store_memory({ content: "Study shows 85% efficacy in clinical trials", role: "assistant", session_id: "research-789", tags: ["research", "statistics"], metadata: { source: "Nature 2026", confidence: 0.9 }});
// Search semanticallyconst related = await zerodb_semantic_search({ text: "clinical trial results", limit: 5, min_similarity: 0.7});// 1. Recall relevant memoriesconst memories = await zerodb_recall({ query: "pending items from last standup", agent_id: "agent-456", top_k: 10, rerank: true});
// 2. Synthesize into a coherent summaryconst context = await zerodb_synthesize_context({ query: "pending items from last standup", agent_id: "agent-456", synthesis_style: "bullet", top_k: 5});// context.context = "- PR #42 needs review\n- Deploy blocked on staging tests\n- Alice OOO Monday"
// 3. Take action — send Slack updateawait zerodb_slack_send({ agent_id: "agent-456", channel: "C012AB3CD", message: `Standup summary:\n${context.context}`});
// 4. Log the action as a memory for future recallawait zerodb_store_memory({ content: `Sent standup summary to #engineering: ${context.context}`, role: "assistant", session_id: "agent-456", tags: ["action", "slack", "standup"]});// Enable once per agentawait zerodb_configure_auto_context({ agent_id: "agent-456", enabled: true, max_results: 10, synthesis_style: "bullet", auto_trace: true // also store tool responses as memories});
// Now every subsequent tool call automatically includes _auto_contextconst result = await zerodb_slack_send({ agent_id: "agent-456", channel: "C123", message: "Update sent"});// result._auto_context = "• User prefers concise updates\n• Last message sent 2h ago"// result.ts = "..."npm testDEBUG=* npm startnpm run dev# Check if ZeroLocal is runningcurl http://localhost:8000/health
# Start ZeroLocalcd /path/to/zerodb-localzerodb local up# Check internet connectionping api.ainative.studio
# Verify API is onlinecurl https://api.ainative.studio/health# Ensure context window is setecho $CONTEXT_WINDOW
# Verify prune strategyecho $PRUNE_STRATEGY
# Check if keep_recent is too highecho $KEEP_RECENT┌─────────────────────────────────────────────┐│ Agent Memory MCP Server │├─────────────────────────────────────────────┤│ ││ Main (index.js) ││ └── MCP Server initialization ││ ││ Client (zerodb-client.js) ││ ├── Auto-detection (local vs cloud) ││ ├── Authentication & token refresh ││ └── API request handling ││ ││ Memory Manager (memory-manager.js) ││ ├── Context window management ││ ├── Memory pruning (relevance/recency) ││ ├── Importance scoring ││ ├── Memory decay ││ └── Automatic summarization ││ ││ Tools (memory-tools.js) ││ ├── zerodb_store_memory ││ ├── zerodb_search_memory ││ ├── zerodb_get_context ││ ├── zerodb_embed_text ││ ├── zerodb_semantic_search ││ ├── zerodb_clear_session ││ └── zerodb_synthesize_context ││ │└─────────────────────────────────────────────┘