Token导航 LogoToken导航

MCP Server · 搜索检索

Zerodb Typescript SDK

ZeroDB MCP Client 是一个为 ZeroDB MCP Bridge API 提供的生产就绪的 TypeScript/JavaScript 客户端,支持向量搜索、量子操作、NoSQL 表格、文件存储等核心功能。

未说明官方级别未说明来源级核验工具 0
向量搜索TypeScript搜索

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
AINative-Studio
提供方
AINative-Studio

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

Zerodb Typescript SDK 属于搜索检索类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,客户端适配情况以官方文档为准,没有现成的安装命令;接入前要先准备 API Key。

分类

搜索检索

传输方式

未说明

认证方式

API Key

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

ZeroDB MCP客户端

用于ZeroDB MCP Bridge API的可生产类型脚本/JavaScript客户端。提供对所有ZeroDB功能的类型安全访问,包括向量搜索、量子操作、NoSQL表、文件存储、事件等。

特性

  • API全面覆盖:支持所有60+ZeroDB操作
  • 类型安全:完全支持TypeScript,具有全面的类型定义
  • 错误处理:具有详细错误信息的自定义错误类
  • 重试逻辑:针对瞬态故障的内置指数回退
  • 认证:同时支持API密钥和JWT令牌
  • 速率限制:自动速率限制处理,支持后重试
  • 验证:矢量、UUID和其他数据的输入验证
  • 框架支持:适用于Node.js、React、Next.js和其他框架

安装

npm install @zerodb/mcp-client

或者用纱线:

yarn add @zerodb/mcp-client

快速开始

import { ZeroDBClient } from '@zerodb/mcp-client';

// Initialize the client
const client = new ZeroDBClient({
  apiKey: 'ZERODB_your_api_key',
  baseURL: 'https://api.ainative.studio' // optional
});

// Search vectors
const results = await client.vectors.search({
  project_id: 'your-project-uuid',
  query_vector: embedding, // 1536-dimensional array
  limit: 10,
  threshold: 0.7
});

console.log(`Found ${results.total_count} results`);

认证

客户端支持两种身份验证方法:

API密钥验证

const client = new ZeroDBClient({
  apiKey: 'ZERODB_your_api_key'
});

JWT令牌身份验证

const client = new ZeroDBClient({
  jwtToken: 'your_jwt_token'
});

更新身份验证

// Switch to JWT
client.setAuthToken('new_jwt_token', 'jwt');

// Switch to API key
client.setAuthToken('ZERODB_new_api_key', 'apiKey');

配置选项

const client = new ZeroDBClient({
  apiKey: 'ZERODB_your_api_key',      // API key (or use jwtToken)
  jwtToken: 'your_jwt_token',         // JWT token (alternative to apiKey)
  baseURL: 'https://api.ainative.studio', // API base URL (optional)
  timeout: 30000,                     // Request timeout in ms (default: 30000)
  retryAttempts: 3,                   // Number of retry attempts (default: 3)
  retryDelay: 1000                    // Initial retry delay in ms (default: 1000)
});

API 参考

向量运算

插入矢量
const result = await client.vectors.upsert({
  project_id: 'project-uuid',
  embedding: [0.1, 0.2, ...], // 1536 dimensions
  document: 'This is a sample document',
  namespace: 'default',
  metadata: {
    source: 'api',
    type: 'article',
    tags: ['technology', 'ai']
  }
});
// Returns: { vector_id: string, status: string }
批量更新矢量
const result = await client.vectors.batchUpsert({
  project_id: 'project-uuid',
  namespace: 'documents',
  vectors: [
    {
      embedding: [...],
      document: 'Document 1',
      metadata: { ... }
    },
    {
      embedding: [...],
      document: 'Document 2',
      metadata: { ... }
    }
  ]
});
// Returns: { vector_ids: string[], success_count: number, error_count: number }
搜索向量
const results = await client.vectors.search({
  project_id: 'project-uuid',
  query_vector: [...], // 1536 dimensions
  limit: 10,
  threshold: 0.7,
  namespace: 'default',
  metadata_filter: {
    category: 'technology'
  }
});
// Returns: { vectors: Vector[], total_count: number, search_time_ms: number }
删除矢量
const result = await client.vectors.delete('project-uuid', 'vector-id');
// Returns: { status: string, deleted: boolean }
按ID获取矢量
const vector = await client.vectors.get('project-uuid', 'vector-id');
// Returns: Vector object with all fields
列出向量
const vectors = await client.vectors.list({
  project_id: 'project-uuid',
  namespace: 'default',
  limit: 100,
  offset: 0
});
// Returns: Vector[]
矢量统计
const stats = await client.vectors.stats('project-uuid');
// Returns: {
//   total_vectors: number,
//   namespaces: Array,
//   storage_bytes: number,
//   avg_vector_size: number
// }
创建矢量索引
const index = await client.vectors.createIndex({
  project_id: 'project-uuid',
  namespace: 'default',
  index_type: 'HNSW' // or 'IVF' or 'FLAT'
});
// Returns: { index_id: string, estimated_build_time_seconds: number, status: string }
优化矢量存储
const result = await client.vectors.optimize({
  project_id: 'project-uuid',
  strategy: 'compression' // or 'deduplication' or 'clustering'
});
// Returns: { optimized_vectors: number, storage_saved_bytes: number, optimization_time_ms: number }
导出向量
const result = await client.vectors.export({
  project_id: 'project-uuid',
  namespace: 'default',
  format: 'json' // or 'csv' or 'parquet'
});
// Returns: { download_url: string, vector_count: number, file_size_bytes: number }

