微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🔍

Claude专属语义搜索助手

openviking-mcp · vlatest
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 Unknown 公开目录收录
346 下载 148 安装 807 收藏 16.1k 浏览

简介

基于OpenViking项目的MCP配置向导,为Claude Desktop/CLI提供本地化RAG语义搜索与文档问答能力,需用户自主配置OpenAI API。

原始描述

Set up and run the OpenViking MCP server for RAG capabilities. Use when users need semantic search and document Q&A exposed through Model Context Protocol for Claude Desktop/CLI or other MCP clients. Triggers on requests about OpenViking MCP, RAG servers, or semantic search MCP setup.

通过你的 Agent 添加

安装目录:openviking-mcp/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/openviking-mcp/
Codex CLI~/.codex/skills/openviking-mcp/
DeepSeek Harness~/.agents/skills/openviking-mcp/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

OpenViking MCP Server是一个HTTP MCP服务器,将OpenViking的RAG(检索增强生成)能力封装为MCP工具,供Claude Desktop/CLI或其他MCP客户端调用。核心功能通过三个工具实现:query工具执行完整的RAG流程(语义搜索+LLM生成答案),search工具仅执行语义搜索并返回匹配文档及相似度分数,add_resource工具支持将文件、目录或URL索引到向量数据库中。

部署流程分为五步:克隆GitHub仓库、使用uv sync安装依赖、配置ov.conf文件填入OpenAI API密钥(用于LLM和嵌入模型)、启动本地HTTP服务器(默认http://127.0.0.1:8000/mcp)、最后在Claude CLI或Desktop中添加MCP服务器配置。

显著优点

协议标准化:采用MCP(Model Context Protocol)协议,实现与Claude生态的无缝集成,无需编写自定义客户端代码。 本地数据安全:文档索引和向量数据库完全本地运行,知识库数据不离开用户设备,满足企业数据驻留要求。 灵活部署:支持streamable-http和stdio两种传输模式,可适配不同集成场景。 零额外依赖:Skill本身为纯Markdown文档,无嵌入式代码,依赖风险极低。

潜在局限

硬性版本要求:强制依赖Python 3.13+,较新的版本门槛可能排除部分遗留环境。 单一供应商锁定:当前仅支持OpenAI的嵌入模型和LLM(gpt-4o-mini/text-embedding-3-small),缺乏本地模型或替代API供应商的选项。 T3来源风险:由个人开发者维护,无商业实体背书,长期维护承诺和供应链安全保障有限。 手动配置繁琐:API密钥需手动编辑JSON配置文件,无环境变量自动注入或密钥管理服务集成。

适合人群

  • 需要在Claude工作流中集成私有文档RAG能力的开发者和技术用户
  • 重视数据本地化、不愿将企业文档上传至第三方SaaS服务的隐私敏感型组织
  • 已熟悉Python生态和MCP协议的技术团队
  • 拥有OpenAI API访问权限且预算可控的小中型项目

常规风险

  1. curl|sh执行风险:文档示例包含curl -LsSf https://astral.sh/uv/install.sh | sh命令,虽为Astral官方脚本,但管道执行模式存在理论上的中间人攻击或脚本篡改风险。建议先下载审查再执行。

  2. API密钥明文存储:ov.conf文件要求明文存储OpenAI API密钥,若文件权限配置不当或意外提交至版本控制,可能导致密钥泄露。建议改用环境变量OV_CONFIG指向外部密钥管理服务。

  3. 本地服务暴露风险:默认绑定127.0.0.1相对安全,但用户若手动改为0.0.0.0或配置错误,可能将MCP服务端点暴露至局域网或公网,导致未授权访问向量数据库。

  4. 上游供应链风险:依赖GitHub仓库ZaynJarvis/openviking的代码完整性,个人开发者账号若被盗或仓库被恶意接管,可能通过后续更新引入恶意代码。

技能正文


name: openviking-mcp description: Set up and run the OpenViking MCP server for RAG capabilities. Use when users need semantic search and document Q&A exposed through Model Context Protocol for Claude Desktop/CLI or other MCP clients. Triggers on requests about OpenViking MCP, RAG servers, or semantic search MCP setup.

OpenViking MCP Server

HTTP MCP server that exposes OpenViking RAG capabilities as tools for Claude and other MCP clients.

What It Provides

Tool Purpose
query Full RAG pipeline — semantic search + LLM answer generation
search Semantic search only, returns matching documents with scores
add_resource Ingest files, directories, or URLs into the database

Prerequisites

  • Python 3.13+
  • uv installed (curl -LsSf https://astral.sh/uv/install.sh | sh)
  • OpenAI API key (for LLM and embeddings)

Setup Steps

Step 1: Get the Code

Clone the OpenViking repository:

git clone https://github.com/ZaynJarvis/openviking.git
# Or your fork/organization's repo
cd openviking/examples/mcp-query

Step 2: Install Dependencies

uv sync

Step 3: Configure API Keys (Human Input Required)

Copy the example config:

cp ov.conf.example ov.conf

You must edit ov.conf and add your API tokens. The critical fields:

Field Purpose Example
vlm.token LLM for generating answers sk-... (OpenAI)
embedding.token Embeddings for semantic search sk-... (OpenAI)

Wait for user to confirm: Ask the user to paste their ov.conf (with tokens redacted if sharing logs) or confirm they've set it up before proceeding.

Example minimal config:

{
  "vlm": {
    "provider": "openai",
    "model": "gpt-4o-mini",
    "token": "YOUR_OPENAI_API_KEY"
  },
  "embedding": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "token": "YOUR_OPENAI_API_KEY"
  }
}

Step 4: Start the Server

uv run server.py

Server runs at http://127.0.0.1:8000/mcp by default.

Step 5: Connect to Claude

Claude CLI:

claude mcp add --transport http openviking http://localhost:8000/mcp

Claude Desktop: Add to ~/.mcp.json:

{
  "mcpServers": {
    "openviking": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
  }
}

Server Options

uv run server.py [OPTIONS]

  --config PATH       Config file path (default: ./ov.conf)
  --data PATH         Data directory path (default: ./data)
  --host HOST         Bind address (default: 127.0.0.1)
  --port PORT         Listen port (default: 8000)
  --transport TYPE    streamable-http | stdio (default: streamable-http)

Environment variables: OV_CONFIG, OV_DATA, OV_PORT, OV_DEBUG

Usage Examples

Once connected, Claude can use these tools:

Query with RAG:

"Search my documents for information about Q3 revenue and summarize the findings"

Semantic search only:

"Find documents related to machine learning architecture"

Add documents:

"Index the PDF at ~/documents/report.pdf"
"Add https://example.com/article to my knowledge base"

Troubleshooting

Issue Solution
Port in use Change with --port 9000
Config not found Ensure ov.conf exists or set OV_CONFIG path
Dependencies missing Run uv sync in the mcp-query directory
Authentication errors Check your API tokens in ov.conf

Resources

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

docsapidevelopment-engineeringproductivitydata-analytics

同类 Skill