mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3113] MCP tools loaded in backend but not injected into Web UI chat session #1247
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @laomu853 on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3113
Strata MCP 工具注入问题技术说明
文档版本:2026-10-18(已补充 HTTP 桥验证)
适用环境:Strata 0.1.45 + Qwen3.8-Flash-Next(512k)
1. 问题概述
在 Strata 0.1.45(及此前测试的 0.1.25)中,通过
mcp.json加载的 MCP 服务器(以官方@modelcontextprotocol/server-filesystem为例),无论采用 stdio 还是 HTTP 传输,后端均能成功启动并获取工具列表,但这些工具无法注入到 Web UI 聊天会话的模型工具列表中,导致模型无法调用任何文件相关工具。同一配置下的其他 MCP 服务器(如 local-memory,HTTP 传输)的工具可以正常注入并被模型调用。
2. 环境信息
BUILD.json与文件时间戳确认)--max-context 524288)python serve/server.py --engine strata --config strata-q2_0-512k.json --port 8080 --mcp-config mcp.jsonE:\PCCS\MCP\DuckDuckGo\mcp.json3. 复现步骤
在
mcp.json中添加:使用上述启动命令启动 Strata。
观察启动日志,确认出现:
打开 Web UI(
http://127.0.0.1:8080/),新建对话。要求模型列出当前可用工具,或直接要求调用
list_directory。结果:模型报告的工具列表中不包含任何 filesystem 工具。
4. 已观察到的现象
get_datetime、get_info)add_memory、search_memory、list_memories、delete_memory)fs_http_bridge.py,监听http://127.0.0.1:9110/mcp)将官方 filesystem 服务器暴露为 HTTP 后:mcp.json中配置为"filesystem-http": {"url": "http://127.0.0.1:9110/mcp"}并重启 Strata。F:\缩小到F:\Memories-work后问题依旧。5. 已排除因素
BUILD.json+ 文件大小/日期)6. 可能原因分析
问题位于 Strata Web UI 聊天 agent 的工具注入环节,而非 MCP 服务器本身、传输方式或模型:
服务端能够启动 MCP 并获取工具列表(stdio 与 HTTP 桥均验证)。
部分 MCP 服务器(HTTP 类型的 local-memory)的工具能被正确传递到会话。
filesystem 工具(无论 stdio 还是 HTTP)均未能进入当前会话的工具列表。
可能涉及:
工具注册时的过滤逻辑(按服务器名称、类型或工具数量)
会话初始化时对 MCP 工具的选择性加载
前端与后端之间工具元数据传递的遗漏
对特定 MCP 服务器实现的兼容性差异
具体代码位置推测在
serve/server.py或serve/mcp.py中负责将 MCP 工具合并到聊天请求的部分。7. 当前影响与临时替代方案
影响:
模型无法直接执行文件列举、读取、写入等操作。
依赖文件系统的自动化流程(如记忆落盘校验、SHA1 计算)无法由模型独立完成。
临时替代:
用户在本地终端执行
dir/Get-ChildItem等命令,将输出粘贴给模型进行分析。记忆相关需求继续使用已正常工作的 local-memory MCP。
重要结论通过 local-memory 的
add_memory记录。8. 建议后续行动
反馈上游
在 Niko1221/Strata Issues 提交问题,建议附上:
mcp.json中 filesystem 与 local-memory 的对比配置(脱敏)关注更新
跟踪后续版本是否修复 MCP 工具在 Web UI 聊天中的注入逻辑。
备选路径(如需紧急文件能力)
考虑官方
llama-server --agent,但会失去 Strata 对大 MoE 模型的性能优化。内部记录
将本问题状态记入本地记忆,避免后续会话重复排查。当前已停止继续尝试 stdio / HTTP 桥路径。
9. 相关文件与路径
启动Strata-new.batC:\Users\liu_d\Desktop\Strata-new\strata-q2_0-512k.jsonE:\PCCS\MCP\DuckDuckGo\mcp.jsonC:\Users\liu_d\Desktop\Strata-new\engine\strata.exelocal_memory_mcp.py(端口 9100)文档结束
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@laomu853 commented on GitHub (Oct 21, 2026):
Niko @.***> 于2026年10月19日周一 09:00写道:
@laomu853 commented on GitHub (Oct 21, 2026):
Strata 0.2.0-beta 问题反馈(每条单独提交为一个 issue)
公共环境段(每个 issue 的 Environment 都可以用这段):
B1. `[GUI] App exits silently on launch when the Documents folder path
contains non-ASCII characters`
B2. `[GUI] Image attachments and agent file writes fail on drives
without hard-link support (exFAT)`
B3. `[GUI] Qwen3.6-35B-A3B Q8_0 defaults to 512K context and fails to
load on 16 GB; UI offers sizes that cannot load`
B4. `[GUI] Model check reports "some model files are missing" because
the --mtp value is treated as a path`
B5. `[GUI] Python run by the agent cannot print Chinese
(UnicodeEncodeError, cp1252)`
B6. `[GUI] Several smaller 0.2.0-beta issues found while testing on
Windows`
(以下几条较小,按 CONTRIBUTING.md 的要求合并成一个 issue;每条都注明了复现状态)
mu lao @.***> 于2026年10月20日周二 17:05写道: