Skip to main content

Shared Chat Surface Adoption Pattern

LibreChat is OceanSoft's platform-wide, self-hosted chat surface per the platform chat-frontend ADR, which is not yet published in Architecture Decisions. Products do not build separate chat UIs — they adopt the shared LibreChat instance and expose their tools/agents via MCP. This document describes the repeatable pattern for any product.

How a Product Adopts LibreChat

  1. Register the product in docs/src/data/projects/<product>.ts as a LibreChat consumer. Example: finops-focus registers { name: "finops", surface: "librechat", mcp: ".mcp.local.json" }.

  2. Expose product tools via .mcp.local.json (or .mcp.json for team defaults). Product MCP servers are declared in this file with authentication env vars inline. Example (finops-focus):

    {
    "mcpServers": {
    "awslabs-billing-cost-management": {
    "command": "uvx",
    "args": ["awslabs.billing-cost-management-mcp-server==0.0.21"],
    "env": { "AWS_PROFILE": "${AWS_BILLING_PROFILE}", "AWS_REGION": "${AWS_DEFAULT_REGION}" }
    }
    }
    }
  3. Provide credentials (HITL-owned): set the env vars (e.g. AWS_BILLING_PROFILE, AWS_REGION) in the deployment environment. Credentials are not committed to git; HITL sets them at runtime or via .env.local.

  4. Launch the shared LibreChat stack with your product's override:

    task mcp:serve &  # Start the bench MCP server in the background
    docker compose -f adlc-framework/command-center/docker-compose.librechat.yml \
    -f docker-compose.librechat.override.yml up

    The shared compose does not mount librechat.yaml or MCP configs by default. Your product provides a thin docker-compose.librechat.override.yml that binds your repo's librechat.yaml into the container and adds extra_hosts host.docker.internal:host-gateway so the container can reach the bench MCP server running on the host.

Rollout Status

StatusProductsOwner
Wired (Pilot)finops-focusThis session (Story E2)
Follow-on8 remaining OceanSoft products (xOps, platform-idp, cert-inventory, cloudops, security-suite, inventory-manager, cost-tagger, governance-agent)Sprint N+1 increment

Critical note: The per-product adoption steps are repeatable and do NOT require framework changes. The follow-on increment is product onboarding only, not Story E2 scope.