Skip to content

[Bug] Local MCP plugins not starting — restart_mcp_with_logs returns 0/0, engine scan phase skips all plugins #933

Description

@BeadyTooth57254

提交前确认 / Before submitting

  • 我已经搜索过现有 Issue,确认这不是重复问题。
  • 我已经移除日志、截图和配置中的密钥及隐私信息。

Operit 版本 / Operit version

1.12.1

运行形态 / Distribution

Release APK

设备与运行环境 / Environment

Android 12,SDK 31。OPPO PFGM00

问题领域 / Area

Plugin, Skill or MCP / 插件、Skill 或 MCP

主要问题描述 / Main problem description

All MCP plugins — both local (stdio/npx) and remote (httpStream) — stopped working.
restart_mcp_with_logs consistently returns "0 success, 0 failed" in 250ms,
indicating the MCP engine scan phase finds no plugins. Manual restart via UI
also has no effect. Local MCP deployment directories in Linux (
/mcp_plugins/)
are incomplete (hotnews is empty, office-word has files but no venv).
However, manual pnpm dlx @wopal/mcp-server-hotnews in the Linux terminal
works fine — proving dependencies/networking are OK, it's the Operit MCP
engine that isn't launching anything.

This may share a root cause with #907 (remote MCP tools not registering),
but our case additionally includes local plugins failing at the scan/launch
stage, not just at tool registration.

复现步骤 / Steps to reproduce

  1. Have local and remote MCP plugins configured in mcp_config.json
    (e.g. hotnews: npx command-type, office-word: Python local,
    galatea_garden/numen/ombre_brain: httpStream remote)
  2. Open Operit → MCP management page → tap restart
    OR call restart_mcp_with_logs via API
  3. Observe: response returns 0 success / 0 failed in ~250ms
  4. Check AI tool panel: no MCP tools available
  5. Check logcat: no MCP-related entries (McpPlugin, deploy_mcp,
    startPlugin, initMCP — all absent)

复现频率 / Reproducibility

Always / 每次发生

相关配置 / Related context

  • Device: OPPO PFGM00, Android 12 (SDK 31), Shizuku enabled (not rooted)
  • App version: latest as of 2026-08-12
  • Previous working state:
    • hotnews: last started 2026-07-22, stopped 86s later
    • galatea_garden: last stopped 2026-08-09 00:25
    • ombre_brain: last stopped 2026-08-10
    • Issue first noticed: 2026-08-12
  • Sandbox packages (81 installed) work normally — only MCP is broken
  • mcp_config.json is valid and complete (see Logs section)
  • Linux deploy directory ~/mcp_plugins/hotnews/ is empty
  • Manual pnpm dlx test: succeeds (see Logs section)
  • restart_mcp_with_logs: always returns {successCount:0, failedCount:0, plugins:[]}
  • UI manual restart: no effect

截图或录屏 / Screenshot or recording

Image

日志或错误信息 / Logs or error output

【1. restart_mcp_with_logs 返回结果】
{successCount: 0, failedCount: 0, plugins: []}
耗时: ~251ms

【2. 手动 pnpm dlx 测试 — 成功】
$ cd ~/mcp_plugins/hotnews && timeout 15 pnpm dlx @wopal/mcp-server-hotnews
Hot news MCP server running on stdio
→ 证明依赖和网络正常

【3. Linux 部署目录状态】
~/mcp_plugins/
├── hotnews/ ← 空目录,无文件
├── mcp-github-com-gongrzhe-office-word-mcp-server/ ← 有源码,缺 venv
└── mcp-github-com-regenrek-deepwiki-mcp/ ← 有文件

【4. mcp_config.json — mcpServers 部分】
"hotnews": {
"command": "npx",
"args": ["-y", "@wopal/mcp-server-hotnews"],
"disabled": false
}
"office-word": {
"command": "~/mcp_plugins/.../venv/bin/python",
"args": ["-m", "word_document_server.main"],
"disabled": false
}
→ 配置格式正确,disabled 均为 false

【5. mcp_config.json — pluginMetadata 远程插件(4个,均为 httpStream)】
galatea_garden: disabled=false, endpoint=https://galatea.abysslumina.com/mcp
ombre_brain: disabled=false, endpoint=https://es-sentinel.zeabur.app/mcp
for_the_sentinel: disabled=false, endpoint=https://for-the-sentinel.zeabur.app/mcp
numen: disabled=false, endpoint=http://192.168.100.236:8765/mcp
→ 均未禁用

【6. server_status.json 最后活动时间】
hotnews: lastStart=2026-07-22, lastStop=2026-07-22 (运行86秒)
galatea_garden: lastStart=2026-08-05, lastStop=2026-08-09
for_the_sentinel: lastStart=2026-08-04, lastStop=2026-08-06
ombre_brain: lastStart=2026-08-09, lastStop=2026-08-10
numen: lastStart=0, lastStop=0 (从未启动)
→ MCP 引擎停摆时间与各插件最后活动时间吻合

【7. logcat — MCP 相关条目】
搜索关键词: McpPlugin, deploy_mcp, startPlugin, initMCP, MCP
结果: 0 条匹配(2026-08-12 11:00 重启后的所有日志中均无 MCP 相关输出)
→ MCP 引擎完全静默

【8. 对比:Sandbox 包正常】
2026-08-12 11:00 重启日志中 Sandbox 包扫描正常: "loaded 109 packages, 0 errors"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions