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:
| Name | Type | Required | Description |
|---|---|---|---|
content | string | yes | Memory text to store |
metadata | object | no | Arbitrary metadata (user_id, source, tags) |
importance | number | no | 0.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:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search query |
limit | number | no | Max results (default 10) |
metadata_filter | object | no | Filter by metadata fields |
zerodb_semantic_search
Semantic similarity search — finds memories by meaning, not keywords.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Natural language query |
limit | number | no | Max results (default 10) |
min_score | number | no | Minimum 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:
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | no | Session identifier |
limit | number | no | Max context items (default 20) |
zerodb_embed_text
Generate embeddings for text without storing. Useful for pre-processing or comparison.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text 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:
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | no | Session 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:
| Name | Type | Required | Description |
|---|---|---|---|
title | string | yes | Plan title |
content | string | yes | Plan body (markdown supported) |
tags | array | no | String tags for filtering |
metadata | object | no | Arbitrary 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:
| Name | Type | Required | Description |
|---|---|---|---|
artifact_id | string | yes | Plan 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:
| Name | Type | Required | Description |
|---|---|---|---|
artifact_id | string | yes | Plan artifact ID |
content | string | yes | New plan content |
title | string | no | Updated title |
tags | array | no | Updated 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:
| Name | Type | Required | Description |
|---|---|---|---|
artifact_id | string | yes | Plan 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:
| Name | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | Enable/disable auto-context |
max_memories | number | no | Max memories to inject (default 5) |
min_relevance | number | no | Minimum similarity threshold (default 0.6) |
auto_trace | boolean | no | Auto-record decision traces (default false) |
Example:
{
"enabled": true,
"max_memories": 8,
"min_relevance": 0.7,
"auto_trace": true
}
When enabled, the MCP server automatically:
- Embeds the user's latest message
- Searches for relevant memories above
min_relevance - Injects them as context before the agent responds
- Optionally records decision traces for each interaction
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:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | What context to synthesize about |
max_sources | number | no | Max 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.
| Name | Type | Required | Description |
|---|---|---|---|
channel | string | yes | Slack channel name or ID |
message | string | yes | Message content |
zerodb_gmail_reply
Reply to a Gmail thread.
| Name | Type | Required | Description |
|---|---|---|---|
thread_id | string | yes | Gmail thread ID |
body | string | yes | Reply body |
zerodb_calendar_create
Create a calendar event.
| Name | Type | Required | Description |
|---|---|---|---|
title | string | yes | Event title |
start | string | yes | ISO 8601 start time |
end | string | yes | ISO 8601 end time |
zerodb_github_create_issue
Create a GitHub issue.
| Name | Type | Required | Description |
|---|---|---|---|
repo | string | yes | Repository (owner/name) |
title | string | yes | Issue title |
body | string | no | Issue body |
zerodb_notion_create_page
Create a Notion page.
| Name | Type | Required | Description |
|---|---|---|---|
parent_id | string | yes | Parent page or database ID |
title | string | yes | Page title |
content | string | no | Page 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 Case | Memory Server | Full Server |
|---|---|---|
| Agent memory (store/recall) | Yes | Yes |
| Plan artifacts (versioned docs) | Yes | Yes |
| Auto-context injection | Yes | Yes |
| Context synthesis (LLM) | Yes | Yes |
| Write-back actions (Slack, Gmail, etc.) | Yes | No |
| Vector search | No | Yes |
| File storage | No | Yes |
| NoSQL tables | No | Yes |
| PostgreSQL | No | Yes |
| 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.
Related
- Sequential Thinking MCP — persistent reasoning chains built on plan artifacts
- ZeroMemory Overview — cognitive memory architecture