Xiaoyao Search logo

Xiaoyao Search

CommunityPopular
dtsola
xiaoyao-search

小遥搜索 MCP 工具 - 本地文件智能搜索(语义/全文/图像/语音/混合搜索)

Overview

Publisherdtsola
Repositoryxiaoyaosearch
Skill namexiaoyao-search
Stars
1K
Forks
54
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dtsola on GitHub. Read the source before you install it.

Installation

Install the Xiaoyao Search AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dtsola/xiaoyaosearch/tree/main/skills/xiaoyao-search
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dtsola/xiaoyaosearch.git /tmp/xiaoyaosearch
mkdir -p .claude/skills
cp -r /tmp/xiaoyaosearch/skills/xiaoyao-search .claude/skills/xiaoyao-search
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Xiaoyao Search in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Xiaoyao Search on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Xiaoyao Search is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

When to use

当需要搜索本地文件时使用此 Skill:

  • 通过自然语言描述搜索本地文档
  • 查找包含特定关键词的文件
  • 用图片搜索相似的本地图片
  • 用语音转文字后搜索文件
  • 需要综合语义和全文搜索结果

Capability

小遥搜索 MCP 服务器提供以下 5 个搜索工具:

1. semantic_search(语义搜索)

  • 用途:基于 BGE-M3 向量模型的语义搜索
  • 适用:自然语言查询,如"关于机器学习的文档"
  • 参数:
    • query: string - 搜索关键词(1-500字符)
    • limit: int - 返回结果数(1-100,默认20)
    • threshold: float - 相似度阈值(0.0-1.0,默认0.5)
    • file_types: string[] - 文件类型过滤(可选)

2. fulltext_search(全文搜索)

  • 用途:基于 Whoosh 的精确关键词匹配
  • 适用:查找特定术语、代码片段
  • 参数:
    • query: string - 搜索关键词(1-500字符)
    • limit: int - 返回结果数(1-100,默认20)
    • file_types: string[] - 文件类型过滤(可选)

3. hybrid_search(混合搜索)

  • 用途:结合语义和全文搜索,RRF 算法融合结果
  • 适用:需要全面搜索结果的场景
  • 参数:
    • query: string - 搜索关键词(1-500字符)
    • limit: int - 返回结果数(1-100,默认20)
    • threshold: float - 相似度阈值(0.0-1.0,默认0.5)
    • file_types: string[] - 文件类型过滤(可选)

4. image_search(图像搜索)

  • 用途:基于 CN-CLIP 的图像相似度搜索
  • 适用:用图片查找相似的本地文件
  • 参数:
    • image_path: string - 图片绝对路径
    • limit: int - 返回结果数(1-100,默认20)
    • threshold: float - 相似度阈值(0.0-1.0,默认0.5)

5. voice_search(语音搜索)

  • 用途:FasterWhisper 语音识别后搜索
  • 适用:通过语音快速搜索本地文件
  • 参数:
    • audio_path: string - 音频绝对路径
    • search_type: string - 搜索类型(semantic/fulltext/hybrid,默认semantic)
    • limit: int - 返回结果数(1-100,默认20)
    • threshold: float - 相似度阈值(0.0-1.0,默认0.5)

Usage

前提条件

  1. 小遥搜索后端服务已启动(默认 http://127.0.0.1:8000)
  2. MCP 功能已启用(默认启用)
  3. 索引已构建完成

调用方式

Claude Code 通过 MCP 协议自动发现和调用工具:

用户:帮我找一下关于 Python 异步编程的文档
→ Claude Code 调用 semantic_search(query="Python 异步编程")
→ 返回搜索结果
→ Claude 基于结果回答用户

响应格式

搜索结果返回 JSON 格式:

json
{
  "total": 10,
  "search_time": 0.523,
  "results": [
    {
      "file_name": "async_guide.md",
      "file_path": "D:/docs/async_guide.md",
      "file_type": "markdown",
      "relevance_score": 0.95,
      "preview_text": "Python异步编程指南..."
    }
  ]
}

Examples

示例1:语义搜索

用户:查找关于机器学习算法优化的文档

调用:semantic_search(
  query="机器学习算法优化",
  limit=10,
  threshold=0.5
)

示例2:全文搜索

用户:查找包含 async def 的 Python 文件

调用:fulltext_search(
  query="async def",
  limit=20,
  file_types=["python"]
)

示例3:图像搜索

用户:找一下跟这张图片相似的设计稿

调用:image_search(
  image_path="C:/Users/test/reference.png",
  limit=10
)

示例4:语音搜索

用户:(语音输入)帮我找一下上周的会议记录

调用:voice_search(
  audio_path="C:/Users/test/voice.mp3",
  search_type="semantic"
)

示例5:混合搜索

用户:全面搜索关于 Vue3 组件开发的资料

调用:hybrid_search(
  query="Vue3 组件开发",
  limit=20,
  threshold=0.6
)

Configuration

环境变量

变量名默认值说明
MCP_SSE_ENABLEDtrue启用 MCP SSE
MCP_SERVER_NAMExiaoyao-search服务器名称
MCP_DEFAULT_LIMIT20默认结果数
MCP_DEFAULT_THRESHOLD0.5默认相似度阈值
MCP_VOICE_ENABLEDtrue启用语音搜索

连接测试

bash
# 测试 MCP SSE 端点
curl http://127.0.0.1:8000/mcp

# 检查后端健康状态
curl http://127.0.0.1:8000/api/system/health

Troubleshooting

问题1:工具调用失败

  • 检查后端服务是否启动
  • 确认 MCP_SSE_ENABLED=true
  • 查看 /mcp 端点是否可访问

问题2:搜索结果为空

  • 确认索引已构建
  • 检查查询词是否正确
  • 降低 threshold 值尝试

问题3:图像/语音搜索失败

  • 确认文件路径为绝对路径
  • 检查文件格式是否支持
  • 检查文件大小是否在限制内(10MB)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Xiaoyao Search AI skill do?

小遥搜索 MCP 工具 - 本地文件智能搜索(语义/全文/图像/语音/混合搜索)

Why use Xiaoyao Search on TypingMind?

Because you install it once and use it with any model. Xiaoyao Search is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Xiaoyao Search in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dtsola/xiaoyaosearch/tree/main/skills/xiaoyao-search. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Xiaoyao Search?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Xiaoyao Search?

As many as you like. As long as a model supports skills, you can use Xiaoyao Search with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Xiaoyao Search AI skill free?

It is published on GitHub by dtsola. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