MLAGPT Self-Hosted AI Platform

MLAGPT Self-Hosted AI Platform

Maryland Legal Aid built a secure, self-hosted AI chat platform on LibreChat so its 390+ staff across Maryland can use generative AI for legal work without compromising client confidentiality.

Project Description

What It Is

MLAGPT is a generative AI workspace built for the staff of Maryland Legal Aid, one of the largest and oldest legal aid organizations in the country. The platform runs on LibreChat, an open-source, model-agnostic AI chat interface, and is self-hosted on MLA's own Azure cloud infrastructure. Staff log in through single sign-on and land in a ChatGPT-style interface connected to OpenAI and Anthropic models via API.

The platform launched officially on March 24, 2026. MLA had been piloting earlier versions internally before that, iterating through configurations and use cases with staff.

What makes MLAGPT distinct from a commercial AI subscription is control. MLA owns the infrastructure, manages access, and enforces a Zero Data Retention policy with its AI providers. No client data is stored or used to train external models. The organization holds Business Associate Agreements with both OpenAI and Anthropic.

What Staff Use It For

Attorneys and paralegals use MLAGPT to draft client letters, summarize lengthy case files, brainstorm legal arguments, and translate complex legal language into plain English for clients. Administrative and operations staff generate internal communications, create training materials, summarize reports, and streamline documentation workflows.

MLA also built custom AI "agents" for recurring legal aid tasks: case summaries, rent ledger analysis, and referral support. These agents enforce consistent prompts and output formats across the organization's 11 offices.

All AI-generated content must be reviewed, verified, and edited by MLA staff before being used in any official capacity. The platform includes clearly communicated limitations around scanned documents, file sizes, and the use of web search tools.

How It Works (Architecture)

MLAGPT runs on an Azure Virtual Machine (Ubuntu Linux) using Docker containers. The stack includes LibreChat's frontend and backend containers, a MongoDB database, and Traefik as a reverse proxy handling HTTPS via Let's Encrypt certificates.

Staff connect through their browsers over HTTPS. Authentication is handled via MLA's existing single sign-on system (Microsoft Entra ID). The platform supports multimodal chat (text, images, audio, web search), Retrieval-Augmented Generation (document upload for context-aware responses), and user memory for personalized interactions.

MLA has also built and open-sourced a LegalServer MCP (Model Context Protocol) server. This connector lets the AI platform interact directly with LegalServer, the case management system used by MLA and hundreds of other legal aid organizations. Through MCP, staff can query case data from within the chat interface.

The Technology Stack

The platform is fully open source. Key components:

LibreChat (https://github.com/LibreChat-AI) is the core platform. It is a self-hosted AI chat interface that supports multiple AI providers (OpenAI, Anthropic, Google, and others), agents, RAG, MCP tools, code interpretation, and multi-user authentication. LibreChat has over 20,000 GitHub stars and active community development.

MLA's LibreChat fork (https://github.com/MarylandLegalAid/LibreChat) contains MLA's configuration and customizations.

MLA's LegalServer MCP server (https://github.com/MarylandLegalAid/legalserver-mcp) is a Node.js tool server that connects LibreChat to LegalServer's API using bearer token authentication.

Infrastructure: Azure VM (recommended: 4 vCPU, 16GB RAM, 80GiB SSD), Docker Compose, Traefik reverse proxy, Let's Encrypt SSL, MongoDB.

LLM access: OpenAI and Anthropic APIs, accessed under BAA and ZDR agreements.

What Problem It Solves

Before MLAGPT, MLA staff had limited access to AI tools. Commercial platforms were expensive at organizational scale and raised data privacy concerns. Most staff had little hands-on experience with AI. Workflows were manual, repetitive, and difficult to share or replicate across teams.

The key insight was that API-based access to LLMs costs a fraction of per-seat subscription pricing, and that an open-source chat interface could be self-hosted with full control over data flow. MLA estimated this approach to be significantly more affordable and more secure than purchasing commercial AI licenses for hundreds of employees.

Replication and Sharing

MLA has been explicit about wanting other legal aid organizations to replicate this work. The team presented a step-by-step deployment workshop at the LSC Peer Learning Lab in March 2026, walking participants through the full process: creating an Azure VM, installing Docker, cloning LibreChat, configuring API keys, setting up HTTPS with Traefik, and connecting the LegalServer MCP server. They also produced a detailed AI Infrastructure Glossary defining every term in the deployment pipeline.

Atlanta Legal Aid Society has already adapted MLA's approach and built additional tools on top of it for their own intake and case workflows.

MLA's next steps include building a real-time analytics dashboard for cost and usage metrics, and creating documentation to make replication easier for organizations with less technical capacity.

Why It Matters for the Field

MLAGPT represents a pattern that many legal aid organizations could follow: self-hosting an open-source AI platform on cloud infrastructure, connecting it to existing case management systems, and maintaining full control over privacy and data governance. The cost model (API usage rather than per-seat subscriptions) makes AI accessible to organizations that could not afford commercial legal AI products.

The LegalServer MCP integration is especially notable. LegalServer is the dominant case management system in U.S. legal aid. A working MCP connector means any organization running LegalServer could, in principle, plug their case data into a self-hosted AI workspace.

Links and Resources

Link to Project

https://github.com/MarylandLegalAid/LibreChat