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.
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:
- Inputting client data
- Reviewing case types
- Checking for conflicts of interest
- Inspecting documents
- Selecting the appropriate attorney
- 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, andget_lawyer. - Write tools:
accept_case,reject_case, andassign_case_to_lawyer. - Elicitation is used by the write tools because they need required information such as
case_id,decided_by,decision_reason, orlawyer_idbefore 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 toacceptedand records the decision metadata.reject_case: updates a case torejectedand 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-policycompany://case-typescompany://required-documentscompany://lawyerscompany://statisticscompany://staffcompany://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
- The agent reads intake information through
get_caseandget_client. - It checks conflict and policy data via resources and
get_conflict_checks. - It summarizes the matter using the
summarize_caseprompt. - A human reviewer accepts or rejects the case with
accept_caseorreject_case. - If accepted, the agent may use
assign_case_to_lawyerto route the case to an active attorney.
Notes on Behavior
assign_case_to_lawyeris 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。