Skip to main content

LibreChat Integration

Connect your mcp.run servlets to LibreChat.

Setup

1. Get Configuration

  1. Go to /chat/{scope}/{profile}
  2. Click ConnectLibreChat tab
  3. Generate an API token
  4. Copy the YAML configuration

Connect modal with LibreChat tab

2. Update librechat.yaml

Add the configuration under endpoints.custom (LibreChat AI Endpoints docs):

version: 1.2.8
cache: true

endpoints:
custom:
- name: "mcp.run"
apiKey: "user_provided"
baseURL: "https://mcp.run/api/v1/openai/your-scope/your-profile"
models:
default: ["your-model"]
fetch: true
titleConvo: true
titleModel: "your-model"
modelDisplayLabel: "mcp.run"

3. Restart LibreChat

# Docker
docker-compose restart

# Local
npm run backend:restart

4. Use It

  1. Select "mcp.run" from model dropdown
  2. Enter your API token when prompted
  3. Your servlets are now available as tools

LibreChat with mcp.run configured

Troubleshooting

  • Can't connect: Check token and baseURL
  • No tools: Verify servlets are enabled in your profile
  • Token issues: Generate new token from Connect modal or /settings/{scope}/tokens