Skip to main content

VikingDB Multi-modal Search MCP Server using FastMCP

Project description

VikingDB Multi-modal Search MCP Server

这是一个使用 Python FastMCP 框架开发的 MCP Server,用于在火山引擎 VikingDB 向量数据库中进行多模态检索。

功能介绍

提供 search_multi_modal 工具,支持:

  • 文本搜索
  • 图片搜索 (TOS 或 HTTP 链接)
  • 视频搜索 (TOS 或 HTTP 链接)
  • 多模态组合搜索

安装依赖

pip install -r requirements.txt

配置

复制 .env.example.env 并填入您的火山引擎凭证:

cp .env.example .env

并在 .env 中设置以下变量:

  • VOLC_AK: 火山引擎 Access Key
  • VOLC_SK: 火山引擎 Secret Key
  • VIKINGDB_HOST: VikingDB 域名 (默认: api-vikingdb.vikingdb.cn-beijing.volces.com)
  • VIKINGDB_REGION: 区域 (默认: cn-beijing)

运行

python server.py

MCP 工具说明

search_multi_modal

参数:

  • collection_name (str): 集合名称
  • index_name (str): 索引名称
  • text (str, 可选): 检索文本
  • image (str, 可选): 图片链接
  • video_url (str, 可选): 视频链接
  • video_fps (float, 可选): 视频采样频率
  • need_instruction (bool): 是否启用 Instruction (默认为 True)
  • output_fields (list, 可选): 返回字段列表
  • limit (int): 返回结果数量 (默认 10)

发布到 PyPI

如果您希望将此项目发布到 PyPI,可以使用我们提供的自动化脚本:

  1. 安装必要工具(仅需一次):

    pip install build twine
    
  2. 运行发布脚本

    ./publish.sh
    

    该脚本会自动执行以下步骤:

    • 检查当前版本并建议/手动确认新版本。
    • 自动更新 pyproject.toml
    • 清理旧的构建文件。
    • 构建新的分发包。
    • 调用 twine 上传至 PyPI。

    注意:在上传时,您需要输入 PyPI 的 API Token。建议提前在 ~/.pypirc 中配置好 Token 以实现完全自动化。

本地开发安装

可以使用开发模式安装,以便直接运行命令:

pip install -e .
vinehoo-search

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vinehoo_vector_products_search_mcp-0.1.5.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file vinehoo_vector_products_search_mcp-0.1.5.tar.gz.

File metadata

File hashes

Hashes for vinehoo_vector_products_search_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4bb2031aa06eeec73de25b094cc0acf6592bca304d49f448f592d5a84a20eaa4
MD5 32338b086a9a487e4c04315da97c36a4
BLAKE2b-256 edb5d47dc5fc01287f67c5463eaeec8a4810cc40062ec066f5b25fb352c779d7

See more details on using hashes here.

File details

Details for the file vinehoo_vector_products_search_mcp-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for vinehoo_vector_products_search_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 93d301b63769612f572085613520705f6dc39b58b1401837a314bdbb2c866c52
MD5 d35a83728f9a7906391c8a845cb7b8d7
BLAKE2b-256 e1dfaef510bd6944e884955e5f1b4ea21f5e0879874ee7e5109774c7790511d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page