# ainative-zerodb-mcp-server
## 基本信息
- Slug: `ainative-studio-ainative-zerodb-mcp-server`
- Source: modelscope
- Publisher: @AINative-Studio/ainative-zerodb-mcp-server
- Categories: vector-databases / knowledge-and-memory / rag-systems
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@AINative-Studio/ainative-zerodb-mcp-server
## 简介
暂无描述。
## 安装提示

```bash
npm install -g ainative-zerodb-mcp-server
```

## MCP Server 详情

# ZeroDB MCP Server v2.0.8

[![npm version](https://img.shields.io/npm/v/ainative-zerodb-mcp-server.svg)](https://www.npmjs.com/package/ainative-zerodb-mcp-server)
[![npm downloads](https://img.shields.io/npm/dm/ainative-zerodb-mcp-server.svg)](https://www.npmjs.com/package/ainative-zerodb-mcp-server)
[![license](https://img.shields.io/npm/l/ainative-zerodb-mcp-server.svg)](https://github.com/AINative-Studio/ainative-zerodb-mcp-server/blob/main/LICENSE)
[![test coverage](https://img.shields.io/badge/coverage-90%25-brightgreen.svg)](https://github.com/AINative-Studio/ainative-zerodb-mcp-server)

**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](#installation)
- [Quick Start](#quick-start)
- [API Reference](#api-reference)
  - [Memory Operations (3)](#memory-operations)
  - [Vector Operations (10)](#vector-operations)
  - [Quantum Operations (6)](#quantum-operations)
  - [Table/NoSQL Operations (8)](#tablenos-ql-operations)
  - [File Operations (6)](#file-operations)
  - [Event Operations (5)](#event-operations)
  - [Project Operations (7)](#project-operations)
  - [RLHF Operations (10)](#rlhf-operations)
  - [Admin Operations (5)](#admin-operations)
- [Configuration](#configuration)
- [Examples](#examples)
- [Migration Guide](#migration-guide)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
- [License](#license)

---

## Installation

### NPM Global Installation
```bash
npm install -g ainative-zerodb-mcp-server
```

### NPX (No Installation Required)
```bash
npx ainative-zerodb-mcp-server
```

### 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**
1. Click on "Register User" endpoint
2. Use the "Try it out" feature
3. Enter your email, password, and username

#### Option B: Register via API
```bash
curl -X POST 'https://api.ainative.studio/v1/public/auth/register' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "your-email@example.com",
    "password": "YourSecurePassword123!",
    "username": "yourname"
  }'
```

**Response:**
```json
{
  "email": "your-email@example.com",
  "id": "user-uuid-here",
  "username": "yourname"
}
```

### Step 2: Create a Project

After registration, create a project to get your `PROJECT_ID`:

```bash
# 1. Login to get your access token
curl -X POST 'https://api.ainative.studio/v1/public/auth/login-json' \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "your-email@example.com",
    "password": "YourSecurePassword123!"
  }'
```

**Response:**
```json
{
  "access_token": "eyJhbGc...",
  "token_type": "bearer",
  "expires_in": 1800
}
```

```bash
# 2. Create a project using your token
curl -X POST 'https://api.ainative.studio/v1/public/projects' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My ZeroDB MCP Project",
    "description": "Project for Claude Desktop MCP integration"
  }'
```

**Response:**
```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "My ZeroDB MCP Project",
  "status": "ACTIVE",
  ...
}
```

**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`

```json
{
  "mcpServers": {
    "zerodb": {
      "command": "npx",
      "args": ["ainative-zerodb-mcp-server"],
      "env": {
        "ZERODB_API_URL": "https://api.ainative.studio",
        "ZERODB_PROJECT_ID": "your-project-id-here",
        "ZERODB_USERNAME": "your-email@example.com",
        "ZERODB_PASSWORD": "your-password",
        "MCP_CONTEXT_WINDOW": "8192",
        "MCP_RETENTION_DAYS": "30"
      }
    }
  }
}
```

### 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:
```
Store a memory: "This is my first ZeroDB memory entry"
```

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 store
- `role` (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` (objec…

