Skip to main content

Memory MCP Server

The thin memory MCP server (ainative-zerodb-memory-mcp) provides 18 tools for agent memory, structured reasoning, and write-back actions. 92% smaller than the full server.

npm i ainative-zerodb-memory-mcp

Tools Reference

zerodb_store_memory

Store a memory with content and metadata. Auto-generates embeddings.

Parameters:

NameTypeRequiredDescription
contentstringyesMemory text to store
metadataobjectnoArbitrary metadata (user_id, source, tags)
importancenumberno0.0-1.0, default 0.5

Example:

{
"content": "User prefers dark mode and uses Python",
"metadata": {"user_id": "u_123", "source": "chat"},
"importance": 0.8
}

zerodb_search_memory

Search memories by keyword or metadata filters.

Parameters:

NameTypeRequiredDescription
querystringyesSearch query
limitnumbernoMax results (default 10)
metadata_filterobjectnoFilter by metadata fields

Semantic similarity search — finds memories by meaning, not keywords.

Parameters:

NameTypeRequiredDescription
querystringyesNatural language query
limitnumbernoMax results (default 10)
min_scorenumbernoMinimum similarity threshold (0.0-1.0)

zerodb_get_context

Get the current session context window — recent memories and key facts for the active session.

Parameters:

NameTypeRequiredDescription
session_idstringnoSession identifier
limitnumbernoMax context items (default 20)

zerodb_embed_text

Generate embeddings for text without storing. Useful for pre-processing or comparison.

Parameters:

NameTypeRequiredDescription
textstringyesText to embed

Returns: 768-dimensional vector (BAAI/bge-base-en-v1.5).


zerodb_clear_session

Clear all session-scoped memories. Does not affect persistent memories.

Parameters:

NameTypeRequiredDescription
session_idstringnoSession to clear (defaults to current)

Plan Artifact Tools

Plan artifacts are structured, versioned documents — PRDs, plans, task lists, reasoning traces — stored persistently in ZeroDB with full diff history on every update. Added in v1.2.0.

zerodb_plan_create

Create a new plan artifact.

Parameters:

NameTypeRequiredDescription
titlestringyesPlan title
contentstringyesPlan body (markdown supported)
tagsarraynoString tags for filtering
metadataobjectnoArbitrary key-value metadata

Returns: { id, title, content, created_at, version }

Example:

{
"title": "Q3 API Refactor Plan",
"content": "## Goals\n- Migrate to async handlers\n- Add rate limiting",
"tags": ["backend", "q3"]
}

zerodb_plan_get

Retrieve the latest version of a plan artifact by ID.

Parameters:

NameTypeRequiredDescription
artifact_idstringyesPlan artifact ID

Returns: Latest version of the plan with full content and metadata.


zerodb_plan_update

Update a plan artifact. Every update creates a new version entry — full diff history is preserved.

Parameters:

NameTypeRequiredDescription
artifact_idstringyesPlan artifact ID
contentstringyesNew plan content
titlestringnoUpdated title
tagsarraynoUpdated tags

Returns: Updated plan with new updated_at and version.


zerodb_plan_history

Get the full version history of a plan artifact, ordered newest first.

Parameters:

NameTypeRequiredDescription
artifact_idstringyesPlan artifact ID

Returns: Array of all versions with timestamps and content diffs.


Auto-Context Tools

Auto-context automatically injects relevant memories into agent prompts without explicit recall calls.

zerodb_configure_auto_context

Enable or disable automatic context injection for the current session.

Parameters:

NameTypeRequiredDescription
enabledbooleanyesEnable/disable auto-context
max_memoriesnumbernoMax memories to inject (default 5)
min_relevancenumbernoMinimum similarity threshold (default 0.6)
auto_tracebooleannoAuto-record decision traces (default false)

Example:

{
"enabled": true,
"max_memories": 8,
"min_relevance": 0.7,
"auto_trace": true
}

When enabled, the MCP server automatically:

  1. Embeds the user's latest message
  2. Searches for relevant memories above min_relevance
  3. Injects them as context before the agent responds
  4. Optionally records decision traces for each interaction
note

Auto-context is independent of consolidation. Consolidation runs on schedule regardless of whether auto-context is enabled.


zerodb_get_auto_context_config

Get the current auto-context configuration for the active session.

Parameters: None

Returns:

{
"enabled": true,
"max_memories": 5,
"min_relevance": 0.6,
"auto_trace": false
}

zerodb_synthesize_context

Synthesize a natural-language context summary from relevant memories. Unlike get_context which returns raw memories, this uses an LLM to produce a coherent narrative.

Parameters:

NameTypeRequiredDescription
querystringyesWhat context to synthesize about
max_sourcesnumbernoMax source memories to consider (default 10)

Returns:

{
"synthesis": "The user is a senior backend engineer who prefers...",
"sources": ["mem_abc", "mem_def"],
"confidence": 0.85
}

Write-Back Action Tools

These tools allow agents to take actions based on memory insights — triggered by consolidation, auto-context, or agent decision.

zerodb_slack_send

Send a Slack message to a connected channel.

NameTypeRequiredDescription
channelstringyesSlack channel name or ID
messagestringyesMessage content

zerodb_gmail_reply

Reply to a Gmail thread.

NameTypeRequiredDescription
thread_idstringyesGmail thread ID
bodystringyesReply body

zerodb_calendar_create

Create a calendar event.

NameTypeRequiredDescription
titlestringyesEvent title
startstringyesISO 8601 start time
endstringyesISO 8601 end time

zerodb_github_create_issue

Create a GitHub issue.

NameTypeRequiredDescription
repostringyesRepository (owner/name)
titlestringyesIssue title
bodystringnoIssue body

zerodb_notion_create_page

Create a Notion page.

NameTypeRequiredDescription
parent_idstringyesParent page or database ID
titlestringyesPage title
contentstringnoPage content (markdown)

Configuration

{
"mcpServers": {
"zerodb-memory": {
"command": "npx",
"args": ["-y", "ainative-zerodb-memory-mcp"],
"env": {
"ZERODB_API_KEY": "your-api-key",
"ZERODB_PROJECT_ID": "your-project-id"
}
}
}
}

When to Use This vs Full Server

Use CaseMemory ServerFull Server
Agent memory (store/recall)YesYes
Plan artifacts (versioned docs)YesYes
Auto-context injectionYesYes
Context synthesis (LLM)YesYes
Write-back actions (Slack, Gmail, etc.)YesNo
Vector searchNoYes
File storageNoYes
NoSQL tablesNoYes
PostgreSQLNoYes
Bundle size~50KB~500KB

Use the memory server when your agent only needs memory and structured plans. Use the full server when you need the complete ZeroDB data layer.