Skip to content

feat: add HiAgent MCP server - #424

Merged
cuericlee merged 3 commits into
volcengine:mainfrom
yooyea:add-hiagent-mcp-server
Aug 20, 2026
Merged

feat: add HiAgent MCP server#424
cuericlee merged 3 commits into
volcengine:mainfrom
yooyea:add-hiagent-mcp-server

Conversation

@yooyea

@yooyea yooyea commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

简介

新增 HiAgent 平台 OpenAPI 的 MCP Server,聚焦知识引擎能力,使 MCP 客户端(Claude Desktop、Cursor、HiAgent STDIO 插件等)能够检索 HiAgent 知识库中的内容。

工具

工具 说明
health_check 返回 MCP server 与 OpenAPI 的配置状态
list_datasets 列出指定 workspace 下的知识库(datasets)
get_dataset 获取单个知识库详情(含默认检索参数)
call_knowledge_engine_tool 调用知识引擎检索;当前支持 knowledge_search

鉴权与接入

  • 鉴权:仅 AK/SK V4 签名;凭证通过环境变量注入(HIAGENT_TOP_HOSTHIAGENT_ACCESS_KEY_IDHIAGENT_SECRET_ACCESS_KEY
  • 传输:stdio(默认)与 streamable-http
  • HiAgent OpenAPI 版本可通过 HIAGENT_VERSION 环境变量或 --hiagent-version 参数选择,默认使用最新已注册版本(v3.1.0
  • 目录采用扁平的 server/mcp_server_hiagent/ 结构 + src/ 包 + uv.lock,与现有 server 一致;pyproject.toml 含 MIT license

验证

  • 37 个单元测试通过(pytest),无需网络与凭证
  • python -m build + twine check 通过(sdist + wheel)
  • Secret scan(trufflehog)无泄露

买宁 added 2 commits August 19, 2026 02:29
Add an MCP server for the HiAgent Platform OpenAPI, focused on the knowledge
engine. Tools: health_check, list_datasets, get_dataset, and
call_knowledge_engine_tool (knowledge_search). AK/SK V4 signing, stdio and
streamable-http transports, credentials via environment variables. HiAgent
OpenAPI version is selectable via HIAGENT_VERSION env or --hiagent-version
flag, defaulting to the latest registered version (v3.1.0).
top_k=3,
score_threshold=0.2,
)
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add best practice of prompt to trigger mcp tools and expected result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

add best practice of prompt to trigger mcp tools and expected result.

@cuericlee cuericlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@cuericlee
cuericlee merged commit 703e8f5 into volcengine:main Aug 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants