# Connect Aroai to LibreChat

Connect self-hosted LibreChat instances to Aroai via librechat.yaml with per-user OAuth or a workspace Bearer key.

Canonical: https://aroai.com/integrations/librechat/

## At a glance

- **Config file**: librechat.yaml
- **Transport type**: streamable-http
- **Endpoint URL**: https://mcp.aroai.com/v1
- **Auth options**: requiresOAuth: true (per user) or Authorization header from .env

## Setup configurations

### Option A: Per-user OAuth (recommended for multi-staff LibreChat)

Add under mcpServers in librechat.yaml so each staff member authenticates with their own Aroai access.

```text
mcpServers:
  aroai:
    type: streamable-http
    url: "https://mcp.aroai.com/v1"
    requiresOAuth: true
```

### Option B: Shared workspace API key via .env

Store AROAI_API_KEY in your LibreChat .env file and reference it in librechat.yaml.

```text
mcpServers:
  aroai:
    type: streamable-http
    url: "https://mcp.aroai.com/v1"
    headers:
      Authorization: "Bearer ${AROAI_API_KEY}"
```

## What happens once connected

- Users pick Aroai from the LibreChat MCP tool menu in any chat model and receive source-cited NZ and AU results.

## Prompts to try

- **Verify connection**: "Run aroai_status to confirm LibreChat can reach our Aroai workspace."
- **NZ residential market rent**: "Check MBIE residential bond rent statistics for a 3-bedroom house in Wellington City and compare the most recent pooled windows."

## Troubleshooting

### LibreChat fails to start or cannot connect to mcp.aroai.com.

Check that type is set to streamable-http (not sse), YAML indentation is valid, and outbound HTTPS from the LibreChat container to mcp.aroai.com is permitted.
