Ashfords Law Firm MCP Server

Ashfords Law Firm MCP Server

Enables law firm staff to automate case intake, conflict-of-interest checks, and attorney assignment through secure MCP tools without exposing sensitive data directly to LLMs.

Category
Visit Server

README

[Ashfords Law Firm] — Intelligent Case Intake & Assignment System

Ashfords Law Firm is building a secure, intelligent intake workflow for legal case intake and assignment. This repository implements an MCP (Model Context Protocol) server that gives an AI agent controlled access to legal intake data without exposing the underlying databases directly to the model.

About Us

We are a law firm receiving hundreds of new case requests daily. Our goal is to streamline legal consultation intakes, accurately evaluate case details, prevent conflicts of interest, and match clients with the right specialized attorneys seamlessly and securely.


⚠️ The Problem

The traditional intake process relies heavily on reception staff to manually handle multiple steps for every case request:

  1. Inputting client data
  2. Reviewing case types
  3. Checking for conflicts of interest
  4. Inspecting documents
  5. Selecting the appropriate attorney
  6. Determining whether the firm accepts or rejects the case

Key Challenges

  • Time-consuming: manual intake creates delays for potential clients.
  • Human error: conflict checks and document reviews are easy to miss or mis-handle.
  • Sensitive data: case information contains highly confidential client details.
  • Security constraints: direct LLM access to client and case databases is not acceptable for privacy and compliance reasons.

🤖 Why AI Agents and MCP?

Traditional intake systems mostly collect data statically, and raw LLMs are not safe to grant direct database access. This project uses an AI agent through an MCP server so the model can assist employees safely by calling controlled tools instead of touching the database directly.

This approach allows the system to:

  • Assist employees safely through controlled MCP tools.
  • Run conflict-of-interest checks and preliminary document reviews quickly.
  • Suggest or support attorney matching based on specialization and availability.
  • Reduce manual errors in intake and decision workflows.
  • Preserve a strong security boundary around sensitive client information.

What This Server Provides

The server exposes:

  • Tools for reading case, client, lawyer, and conflict information.
  • Tools for making guarded case decisions such as accept, reject, and assignment.
  • Resources that provide firm policy and intake metadata.
  • Prompts that help an AI agent produce structured legal summaries.
  • Elicitation support so the agent can ask for any missing required field before performing a write action.

The implementation is built around FastMCP and a SQLite database stored in db.


Tool Comparison Note

The server separates read-only operations from write operations so clients can safely inspect information before taking action.

  • Read-only tools: database_health, get_client, get_case, get_conflict_checks, and get_lawyer.
  • Write tools: accept_case, reject_case, and assign_case_to_lawyer.
  • Elicitation is used by the write tools because they need required information such as case_id, decided_by, decision_reason, or lawyer_id before a state-changing action can proceed. The server asks for only the missing values instead of forcing the client to provide everything up front.
  • If a client connects without the capability required by one of these riskier tools (for example, the elicitation capability needed to prompt for missing fields), the workflow does not silently proceed. The tool aborts before a write is performed, and the operation fails with an error rather than changing case data.

Core Features

1. Secure Intake Assistance

The MCP server enables an AI agent to retrieve relevant case information and policy resources without direct database access.

2. Conflict Awareness

The system can surface conflict-check data for a case so staff can evaluate whether the matter should proceed.

3. Decision Support

The server supports case acceptance and rejection decisions through controlled tools.

4. Attorney Assignment Workflow

Case assignment is handled through a guarded tool that checks the current case status, lawyer availability, and caseload before making a change.

5. Human-in-the-Loop Safety

Sensitive actions require explicit information and are designed to be used under human oversight rather than as fully autonomous write operations.


Available Tools

Read-only Tools

  • database_health: verifies that the SQLite database is reachable and that key tables exist.
  • get_client: retrieves a client record by party ID.
  • get_case: retrieves a full case record, including client and policy metadata.
  • get_conflict_checks: returns conflict-check records for a case.
  • get_lawyer: retrieves lawyer details by lawyer ID.

Write Tools

  • accept_case: updates a case to accepted and records the decision metadata.
  • reject_case: updates a case to rejected and records the decision metadata.
  • assign_case_to_lawyer: assigns an active lawyer to an accepted case if the lawyer is eligible and has capacity.

Resources

  • company://intake-policy
  • company://case-types
  • company://required-documents
  • company://lawyers
  • company://statistics
  • company://staff
  • company://policies/conflict

Prompts

  • summarize_case: a structured prompt template for generating legal intake summaries.

Security Model

This project deliberately avoids granting the LLM direct access to the law firm’s operational databases. Instead, the agent interacts through the MCP server using a small set of approved tools.

That design provides:

  • A narrow permission boundary.
  • Stronger controls around state-changing actions.
  • Better auditability for case decisions.
  • Reduced chance of accidental or unauthorized data exposure.

Getting Started

Prerequisites

  • Python 3.10+
  • pip

Install Dependencies

pip install -r requirements.txt

Start the Server

python -m mcp_server.server

The server runs over HTTP on port 8000 by default.

Optional: Inspect the Server

You can inspect the MCP server with the MCP inspector:

npx @modelcontextprotocol/inspector

Project Structure

  • agent contains the client/agent wrapper logic.
  • mcp_server contains the FastMCP server implementation, tools, prompts, and resources.
  • db contains the SQLite database, schema, seed data, and ERD assets.
  • elicitation_test.py exercises the elicitation flow.
  • smoke_test.py provides a simple smoke test for the server.

Example Workflow

  1. The agent reads intake information through get_case and get_client.
  2. It checks conflict and policy data via resources and get_conflict_checks.
  3. It summarizes the matter using the summarize_case prompt.
  4. A human reviewer accepts or rejects the case with accept_case or reject_case.
  5. If accepted, the agent may use assign_case_to_lawyer to route the case to an active attorney.

Notes on Behavior

  • assign_case_to_lawyer is hidden by default and is only exposed after a case has been accepted.
  • The server uses elicitation for missing fields rather than failing immediately on incomplete write requests.
  • The current implementation is designed for controlled, supervised use rather than fully autonomous case decisions.

Summary

This repository demonstrates how an MCP server can safely connect an AI agent to a law firm’s intake process. It provides secure access to sensitive legal data, supports structured review workflows, and enforces a clear boundary between inspection and decision-making.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured