LibreChat is an open-source, self-hosted web application that provides a ChatGPT-like interface supporting multiple AI providers including OpenAI, Anthropic, Google, and more. It supports MCP servers through a YAML configuration section in the root librechat.yaml file, using the mcpServers key. Unlike most apps that use JSON, LibreChat's entire configuration — including MCP — lives in a single YAML file alongside provider credentials, model settings, and feature flags. Stdio and remote servers are declared with the same field names as the canonical format. MCP tools become available to all models configured in LibreChat once the server is added and the application is restarted. The getmcp CLI generates YAML output for LibreChat automatically.
Quick Install with getmcp
The fastest way to install MCP servers in LibreChat is with the getmcp CLI:
npx @getmcp/cli add <server-id>
Configuration Format
Format
YAML
Root Key
mcpServers
Project Config
librechat.yaml
Prerequisites
•A self-hosted LibreChat instance (see librechat.ai for setup instructions)
•Docker or Node.js runtime for your LibreChat deployment
•Node.js 18 or higher on the host for running npx-based MCP servers
•Write access to the librechat.yaml file in your LibreChat installation directory
Popular Servers for LibreChat
Troubleshooting
▸MCP section not recognized: The mcpServers key must be at the top level of librechat.yaml. Nested incorrectly under another key, it will be silently ignored. Use a YAML linter to verify the structure.
▸Server not available after editing librechat.yaml: LibreChat must be restarted after any config change. With Docker, run docker compose restart librechat to apply the new config.
▸YAML indentation errors: YAML is whitespace-sensitive and does not allow tab characters. Use spaces only and verify the indentation with a YAML validator before restarting.
▸Server process cannot find binaries: The MCP server process runs inside the LibreChat container (if using Docker). Install required runtimes (Node.js, Python, uv) inside the Docker image or mount them as volumes.