Adding MCP in Librechat
-
I've been trying to get Librechat setup (thanks for getting the package on Cloudron), and have got Openrouter and websearch working (using a SearXNG hosted on Cloudron). One of the features that would dramatically increase the capabilities of the LLMs on Librechat would be to leverage the Model Context Protocol (MCP) and integrate them with various tools.
According to the Librechat documentation on MCP - [https://www.librechat.ai/docs/features/mcp] - the easy way to find and install MCP servers on Librechat is to use [smithery.ai]. But executing an npx command in the Librechat app terminal on Cloudron doesn't work. I guess this is because the file system is read-only? Or the folder structure is not what the smitthery.ai code expects? Or both?
I also tried to manually add an MCP server - for Exa Search - using this in the librechat.yaml file:
mcpServers: exa-search: command: "npx" args: ["-y", "@exa-labs/exa-mcp"] env: EXA_API_KEY: "${EXA_API_KEY}"
It shows up on the Librechat interface, but is 'offline' and cannot be initialized.
Has anyone had some luck getting an MCP going on Librechat? Or any tips on what might get it working?