feat(knowledgebase): migrate to MCP 2026 and add Viking API Key authentication - #428
Merged
Conversation
feat: migrate knowledgebase server to MCP 2026 See merge request: !1
feat(knowledgebase): migrate to MCP 2026 and add Viking API Key authentication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
将 Viking Knowledge Base MCP Server 迁移至最新 MCP 协议实现,并补充 Viking 知识库 API Key 鉴权能力,便于不使用火山引擎账号 AK/SK 的场景接入。
主要变更
MCP 协议迁移
2026-07-28协议修订版。aiohttp调用 Viking 接口,避免阻塞 MCP 事件循环。Viking API Key 鉴权
VIKING_API_KEY环境变量。Authorization: Bearer <VIKING_API_KEY>调用 Viking 接口。搜索结果增强
search_knowledge返回结果新增doc_id、doc_name。doc_id可直接用于后续get_doc调用。null,不影响搜索结果。验证
doc_info的兼容处理。uv lock --check、git diff --check均通过。search_knowledge成功返回test_xlsx的真实检索结果。get_doc成功返回文档状态。2026-07-28。已知限制
Viking 当前暂不支持 API Key 调用以下接口,因此它们会返回 HTTP 403,属于上游已知限制,即将在知识库中进行支持,支持后所有接口均支持 API Key 调用:
list_collectionsget_collection兼容性
search_knowledge新增的doc_id、doc_name为可选返回字段,不影响已有客户端对id、content的使用。