The AINative ZeroDB MCP Server provides enterprise-grade persistent memory and vector search capabilities for AI agents through Claude Desktop integration.
Core Capabilities:
Persistent Memory Management: Store, search, and retrieve agent memories across sessions with semantic similarity search. Supports role-based organization (user/assistant/system), session and agent-based filtering, and token-optimized context retrieval
Vector Operations: Store and search 1536-dimensional vector embeddings (OpenAI-compatible) using cosine similarity with configurable thresholds. Includes namespace organization, metadata support, and batch operations
Authentication: JWT token management with automatic renewal every 25 minutes and manual renewal capability
Multi-tenant Support: Project-based isolation for different applications with feature enablement controls
Extended Capabilities (via API):
Quantum Operations: Advanced quantum algorithms for vector compression, decompression, and hybrid quantum-enhanced searches
NoSQL Data Management: Create, query, update, and delete structured data within flexible tables
File Storage: Upload, download, list, and manage files with time-limited presigned URLs
Event System: Publish, subscribe to events, and track event history and statistics
RLHF Collection: Gather user interactions, agent feedback, workflow metrics, and error reports for reinforcement learning
Administration: Monitor system health, view statistics and usage reports (admin roles required)
Note: The MCP interface exposes 6 core operations for memory and vector management, while additional features require direct API access.
Provides community support through Discord for the ZeroDB MCP server
Hosts the source code repository and issue tracking for the ZeroDB MCP server
Distributes the ZeroDB MCP server package for installation and dependency management
ZeroDB MCP Server v2.0.8
Enterprise-grade Model Context Protocol (MCP) server providing full access to ZeroDB's vector search, quantum compression, NoSQL operations, and persistent memory for AI agents.
Key Features
60 Complete Operations - Full API coverage across all ZeroDB capabilities
Vector Search - Semantic similarity search with 1536-dimensional embeddings
Quantum Compression - Advanced vector compression using quantum algorithms
NoSQL Tables - Flexible table operations for structured data
File Storage - Secure file upload, download, and management
Event System - Event-driven architecture with pub/sub support
Project Management - Multi-tenant project isolation and management
RLHF Integration - Reinforcement Learning from Human Feedback collection
Admin Tools - System monitoring, optimization, and health checks
Enterprise Security - JWT authentication with automatic token renewal
90%+ Test Coverage - Comprehensive test suite for production reliability
Table of Contents
Installation
NPM Global Installation
NPX (No Installation Required)
Requirements
Node.js >= 18.0.0
NPM >= 9.0.0
ZeroDB account with API credentials (see below)
Getting Started
Step 1: Create Your ZeroDB Account
Before using the MCP server, you need a ZeroDB account and project.
Option A: Register via Web (Recommended)
Visit: https://api.ainative.studio/docs
Click on "Register User" endpoint
Use the "Try it out" feature
Enter your email, password, and username
Option B: Register via API
Response:
Step 2: Create a Project
After registration, create a project to get your PROJECT_ID:
Response:
Response:
Save this Project ID! You'll need it for the MCP configuration.
Quick Start
Step 3: Configure Claude Desktop
Add to your Claude Desktop configuration file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Step 4: Restart Claude Desktop
After saving the configuration, restart Claude Desktop to activate the MCP server.
Step 5: Test Your First Operation
In Claude Desktop, try:
Claude will use the zerodb_store_memory tool to persist this information.
API Reference
All 60 operations are organized into 9 categories. Each operation is exposed as an MCP tool that Claude can invoke.
Memory Operations
1. zerodb_store_memory
Store agent memory in ZeroDB for persistent context across sessions.
Parameters:
content(string, required) - Memory content to storerole(string, required) - Message role:"user","assistant", or"system"session_id(string, optional) - Session identifier (auto-generated if not provided)agent_id(string, optional) - Agent identifier (auto-generated if not provided)metadata(object, optional) - Additional metadata
Returns:
Example:
2. zerodb_search_memory
Search agent memory using semantic similarity.
Parameters:
query(string, required) - Search querysession_id(string, optional) - Filter by sessionagent_id(string, optional) - Filter by agentrole(string, optional) - Filter by rolelimit(number, optional) - Max results (default: 10)
Returns:
Example:
3. zerodb_get_context
Get agent context window for current session, optimized for token limits.
Parameters:
session_id(string, required) - Session identifieragent_id(string, optional) - Agent identifiermax_tokens(number, optional) - Max tokens in context (default: 8192)
Returns:
Example:
Vector Operations
4. zerodb_store_vector
Store vector embedding with metadata (exactly 1536 dimensions).
Parameters:
vector_embedding(array[number], required) - 1536-dimensional vectordocument(string, required) - Source document textmetadata(object, optional) - Document metadatanamespace(string, optional) - Vector namespace (default: "windsurf")
Returns:
Example:
5. zerodb_batch_upsert_vectors
Batch upsert multiple vectors for improved performance.
Parameters:
vectors(array, required) - Array of vector objectsvector_embedding(array[number], required) - 1536-dimensional vectordocument(string, required) - Source documentmetadata(object, optional) - Document metadata
namespace(string, optional) - Vector namespace
Returns:
Example:
6. zerodb_search_vectors
Search vectors using semantic similarity.
Parameters:
query_vector(array[number], required) - 1536-dimensional query vectornamespace(string, optional) - Vector namespacelimit(number, optional) - Max results (default: 10)threshold(number, optional) - Similarity threshold 0-1 (default: 0.7)
Returns:
Example:
7. zerodb_delete_vector
Delete a specific vector by ID.
Parameters:
vector_id(string, required) - Vector UUID to delete
Returns:
Example:
8. zerodb_get_vector
Retrieve a specific vector by ID.
Parameters:
vector_id(string, required) - Vector UUID to retrieve
Returns:
Example:
9. zerodb_list_vectors
List vectors with pagination and filtering.
Parameters:
namespace(string, optional) - Filter by namespacelimit(number, optional) - Results per page (default: 50)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
10. zerodb_vector_stats
Get statistics about vector storage.
Parameters:
namespace(string, optional) - Filter by namespace
Returns:
Example:
11. zerodb_create_vector_index
Create a vector search index for improved performance.
Parameters:
namespace(string, required) - Namespace to indexindex_type(string, optional) - Index type: "ivfflat" or "hnsw" (default: "hnsw")params(object, optional) - Index-specific parameters
Returns:
Example:
12. zerodb_optimize_vectors
Optimize vector storage and indexes.
Parameters:
namespace(string, optional) - Namespace to optimize
Returns:
Example:
13. zerodb_export_vectors
Export vectors to external format.
Parameters:
namespace(string, required) - Namespace to exportformat(string, optional) - Export format: "json" or "csv" (default: "json")include_embeddings(boolean, optional) - Include vector data (default: false)
Returns:
Example:
Quantum Operations
14. zerodb_quantum_compress
Compress vector using quantum algorithms for reduced storage.
Parameters:
vector_embedding(array[number], required) - 1536-dimensional vector to compresscompression_ratio(number, optional) - Target ratio 0-1 (default: 0.5)algorithm(string, optional) - Algorithm: "qaoa" or "vqe" (default: "qaoa")
Returns:
Example:
15. zerodb_quantum_decompress
Decompress quantum-compressed vector.
Parameters:
compressed_vector(array[number], required) - Compressed vector dataoriginal_dimensions(number, required) - Original dimension count
Returns:
Example:
16. zerodb_quantum_hybrid_search
Perform hybrid search using quantum-enhanced similarity.
Parameters:
query_vector(array[number], required) - 1536-dimensional querynamespace(string, optional) - Vector namespacelimit(number, optional) - Max results (default: 10)quantum_weight(number, optional) - Quantum influence 0-1 (default: 0.5)
Returns:
Example:
17. zerodb_quantum_optimize
Optimize vector space using quantum optimization.
Parameters:
namespace(string, required) - Namespace to optimizeoptimization_target(string, optional) - "storage" or "search_speed" (default: "storage")
Returns:
Example:
18. zerodb_quantum_feature_map
Generate quantum feature map for vector.
Parameters:
vector_embedding(array[number], required) - 1536-dimensional vectorfeature_map_type(string, optional) - "zz" or "pauli" (default: "zz")
Returns:
Example:
19. zerodb_quantum_kernel
Compute quantum kernel similarity between vectors.
Parameters:
vector_a(array[number], required) - First 1536-dimensional vectorvector_b(array[number], required) - Second 1536-dimensional vectorkernel_type(string, optional) - "linear" or "rbf" (default: "rbf")
Returns:
Example:
Table/NoSQL Operations
20. zerodb_create_table
Create a new NoSQL table with schema.
Parameters:
table_name(string, required) - Table nameschema(object, required) - JSON schema definitiondescription(string, optional) - Table description
Returns:
Example:
21. zerodb_list_tables
List all tables in project.
Parameters:
limit(number, optional) - Results per page (default: 50)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
22. zerodb_get_table
Get table details and schema.
Parameters:
table_id(string, required) - Table UUID
Returns:
Example:
23. zerodb_delete_table
Delete a table and all its data.
Parameters:
table_id(string, required) - Table UUID to delete
Returns:
Example:
24. zerodb_insert_rows
Insert rows into table.
Parameters:
table_id(string, required) - Table UUIDrows(array, required) - Array of row objects
Returns:
Example:
25. zerodb_query_rows
Query table rows with filters.
Parameters:
table_id(string, required) - Table UUIDfilters(object, optional) - Query filterslimit(number, optional) - Max results (default: 50)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
26. zerodb_update_rows
Update rows in table.
Parameters:
table_id(string, required) - Table UUIDfilters(object, required) - Row selection filtersupdates(object, required) - Fields to update
Returns:
Example:
27. zerodb_delete_rows
Delete rows from table.
Parameters:
table_id(string, required) - Table UUIDfilters(object, required) - Row selection filters
Returns:
Example:
File Operations
28. zerodb_upload_file
Upload file to ZeroDB storage.
Parameters:
file_name(string, required) - File namefile_data(string, required) - Base64-encoded file datacontent_type(string, optional) - MIME typemetadata(object, optional) - File metadata
Returns:
Example:
29. zerodb_download_file
Download file from ZeroDB storage.
Parameters:
file_id(string, required) - File UUID
Returns:
Example:
30. zerodb_list_files
List files with pagination.
Parameters:
limit(number, optional) - Results per page (default: 50)offset(number, optional) - Pagination offset (default: 0)content_type(string, optional) - Filter by MIME type
Returns:
Example:
31. zerodb_delete_file
Delete file from storage.
Parameters:
file_id(string, required) - File UUID to delete
Returns:
Example:
32. zerodb_get_file_metadata
Get file metadata without downloading.
Parameters:
file_id(string, required) - File UUID
Returns:
Example:
33. zerodb_generate_presigned_url
Generate temporary download URL.
Parameters:
file_id(string, required) - File UUIDexpiry_seconds(number, optional) - URL validity (default: 3600)
Returns:
Example:
Event Operations
34. zerodb_create_event
Create a new event in the event system.
Parameters:
event_type(string, required) - Event type identifierevent_data(object, required) - Event payloadmetadata(object, optional) - Event metadata
Returns:
Example:
35. zerodb_list_events
List events with filtering and pagination.
Parameters:
event_type(string, optional) - Filter by event typestart_date(string, optional) - Filter by start date (ISO 8601)end_date(string, optional) - Filter by end date (ISO 8601)limit(number, optional) - Results per page (default: 50)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
36. zerodb_get_event
Get specific event by ID.
Parameters:
event_id(string, required) - Event UUID
Returns:
Example:
37. zerodb_subscribe_events
Subscribe to event stream (WebSocket).
Parameters:
event_types(array[string], required) - Event types to subscribe tofilters(object, optional) - Additional filters
Returns:
Example:
38. zerodb_event_stats
Get event statistics and analytics.
Parameters:
event_type(string, optional) - Filter by event typestart_date(string, optional) - Start date (ISO 8601)end_date(string, optional) - End date (ISO 8601)group_by(string, optional) - Group by: "hour", "day", "week" (default: "day")
Returns:
Example:
Project Operations
39. zerodb_create_project
Create a new ZeroDB project.
Parameters:
project_name(string, required) - Project namedescription(string, optional) - Project descriptionsettings(object, optional) - Project settings
Returns:
Example:
40. zerodb_get_project
Get project details.
Parameters:
project_id(string, required) - Project UUID
Returns:
Example:
41. zerodb_list_projects
List all accessible projects.
Parameters:
limit(number, optional) - Results per page (default: 50)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
42. zerodb_update_project
Update project settings.
Parameters:
project_id(string, required) - Project UUIDproject_name(string, optional) - New project namedescription(string, optional) - New descriptionsettings(object, optional) - Updated settings
Returns:
Example:
43. zerodb_delete_project
Delete a project and all its data.
Parameters:
project_id(string, required) - Project UUID to deleteconfirm(boolean, required) - Must be true to confirm deletion
Returns:
Example:
44. zerodb_get_project_stats
Get project usage statistics.
Parameters:
project_id(string, required) - Project UUIDstart_date(string, optional) - Start date (ISO 8601)end_date(string, optional) - End date (ISO 8601)
Returns:
Example:
45. zerodb_enable_database
Enable database features for project.
Parameters:
project_id(string, required) - Project UUIDfeatures(array[string], required) - Features to enable: ["vectors", "tables", "files", "events"]
Returns:
Example:
RLHF Operations
46. zerodb_rlhf_interaction
Collect user interaction for RLHF training.
Parameters:
session_id(string, required) - Session identifieruser_input(string, required) - User's inputagent_response(string, required) - Agent's responsefeedback_score(number, optional) - User rating 1-5metadata(object, optional) - Additional context
Returns:
Example:
47. zerodb_rlhf_agent_feedback
Collect feedback about agent performance.
Parameters:
agent_id(string, required) - Agent identifiersession_id(string, required) - Session identifierfeedback_type(string, required) - "positive" or "negative"feedback_text(string, optional) - Detailed feedbackmetrics(object, optional) - Performance metrics
Returns:
Example:
48. zerodb_rlhf_workflow
Collect feedback about workflow completion.
Parameters:
workflow_id(string, required) - Workflow identifiersession_id(string, required) - Session identifiercompleted(boolean, required) - Workflow completion statusduration_ms(number, optional) - Workflow durationfeedback(object, optional) - Workflow feedback
Returns:
Example:
49. zerodb_rlhf_error
Collect error reports for model improvement.
Parameters:
session_id(string, required) - Session identifiererror_type(string, required) - Error categoryerror_message(string, required) - Error descriptioncontext(object, optional) - Error contextuser_impact(string, optional) - Impact level: "low", "medium", "high"
Returns:
Example:
50. zerodb_rlhf_status
Get RLHF collection status.
Parameters:
session_id(string, optional) - Filter by sessionstart_date(string, optional) - Start date (ISO 8601)end_date(string, optional) - End date (ISO 8601)
Returns:
Example:
51. zerodb_rlhf_summary
Get RLHF analytics summary.
Parameters:
group_by(string, optional) - Group by: "agent", "workflow", "session" (default: "agent")start_date(string, optional) - Start date (ISO 8601)end_date(string, optional) - End date (ISO 8601)
Returns:
Example:
52. zerodb_rlhf_start
Start RLHF collection for session.
Parameters:
session_id(string, required) - Session identifiercollection_config(object, optional) - Collection settings
Returns:
Example:
53. zerodb_rlhf_stop
Stop RLHF collection for session.
Parameters:
session_id(string, required) - Session identifier
Returns:
Example:
54. zerodb_rlhf_session
Get all interactions for a session.
Parameters:
session_id(string, required) - Session identifierlimit(number, optional) - Max results (default: 100)
Returns:
Example:
55. zerodb_rlhf_broadcast
Broadcast RLHF event to subscribers.
Parameters:
event_type(string, required) - Event typeevent_data(object, required) - Event payloadtarget_sessions(array[string], optional) - Target session IDs
Returns:
Example:
Admin Operations
56. zerodb_admin_system_stats
Get system-wide statistics (requires admin role).
Parameters:
include_details(boolean, optional) - Include detailed metrics (default: false)
Returns:
Example:
57. zerodb_admin_list_projects
List all projects in system (requires admin role).
Parameters:
user_id(string, optional) - Filter by userlimit(number, optional) - Results per page (default: 100)offset(number, optional) - Pagination offset (default: 0)
Returns:
Example:
58. zerodb_admin_user_usage
Get user usage statistics (requires admin role).
Parameters:
user_id(string, required) - User UUIDstart_date(string, optional) - Start date (ISO 8601)end_date(string, optional) - End date (ISO 8601)
Returns:
Example:
59. zerodb_admin_health
Get system health status (requires admin role).
Parameters:
None
Returns:
Example:
60. zerodb_admin_optimize
Optimize database and storage (requires admin role).
Parameters:
optimization_type(string, required) - "vacuum", "reindex", or "all"tables(array[string], optional) - Specific tables to optimize
Returns:
Example:
Configuration
Environment Variables
All configuration is done through environment variables. Set these in your MCP server configuration.
Variable | Required | Default | Description |
| No |
| ZeroDB API base URL |
| Yes | - | Your ZeroDB project ID |
| Yes | - | Your ZeroDB account email |
| Yes | - | Your ZeroDB account password |
| No | - | Pre-existing API token (optional, will be auto-generated) |
| No |
| Maximum tokens in context window |
| No |
| Memory retention period in days |
Authentication
The MCP server uses JWT authentication with automatic token renewal:
Initial Authentication: On startup, the server authenticates using username/password
Token Storage: Access token is stored in memory
Automatic Renewal: Token is automatically renewed every 25 minutes (tokens expire after 30 minutes)
Manual Renewal: Use
zerodb_renew_tokento manually renew if needed
Security Best Practices
Store credentials securely: Use environment variables, never hardcode
Use project-specific credentials: Create separate projects for different applications
Rotate passwords regularly: Change passwords every 90 days
Monitor API usage: Check for unusual activity in project stats
Limit token scope: Use project-specific tokens when possible
Examples
Example 1: Building a Knowledge Base
Example 2: Agent Memory with Context
Example 3: RLHF Data Collection
Example 4: Quantum-Enhanced Search
Example 5: NoSQL Data Management
Example 6: Error Handling
Migration Guide
Migrating from v1.x to v2.0.0
Breaking Changes
API Endpoint Consolidation
v1.x: Direct API calls to various endpoints
v2.0: All operations go through unified MCP execute endpoint
Impact: No code changes needed if using MCP tools
Tool Naming Convention
v1.x: Some tools lacked
zerodb_prefixv2.0: All tools prefixed with
zerodb_
Migration:
// Old (v1.x) store_memory(...) → zerodb_store_memory(...) search_memory(...) → zerodb_search_memory(...) // New (v2.0) zerodb_store_memory(...) // Consistent prefixParameter Changes
Memory operations:
memory_metadata→metadataVector operations:
vector_metadata→metadata
Migration:
// Old (v1.x) { content: "...", memory_metadata: { key: "value" } } // New (v2.0) { content: "...", metadata: { key: "value" } }New Required Environment Variables
ZERODB_PROJECT_IDis now required (was optional in v1.x)
Migration: Add to your config:
{ "env": { "ZERODB_PROJECT_ID": "your-project-id" } }
New Features Available
54 New Operations - Full API coverage beyond memory and vector operations
Quantum Compression - Reduce vector storage by up to 50%
NoSQL Tables - Structured data storage and queries
File Management - Upload and manage files
Event System - Event-driven architecture support
RLHF Collection - Built-in feedback collection for model training
Admin Tools - System monitoring and optimization
Migration Steps
Update Package
npm update ainative-zerodb-mcp-server # or npm install -g ainative-zerodb-mcp-server@2.0.0Update Configuration
Add
ZERODB_PROJECT_IDto environment variablesUpdate any custom tool names to include
zerodb_prefix
Test Existing Functionality
All v1.x operations remain compatible
Test memory and vector operations still work
Gradually Adopt New Features
Start with new features that provide immediate value
Refer to API Reference for new operation documentation
Backward Compatibility
All v1.x operations are supported in v2.0
Existing data and projects are fully compatible
No data migration required
Troubleshooting
Common Issues
1. Authentication Failed
Error: Authentication failed: Invalid credentials
Solutions:
Verify
ZERODB_USERNAMEandZERODB_PASSWORDare correctCheck that your account is active
Try manual token renewal:
zerodb_renew_token
2. Project Not Found
Error: Project not found: [project-id]
Solutions:
Verify
ZERODB_PROJECT_IDis correctList your projects:
zerodb_list_projectsCreate a new project:
zerodb_create_project
3. Vector Dimension Mismatch
Error: vector must have exactly 1536 dimensions, got 768
Solutions:
Ensure you're using OpenAI's
text-embedding-3-small(1536 dimensions)Or use
text-embedding-ada-002(1536 dimensions)Do not use
text-embedding-3-large(3072 dimensions)
4. Token Expired
Error: Token expired or invalid
Solutions:
The server should auto-renew tokens every 25 minutes
Manually renew:
zerodb_renew_tokenCheck server logs for renewal errors
5. Rate Limiting
Error: Rate limit exceeded
Solutions:
Reduce request frequency
Use batch operations where available
Contact support for rate limit increases
Debug Logging
Enable verbose logging by checking stderr output:
Log messages include:
Token renewal attempts and status
API call details (operation, params)
Error messages with full context
Getting Help
Documentation: https://docs.ainative.studio/zerodb
GitHub Issues: https://github.com/AINative-Studio/ainative-zerodb-mcp-server/issues
Email Support: support@ainative.studio
Discord Community: https://discord.gg/ainative
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Testing
Code Quality
90%+ test coverage required
ESLint for code style
No high/critical npm vulnerabilities
All tests must pass before PR merge
License
MIT License - see LICENSE file for details.
Changelog
v2.0.0 (2025-10-14)
Breaking Changes:
All operations now require
ZERODB_PROJECT_IDenvironment variableUnified API endpoint for all operations
Consistent
zerodb_prefix for all tool names
New Features:
Added 54 new operations (total 60)
Quantum vector compression and optimization
NoSQL table operations
File storage and management
Event-driven architecture support
RLHF feedback collection
Admin system monitoring and optimization
90%+ test coverage
Automatic token renewal
Improvements:
Better error handling and messages
Improved documentation
Enhanced security
Performance optimizations
v1.0.7 (2025-10-01)
Initial public release
Basic memory and vector operations
Claude Desktop integration
Built with ❤️ by
Powered by ZeroDB - Enterprise Vector Search for AI