Skip to main content
This guide is for administrators to configure LibreChat to connect to your company’s Glean MCP servers.

Prerequisites

  • Glean OAuth authorization server enabled (Admin Console > Settings > Third-party access)
  • MCP server enabled (Admin Console > Platform > MCP)
  • LibreChat instance with MCP server support enabled

Add Glean MCP Server to LibreChat

1

Open your LibreChat configuration

Navigate to your LibreChat deployment and locate the librechat.yaml configuration file.
2

Add the Glean MCP server configuration

Add the following configuration to the mcpServers section of your librechat.yaml file:
mcpServers:
  glean_[server-name]:
    type: streamable-http
    url: https://[instance-name]-be.glean.com/mcp/[server-name]
    serverInstructions: true
    timeout: 60000
    requiresOAuth: true
    oauth:
      authorization_url: "https://[instance-name]-be.glean.com/oauth/authorize"
      token_url: "https://[instance-name]-be.glean.com/oauth/token"
      scope: ""
      redirect_uri: "http://localhost:3080/api/mcp/glean_[server-name]/oauth/callback"
Replace the following placeholders:
  • [instance-name]: Your Glean instance name (e.g., acme)
  • [server-name]: The name of your MCP server as configured in Glean (e.g., default)
For more details on MCP server configuration options, see the LibreChat MCP Servers documentation.
3

Restart LibreChat

After saving the configuration file, restart your LibreChat instance to apply the changes. Initialization happens at startup, and the app must be restarted for changes to take effect.
4

Authenticate with Glean OAuth

When users first interact with the Glean MCP server, they will be prompted to complete the OAuth sign-in flow.
OAuth Consent
5

Validate tools

Run a quick search to confirm connectivity and verify the available tools.
Tool Validation

Configuration Options

OptionDescriptionDefault
typeTransport type. Use streamable-http for Glean MCP servers.Required
urlThe Glean MCP server endpoint URL.Required
serverInstructionsWhether to fetch and display server-provided instructions.true
timeoutRequest timeout in milliseconds.60000
requiresOAuthEnable OAuth authentication flow.true
oauth.authorization_urlGlean OAuth authorization endpoint.Required
oauth.token_urlGlean OAuth token endpoint.Required
oauth.scopeOAuth scopes (leave empty for default Glean scopes).""
oauth.redirect_uriOAuth callback URL for your LibreChat instance.Required
The redirect_uri must match the URL where your LibreChat instance is hosted. For local development, use http://localhost:3080/api/mcp/glean_[server-name]/oauth/callback. For production deployments, replace localhost:3080 with your actual LibreChat domain.

Troubleshooting

Connection Issues

If users report connection failures:
  1. Verify the MCP server URL is correct and uses the proper instance name
  2. Ensure OAuth endpoints are correctly configured
  3. Check that the redirect_uri matches your LibreChat deployment URL
  4. Verify that users have active Glean accounts with appropriate permissions

OAuth Errors

If authentication fails:
  1. Confirm the Glean OAuth authorization server is enabled in Admin Console
  2. Verify the authorization_url and token_url use the correct instance name
  3. Check that the redirect URI is properly configured and accessible

Tool Availability

If tools aren’t appearing in LibreChat:
  1. Confirm the MCP server is enabled in Admin Console
  2. Verify tools are enabled on the specific server configuration
  3. Check the LibreChat logs for any MCP connection errors
  4. Restart LibreChat to refresh the connection