Skip to content

[Bug]MCP服务由于新添加项目配置写错导致,MCP服务项目全体失踪 #5666

@tutianyu101

Description

@tutianyu101

What happened / 发生了什么

[2026-03-02 15:53:11.354] [Core] [ERRO] [v4.18.3] [routes.tools:69]: Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\dashboard\routes\tools.py", line 45, in get_mcp_servers
"active": server_config.get("active", True),
^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

Image Image Image

我在新添加MCP的时候可能是写错了配置,然后点保存
立马全部项目都消失了
我能力有限不知道如何恢复,请帮帮我

Reproduce / 如何复现?

1.填写:
{
"mcpServers": {
"type": "streamableHttp",
"url": "https://dashscope.aliyuncs.com/api/v1/mcps/WebSearch/mcp",
"headers": {
"Authorization": "Bearer ${DASHSCOPE_API_KEY}"
}
}
}
2.名称:阿里百炼联网搜索
3.保存

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

版本:4.18.3
系统windows server 2022
安装包部署
4核16G180G 12M

OS

Windows

Logs / 报错日志

[2026-03-02 15:53:11.354] [Core] [ERRO] [v4.18.3] [routes.tools:69]: Traceback (most recent call last):
File "C:\Users\Administrator.astrbot_launcher\instances\5807117e-1c9a-4f6e-bedd-59c5ff4a4e81\core\astrbot\dashboard\routes\tools.py", line 45, in get_mcp_servers
"active": server_config.get("active", True),
^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions