AI万址

Typesense搜索服务

一个实现模型上下文协议(MCP)的服务器,为AI模型提供Typesense搜索能力,支持文档发现、搜索和分析。

Typesense搜索服务是 suhail-ak-2 开发的 MCP 服务器:一个实现模型上下文协议(MCP)的服务器,为AI模型提供Typesense搜索能力,支持文档发现、搜索和分析。接入两步走:npm install -g typesense-mcp-server,再把下文配置粘进客户端 mcpServers 段重启即可。

它是干什么的

先把话说清楚:Typesense搜索服务不是又一个大模型,而是一个标准的 MCP 服务器。装好之后,你的 AI 客户端多出一组新工具,模型可以按需调用。一个实现模型上下文协议(MCP)的服务器,为AI模型提供Typesense搜索能力,支持文档发现、搜索和分析

项目数据
开发者suhail-ak-2
Star19
收藏0
质量等级B
平台分类搜索工具
部署标签本地部署、搜索服务、AI模型集成
仓库mcp-typesense-server

核心能力

  • typesenselistcollections - List all available collections with their schemas
  • typesensequery - Search for documents in a collection
  • typesensegetdocument - Retrieve a specific document by ID
  • typesensecollectionstats - Get detailed statistics about a specific collection

适合谁用

两类人最该装:一是做信息聚合、需要给 AI 一个可调用搜索入口的开发者;二是已经在用 MCP 生态、想按需拼装能力的折腾型用户。反过来,如果你只需要偶尔手动用它背后的服务,直接开网页就行,不必上 MCP。

完整安装配置步骤

动手前确认环境齐了:

  • Node.js 18 或更高版本(旧版 npx 跑不动一部分新版 MCP 包)。
  • 一个支持 MCP 的客户端:Claude Desktop、Cursor、Cline、Windsurf 任选其一。

第 1 步:安装Typesense搜索服务

终端里任选一条(不同安装方式,效果等价):

bash
npm install -g typesense-mcp-server
npm install typesense-mcp-server
npx @michaellatman/mcp-get@latest install typesense-mcp-server

第 2 步:写入 MCP 配置

Claude Desktop 的配置文件路径:macOS 在 ~/Library/Application Support/Claude/claude_desktop_config.json,Windows 在 %APPDATA%\Claude\claude_desktop_config.json;Cursor 则是 ~/.cursor/mcp.json(或项目级 .cursor/mcp.json)。把下面这段并进 mcpServers 段(注意是并进外层大括号,别整个文件替换):

bash
The Inspector will provide a URL to access debugging tools in your browser.

Components

Resources

The server provides information about Typesense collections:

  • Collection Schemas (typesense://collections/<collection>)

- JSON schema information for each collection - Includes field names and data types - Sample documents for understanding data structure

Tools

The server provides the following tools for interacting with Typesense:

  • typesense_list_collections - List all available collections with their schemas

- Enables zero-conf discovery and routing - LLM can enumerate collections at runtime and pick the right one(s) before searching - Useful when collections vary by environment, tenant, or version - Returns field definitions for schema inference (searchable, facetable, numeric fields) - Supports include_fields parameter to control detail level

  • typesense_query - Search for documents in a collection

- Full-text search with customizable parameters - Supports filtering, sorting, and pagination

  • typesense_get_document - Retrieve a specific document by ID
  • typesense_collection_stats - Get detailed statistics about a specific collection

Resource Templates

The server provides templates for:

  • typesense_search - Template for constructing Typesense search queries
  • typesense_collection - Template for viewing Typesense collection details

Usage with Claude Desktop

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

code

改完保存。Windows 用户注意:如果 `command` 写 `npx` 起不来,换成 `npx.cmd` 再试。

### 第 3 步:重启并验证

完全退出客户端再打开(是托盘里真正退出,不是关窗口)。工具列表里出现Typesense搜索服务的工具即接入成功;调用报错的话,先查下面的坑点清单。

容易踩的坑

  • 改了配置没反应:客户端只重启了窗口没退进程。macOS 按 Cmd+Q,Windows 检查托盘。
  • JSON 报错打不开客户端:多半是最后多个逗号。粘进任何 JSON 校验器里查一遍再保存。

常见问题

Q

Typesense搜索服务免费吗?

A

代码在 GitHub(https://github.com/suhail-ak-s/mcp-typesense-server)开放获取。个别功能依赖第三方服务时费用另算,看仓库 LICENSE 和定价页。

Q

Typesense搜索服务能用在 Cursor / Cline 吗?

A

能。MCP 是通用协议,同一份 mcpServers 配置在这些客户端之间基本通用,只是配置文件位置不同。

Q

需要外网或代理吗?

A

拉包和调用官方 API 需要能访问 GitHub 与对应服务域名,内网环境先测 git ls-remote 和接口连通性。