Repository navigation
MCP tools become unavailable when multiple servers are enabled together #16449
Replies: 4 comments
|
Update: further testing shows this is broader than originally reported. This suggests Agents may use a different code path for MCP tool Further isolated: this reproduces with a SINGLE MCP server attached to a
Also ruled out as causes during this investigation:
This strongly points to Agents using a different code path than plain |
|
Is this possibly related to #15292 @danny-avila |
|
Thanks for the detailed isolation. I traced both paths, and LibreChat sends the same MCP tool definitions for a saved agent as for the composer's MCP selector. Nothing between your build and current 1. Ollama's context window (most likely, and it fits both reports). Ollama's OpenAI-compatible To test it, raise the context on the Ollama side.
2. "Defer loading" on the agent's tools (saved agent only). In the Agent Builder, open the Could you share:
|
|
I encountered a similar situation with LibreChat, Ollama and Qwen3:8b, using Home Assistant MCP. One aspect I noticed was the amount of context consumed by the MCP tool definitions. With 77 tools registered, the available context appeared to become heavily occupied before the model could meaningfully interact with the tools. I investigated LibreChat's deferred tool loading and configured the agent as follows:
LibreChat's logs confirmed that the deferred tool configuration was applied:
I also changed the Ollama container configuration to:
In a direct OpenAI-compatible API test, this resulted in Ollama returning a proper native tool call with the fully namespaced MCP tool name. With these changes, I eventually got the Home Assistant agent working: it successfully switched on My environment:
I cannot conclusively say whether the original context exhaustion was caused by model identification, tool definitions, Ollama's Go template handling, or a combination of these factors. However, I think it would be useful to investigate how deferred MCP tools, tool discovery and Ollama's native tool-calling support interact, particularly with smaller models and larger MCP tool collections. Sharing this in case it helps with your investigation. |
Uh oh!
There was an error while loading. Please reload this page.
What happened?
When multiple MCP servers are enabled together for a single conversation,
one server's tools become completely unavailable to the model, even though
that same server works correctly when enabled alone. The model reports the
tool as "not available" / "not in the provided list of tools" and never
attempts to call it, despite the server being connected and healthy
(confirmed via server logs showing successful tool discovery at the exact
time of the failed request).
Reproduced consistently across multiple fresh conversations, fresh browser
sessions, and after full container recreation (docker compose up -d
--force-recreate), ruling out session or cache staleness as the cause.
Version Information
LibreChat version: v0.8.8-rc1
Commit: eaef87f
Branch: main
Build date: 2026-08-14 07:28:58 UTC
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36
Steps to Reproduce
requiresOAuth: false): a small server exposing 3 tools, and a larger
one (github MCP server) exposing 26 tools
qwen3-vl:8b-instruct)
tool is called and returns results
together in the MCP Servers selector
"not available" and does not attempt to call it
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
Code of Conduct
All reactions