Repository navigation
Restart of LibreChat in Docker resets MCP_SERVERS:Create permissions from true to false #17816
|
Every time our LibreChat docker container gets restarted, it resets the MCP_SERVERS:Create permissions on the User role from true to false. I checked for any hardcoded values in librechat.yaml, and can confirm nothing is there. When I re-enable MCP Server Creation through the Admin interface, it updates the MongoDB as expected, but upon the next restart, it is back to false. What am I missing? Thank you! Before restart:
After restart:
|
Replies: 2 comments
|
That reset is LibreChat itself, not your config. On every startup Set the key explicitly and the block is skipped: interface:
mcpServers:
create: trueOnly the keys you list under The block has no "already ran" marker, so it is a per-boot check rather than a one-time migration. It came in with PR #12308. Worth an issue if you want the admin-panel value to win without the yaml line. |
|
AAH! Okay, that explains it. Thank you! |
That reset is LibreChat itself, not your config. On every startup
updateInterfacePermissionsruns a block labelled "One-time migration: correct MCP_SERVERS.CREATE for USER role" in packages/api/src/app/permissions.ts. It fires when the USER role in Mongo hasMCP_SERVERS.CREATE: true, the built-in default for USER isCREATE: false(roles.ts), andlibrechat.yamldoes not setinterface.mcpServers.create. All three hold for you, so each restart writes CREATE back to false. WithDEBUG_LOGGING=truethe log showsRole 'USER': Migrating MCP_SERVERS.CREATE from true to false (Zod default correction).Set the key explicitly and the block is skipped:
Only t…