Skip to content

Desktop: 配置 MCP Server 后 tools 面板报 React #31 错误 #1295

@jiqunshi024-bit

Description

@jiqunshi024-bit

问题描述

Desktop 客户端(v0.47.0 预发布版)在 ~/.reasonix/config.json 中配置了 MCP Server 后,打开 tools 面板会抛出 React 错误 #31

错误信息

Minified React error #31; visit https://react.dev/errors/31?args[]=object%20with%20keys%20%7Bname%2C%20transport%2C%20command%2C%20args%7D

解码后:Objects are not valid as a React child (found: object with keys {name, transport, command, args})

原因分析

MCP Server 的配置对象被直接传入了 React 的 render,没有取具体字段。对象 shape {name, transport, command, args} 恰好对应 config.json 中 mcp 数组的一条记录。

大概率是类似 {mcpServer} 应该写成 {mcpServer.name}{JSON.stringify(mcpServer)} 的问题。

复现步骤

  1. ~/.reasonix/config.jsonmcp 数组中添加任意一个 MCP Server
  2. 重启 Desktop 客户端
  3. 打开 tools 面板 → 触发 React error refactor(dashboard): drop the editor surface (Stage 2 of #28) #31

环境

  • Reasonix Desktop v0.47.0(预发布版)
  • Windows
  • 配置了 4 个 stdio 类型的 MCP Server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions