Description
Is your feature request related to a problem? Please describe.
Right now, when a new MCP server is entered through the UI, it is persisted using local storage using a key called mcps_storage_key
. This makes chainlit request /mcp
for each server stored in local storage
It makes it really hard to use pre configured servers, the app.py
file has no easy way to control the local storage of the browser so hacky code needs to be written to emulate the calls to /mcp
Describe the solution you'd like
Allow to use a mcps.json
file or something similar with a list of exisitng MCP server. Make mcps_storage_key
be loaded with those MCPs from the config
Describe alternatives you've considered
A way to emulate this right now is to connect_mcp()
each server in the decorators on_chat_start
and on_chat_resume
. This is like calls to /mcp
but it's pretty hacky, a better way should be provided
Related: #2148