-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Agent wants to use a MCP tool, but it returns an error: MCP server 'bocha' not connected. This is because the name of the mcp_servers in config.toml is "bocha-search", while the output of extract_mcp_server(tool_name) is "bocha", which is inconsistent and leads to the error. if removing "-" from the name of mcp_searvers in config.toml, it will return to normal.
Expected Behavior
When calling the MCP tool, extract_mcp_server(tool_name) can parse the tool_name normally, so that the agent can call the tool normally.
Steps to Reproduce
Take "bocha-search" as an example. The config.toml is:
[[mcp_servers]]
env = ["BOCHA_API_KEY"]
name = "bocha-search"
[mcp_servers.transport]
args = [
"--directory",
"/home/test/Codes/mcp/bocha-search-mcp/",
"run",
"bocha-search-mcp",
]
command = "uv"
type = "stdio"The agent.toml:
# ……
[capabilities]
tools = ["mcp_bocha_search_bocha_web_search"]Now start openfang and agent. Let the agent use the tool, and it will show the error "MCP server 'bocha' not connected".
OpenFang Version
v0.4.3
Operating System
Linux (x86_64)
Logs / Screenshots
Openfang log:
2026-03-15T02:19:34.110522Z INFO openfang_runtime::mcp: MCP server connected server=bocha-search tools=1
2026-03-15T02:19:34.110548Z INFO openfang_kernel::kernel: MCP server connected server=bocha-search tools=1
2026-03-15T02:19:34.110558Z INFO openfang_kernel::kernel: MCP: 1 tools available from 1 server(s)
Chat with the agent:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working