Overview
LibreChat is an open-source AI chat platform that supports MCP (Model Context Protocol) for enhanced tool integration. Through Portkey’s MCP Gateway, you can seamlessly connect any MCP server to LibreChat without managing infrastructure or authentication.Key Benefits
- Secure Authentication: Portkey handles OAuth flows and token management
- Unified Authentication: Single OAuth token to rule them all
- Team Collaboration: Share MCP server configurations, manage access permissions, and ensure everyone on your team has the tools they need—configured correctly, every time
- Complete Observability: See every request, track latency, monitor errors, and understand usage patterns
Prerequisites
Before you begin, ensure you have:- LibreChat installed and running
- Portkey account with workspace access
- MCP server registered in Portkey’s MCP Hub
- Access to your
librechat.yaml
configuration file
Quick Setup
Step 1: Get Your MCP Server URL
- Log in to Portkey Dashboard
- Navigate to MCP Hub → Your Servers
- Copy your server URL:
Step 2: Configure LibreChat
- Open your
librechat.yaml
configuration file - Add your MCP server configuration under the
mcpServers
section:
Step 3: Restart LibreChat
Restart LibreChat to load the new MCP configuration:Step 4: Authentication
Portkey handles all authentication flows automatically:-
First Connection: When LibreChat first connects to an authenticated MCP server, Portkey will:
- Open your browser for OAuth authorization (if required)
- Store credentials securely
- Maintain session state
- Subsequent Connections: Authentication tokens are refreshed automatically
- Team Access: Workspace members share the same authentication scope based on your Portkey settings
Configuration Examples
Single Server Setup
Multiple Servers Setup
Support
Need help? We’re here for you:- 📧 Email: [email protected]
- 💬 Discord: Join our community