> ## Documentation Index
> Fetch the complete documentation index at: https://docs.variable.global/llms.txt
> Use this file to discover all available pages before exploring further.

# LibreChat

> Use Variable from LibreChat by adding it as an MCP server.

LibreChat connects to Variable as an **MCP server**, added from LibreChat's MCP settings. LibreChat registers itself with Variable automatically, and each person signs in to Variable with their own account the first time they use it.

## Before you start

* **MCP is enabled for your Variable account.** Check the **MCP URL** row in [Company settings](https://app.variable.global/company). If it shows **Not enabled**, [email us](mailto:hello@variable.co?subject=MCP%20Access).
* **Your LibreChat instance is served over HTTPS.** Variable only sends sign-ins back to an `https://` address, or to a plain `http://` loopback address (`localhost`, `127.0.0.1` or `[::1]`) for a LibreChat running on your own machine. A LibreChat served over plain HTTP on any other hostname can't connect.

## Add Variable

**1. Open the MCP settings**

In LibreChat's side panel, open **MCP Settings** and select **Add MCP**.

**2. Enter Variable's details**

Name it `Variable` and enter `https://app.variable.global/mcp` as the **MCP Server URL**. Set **Transport** to **Streamable HTTPS**.

**3. Leave authentication on auto-detect**

Set **Authentication** to **None (Auto-detect)**. LibreChat finds Variable's sign-in and registers itself, so there is nothing to fill in.

**4. Create the server**

Tick **I trust this application**, then select **Create**.

**5. Connect your Variable account**

Select Variable for a conversation. When LibreChat opens Variable, sign in, pick the account to connect, and select **Allow**.

**6. Test it**

Ask *"list my Variable accounts"*.

> [!WARNING]
>
> Don't choose **API Key**, or **OAuth** with a client ID and secret. Variable issues neither, so LibreChat can't connect with them.

## Share it with other LibreChat users

You can share the Variable server with other people on your LibreChat instance. Sharing gives them the server, not your Variable access: each person signs in to Variable with their own account the first time they use it, and sees only the Variable accounts they belong to.

## Troubleshooting

| Symptom | Likely cause |
| - | - |
| Connecting fails with an `Invalid redirect_uri` error | LibreChat is served over plain HTTP on a hostname other than a loopback address (`localhost`, `127.0.0.1` or `[::1]`). Serve it over HTTPS. |
| Variable shows **Needs Auth** | You haven't signed in to Variable from LibreChat yet, or the sign-in expired. Connect it again and sign in. |
| LibreChat asks for a client ID and secret | **Authentication** is set to **OAuth**. Edit the server and set it to **None (Auto-detect)**. |

For anything else, see the general [troubleshooting table](https://docs.variable.global/mcp/configuration#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.