量子操作

压缩矢量
const result = await client.quantum.compress({
  project_id: 'project-uuid',
  embedding: [...],
  compression_ratio: 0.6,
  preserve_semantics: true
});
// Returns: { compressed_embedding: number[], compression_achieved: number }
解压缩矢量
const result = await client.quantum.decompress({
  project_id: 'project-uuid',
  compressed_embedding: [...]
});
// Returns: { embedding: number[], quality_score: number }
混合相似性
const result = await client.quantum.hybridSimilarity({
  project_id: 'project-uuid',
  query_vector: [...],
  candidate_vector: [...],
  metadata_boost: { relevance: 0.8 }
});
// Returns: { similarity_score: number, cosine_component: number, quantum_component: number }

表操作

创建表
const table = await client.tables.createTable({
  project_id: 'project-uuid',
  table_name: 'users',
  schema: {
    name: { type: 'string', nullable: false },
    email: { type: 'string', nullable: false },
    age: { type: 'number', nullable: true }
  }
});
插入行
const result = await client.tables.insertRows({
  project_id: 'project-uuid',
  table_name: 'users',
  rows: [
    { name: 'John', email: 'john@example.com', age: 30 },
    { name: 'Jane', email: 'jane@example.com', age: 28 }
  ]
});
查询行
const result = await client.tables.queryRows({
  project_id: 'project-uuid',
  table_name: 'users',
  filters: { age: { $gte: 25 } },
  limit: 10,
  order_by: 'name'
});
更新行
const result = await client.tables.updateRows({
  project_id: 'project-uuid',
  table_name: 'users',
  filters: { email: 'john@example.com' },
  updates: { age: 31 }
});
删除行
const result = await client.tables.deleteRows({
  project_id: 'project-uuid',
  table_name: 'users',
  filters: { age: { $lt: 18 } },
  confirm: true
});

文件操作

上传文件
const result = await client.files.uploadBuffer(
  'project-uuid',
  'document.pdf',
  fileBuffer,
  'application/pdf',
  { author: 'John Doe' }
);
下载文件
const result = await client.files.download({
  project_id: 'project-uuid',
  file_id: 'file-uuid'
});
const content = Buffer.from(result.file_data, 'base64');
列出文件
const result = await client.files.list({
  project_id: 'project-uuid',
  prefix: 'documents/',
  limit: 50
});
删除文件
const result = await client.files.delete({
  project_id: 'project-uuid',
  file_id: 'file-uuid'
});

活动操作

创建活动
const result = await client.events.create({
  project_id: 'project-uuid',
  event_type: 'user.signup',
  topic: 'users',
  payload: { user_id: '123', email: 'user@example.com' },
  source: 'web-app'
});
列出事件
const result = await client.events.list({
  project_id: 'project-uuid',
  topic: 'users',
  limit: 100
});
订阅活动
const result = await client.events.subscribe({
  project_id: 'project-uuid',
  topic: 'users',
  webhook_url: 'https://myapp.com/webhooks/events'
});

项目运营

创建项目
const project = await client.projects.create({
  name: 'My Project',
  description: 'Project description',
  tier: 'pro'
});
列出项目
const result = await client.projects.list();
获取项目统计信息
const stats = await client.projects.stats({
  project_id: 'project-uuid'
});
删除项目
const result = await client.projects.delete({
  project_id: 'project-uuid',
  confirm: true
});

RLHF操作

收集互动
const result = await client.rlhf.collectInteraction({
  type: 'click',
  session_id: 'session-uuid',
  element_clicked: 'search-button',
  page_url: '/search'
});
收集代理反馈
const result = await client.rlhf.collectAgentFeedback({
  project_id: 'project-uuid',
  agent_type: 'search-agent',
  agent_response_id: 'response-uuid',
  user_rating: 5,
  feedback_text: 'Very helpful response'
});

管理员操作(仅限管理员)

系统统计信息
const stats = await client.admin.getSystemStats();
系统健康
const health = await client.admin.getSystemHealth();

错误处理

客户端为不同的错误场景提供自定义错误类:

import {
  ZeroDBError,
  AuthenticationError,
  AuthorizationError,
  RateLimitError,
  ValidationError,
  NotFoundError,
  NetworkError,
  TimeoutError
} from '@zerodb/mcp-client';

try {
  await client.vectors.search({
    project_id: 'invalid-uuid',
    query_vector: embedding,
    limit: 10
  });
} catch (error) {
  if (error instanceof ValidationError) {
    console.error('Validation failed:', error.message);
    console.error('Field errors:', error.errors);
  } else if (error instanceof AuthenticationError) {
    console.error('Authentication failed:', error.message);
  } else if (error instanceof RateLimitError) {
    console.error('Rate limited. Retry after:', error.retryAfter);
  } else if (error instanceof NotFoundError) {
    console.error('Resource not found:', error.message);
  } else {
    console.error('Unexpected error:', error);
  }
}

框架集成

React/Next.js

import { ZeroDBClient } from '@zerodb/mcp-client';
import { useState, useEffect } from 'react';

function SearchComponent() {
  const [results, setResults] = useState([]);
  const client = new ZeroDBClient({ apiKey: process.env.ZERODB_API_KEY });

  const search = async (query: string) => {
    const embedding = await getEmbedding(query); // Your embedding function

    const results = await client.vectors.search({
      project_id: process.env.ZERODB_PROJECT_ID,
      query_vector: embedding,
      limit: 10
    });

    setResults(results.vectors);
  };

  return (
    

       search(e.target.value)} />
      {results.map(result => (
        
{result.document}

      ))}
    

  );
}

Node.js后端

import express from 'express';
import { ZeroDBClient } from '@zerodb/mcp-client';

const app = express();
const client = new ZeroDBClient({
  apiKey: process.env.ZERODB_API_KEY
});

app.post('/api/search', async (req, res) => {
  try {
    const { query, projectId } = req.body;

    const results = await client.vectors.search({
      project_id: projectId,
      query_vector: query,
      limit: 10
    });

    res.json(results);
  } catch (error) {
    if (error instanceof RateLimitError) {
      res.status(429).json({ error: 'Rate limit exceeded' });
    } else {
      res.status(500).json({ error: error.message });
    }
  }
});

app.listen(3000);

最佳实践

1.重用客户端实例

创建单个客户端实例并在整个应用程序中重用它:

// lib/zerodb.ts
import { ZeroDBClient } from '@zerodb/mcp-client';

export const zerodbClient = new ZeroDBClient({
  apiKey: process.env.ZERODB_API_KEY
});

2.处理速率限制

async function searchWithRetry(query: any, maxRetries = 3) {
  for (let i = 0; i  setTimeout(resolve, error.retryAfter * 1000));
        continue;
      }
      throw error;
    }
  }
}

3.验证嵌入

import { validateEmbedding } from '@zerodb/mcp-client';

try {
  validateEmbedding(myEmbedding, 1536);
} catch (error) {
  console.error('Invalid embedding:', error.message);
}

4.使用TypeScript

充分利用全型安全:

import { VectorSearchRequest, VectorSearchResult } from '@zerodb/mcp-client';

async function typedSearch(
  request: VectorSearchRequest
): Promise {
  return client.vectors.search(request);
}

测试

npm test

示例

请参阅 examples/ 综合使用示例目录:

  • vectors-example.ts -矢量运算
  • tables-example.ts -表/NoSQL操作
  • files-example.ts -文件存储操作

许可证

麻省理工学院

支持

  • 文档:https://docs.ainative.studio
  • 问题:https://github.com/ainative-studio/zerodb-mcp-client/issues
  • 电子邮件:support@ainative.studio

贡献

欢迎投稿!请在提交PR之前阅读我们的投稿指南。

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

向量搜索TypeScript本地部署NoSQL文件存储量子操作

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

查资料带出处

把网页、论文和文档的检索结果连同链接一起带回对话。

站内知识检索

在自己的文档库里做语义搜索,比关键词更贴题。

事实核对

交叉多个来源确认一条信息,减少模型凭记忆作答。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备API Key,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在搜索检索场景里让模型直接调用外部能力的人。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到API Key的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Zerodb Typescript SDK

MCP World · 本页

0未说明未标注1 个2026-05-17
Baidu Netdisk

MCP World

未标注未说明未标注1 个2026-05-17
Sequentialthinking

MCP.so

1SSE有2 个2026-05-17
Brave Search 433812ff

MCP World

2未说明未标注1 个2026-05-17
mindsdb (430e18)

MCP World

0未说明有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Zerodb Typescript SDK 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Zerodb Typescript SDK 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Zerodb Typescript SDK 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Zerodb Typescript SDK 需要 API Key 吗?

公开资料标注的认证方式是API Key,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Zerodb Typescript SDK 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP