Skip to content

feat(mcp): add SSE transport support with auto-detection#1488

Merged
Re-bin merged 1 commit intoHKUDS:mainfrom
Qinnnnnn:main
Mar 5, 2026
Merged

feat(mcp): add SSE transport support with auto-detection#1488
Re-bin merged 1 commit intoHKUDS:mainfrom
Qinnnnnn:main

Conversation

@Qinnnnnn
Copy link
Copy Markdown
Contributor

@Qinnnnnn Qinnnnnn commented Mar 3, 2026

SSE、streamableHttp类型均正常注册
image

@Re-bin Re-bin merged commit 2306d4c into HKUDS:main Mar 5, 2026
linziyanleo added a commit to linziyanleo/nanobot__ava that referenced this pull request Mar 12, 2026
合并上游 165 commits(52 文件,+3288/-377 行),解决 6 个冲突文件:
- agent/loop.py: 保留 fork 的多模型/工具扩展,接纳上游变量名规范
- channels/telegram.py: 合并 fork 的 proxy 优化 + 上游的 streaming/table/stop/topic
- cli/commands.py: 合并 fork 的 console server + 上游的 Windows/Azure/multi-instance
- config/schema.py: 合并双方 Config 扩展(fork 压缩/心跳 + 上游 Discord/Azure)
- providers/registry.py: 保留 fork 的 zenmux/yunwu + 引入上游 Azure provider
- skills/memory/SKILL.md: 保留 fork 三维度记忆架构

上游关键合入:
- 安全修复 HKUDS#1677 allowlist bypass
- 稳定性修复 HKUDS#1728 MCP CancelledError
- MCP SSE 传输 HKUDS#1488
- Azure OpenAI provider HKUDS#1618
- 工具参数自动类型转换 HKUDS#1610
- read_file 大小限制 HKUDS#1511

适配测试以匹配 fork 自定义行为(206 tests passed)。
robottwo pushed a commit to robottwo/nanobot that referenced this pull request Mar 13, 2026
sorker pushed a commit to sorker/nanobot that referenced this pull request Mar 24, 2026
Wattysaid pushed a commit to kieran-assistant/nanobot that referenced this pull request Apr 3, 2026
ponsde added a commit to ponsde/OpenViking that referenced this pull request Apr 12, 2026
Port MCP (Model Context Protocol) client support from HKUDS/nanobot v0.1.5 so
vikingbot can connect to third-party MCP servers (filesystem, GitHub, browsers,
databases, etc.) and expose their tools to the agent alongside native tools.

Implementation is essentially verbatim nanobot v0.1.5 with two small adaptations:
- Import paths rewritten from nanobot.* to vikingbot.*
- MCPToolWrapper.execute signature extended with tool_context: ToolContext as
  the required first positional arg to match vikingbot's Tool.execute contract
  (the context is unused since MCP servers receive inputs via kwargs only, but
  the parameter is required for registry dispatch)

Credits to upstream nanobot:
- @SergioSV96HKUDS/nanobot#554 (initial MCP support)
- @QinnnnnnHKUDS/nanobot#1488 (SSE + streamableHttp transports with
  auto-detection)

Supports three transports: stdio / sse / streamableHttp. The type field is
inferred from config when omitted (command implies stdio; url ending in /sse
implies SSE, otherwise streamableHttp).

Behavior is unchanged when mcp_servers is unset or empty — _connect_mcp
short-circuits and the agent loop runs exactly as before.
chenjw pushed a commit to volcengine/OpenViking that referenced this pull request Apr 12, 2026
Port MCP (Model Context Protocol) client support from HKUDS/nanobot v0.1.5 so
vikingbot can connect to third-party MCP servers (filesystem, GitHub, browsers,
databases, etc.) and expose their tools to the agent alongside native tools.

Implementation is essentially verbatim nanobot v0.1.5 with two small adaptations:
- Import paths rewritten from nanobot.* to vikingbot.*
- MCPToolWrapper.execute signature extended with tool_context: ToolContext as
  the required first positional arg to match vikingbot's Tool.execute contract
  (the context is unused since MCP servers receive inputs via kwargs only, but
  the parameter is required for registry dispatch)

Credits to upstream nanobot:
- @SergioSV96HKUDS/nanobot#554 (initial MCP support)
- @QinnnnnnHKUDS/nanobot#1488 (SSE + streamableHttp transports with
  auto-detection)

Supports three transports: stdio / sse / streamableHttp. The type field is
inferred from config when omitted (command implies stdio; url ending in /sse
implies SSE, otherwise streamableHttp).

Behavior is unchanged when mcp_servers is unset or empty — _connect_mcp
short-circuits and the agent loop runs exactly as before.
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