Law Office SQLite MCP Server
A Model Context Protocol (MCP) server implementation for law office database management, specializing in client records, case filing, time tracking, and invoice management.
Overview
This server provides a specialized database interface for law firms to:
- Manage client and matter records
- Track case file entries (documents, communications, notes)
- Log billable time with evidentiary links to case activities
- Create and validate client invoices
- Enforce business rules for proper legal billing
Features
Core Database Operations
- Standard SQL operations (SELECT, INSERT, UPDATE, DELETE)
- Table management and schema information
- Multi-statement transactions and batch operations via
execute_script
tool
Specialized Legal Tools
record_case_entry
: Add documentation to case filesrecord_billable_time
: Log time with proper substantiationget_unbilled_time
: Track unbilled work by client or mattercreate_invoice
: Generate new client invoicesadd_billing_to_invoice
: Associate time entries with invoicescheck_invoice_validity
: Validate invoices for billing conflictssubmit_invoice
: Finalize invoices for client submission
Database Schema
- Client and matter management
- Case file documentation system
- Comprehensive billing and invoice workflow
- Automatic timestamp management
- Conflict detection for overlapping time entries
Installation
Prerequisites
- Python 3.10 or higher (Python 3.11+ recommended). Check with
python3.11 --version
(or similar). If needed, install using your system’s package manager (e.g.,brew install python@3.11
on macOS). - uv: A fast Python package installer. Install from astral.sh (
curl -LsSf https://astral.sh/uv/install.sh | sh
). - SQLite3 (usually pre-installed on macOS/Linux).
- Git (for cloning).
Setup Instructions
Clone the repository:
git clone <repository_url> # Replace with your repo URL cd mcp-law-office-db # Or your repository directory name
Create and activate a virtual environment (using your Python 3.10+ interpreter):
# Replace python3.11 with your specific version (e.g., python3.10) python3.11 -m venv .venv source .venv/bin/activate
(You should see
(.venv)
at the start of your terminal prompt)Upgrade pip (optional but recommended):
python3 -m pip install --upgrade pip
Install dependencies using
uv
: (This installsmcp
and its extras, pluspydantic
)uv pip install "mcp[cli]" "pydantic>=2.0.0"
Install the project package in editable mode:
pip install -e .
Initialize the database: (This script sets up the SQLite schema)
python setup_law_office.py
(Follow prompts to optionally add sample data)
Usage
Starting the Server Manually (for testing)
Ensure your virtual environment is active (source .venv/bin/activate
) and run:
python run_server.py --db-path ./database/law_office.db
Claude Desktop Integration (Recommended)
Find your
claude_desktop_config.json
file.- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%Claudeclaude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Add or modify the
mcpServers
entry for this server. Replace<absolute_path_to_repo>
with the full path to where you cloned the repository (e.g.,/Users/andrewsirulnik/claude_mcp_servers/mcp-law-office-db
).{ "mcpServers": { "law-office_db": { "command": "<absolute_path_to_repo>/.venv/bin/python3", "args": [ "<absolute_path_to_repo>/run_server.py", "--db-path", "<absolute_path_to_repo>/database/law_office.db" ], "cwd": "<absolute_path_to_repo>" } // Add other servers here if needed } // Other Claude Desktop settings... }
Save the configuration file.
Restart Claude Desktop. The server should now be available in the MCP integration menu.
Law Office SQLite MCP Server
Project Details
- asirulnik/mcp-law-office-db
- Last Updated: 4/21/2025
Recomended MCP Servers
Query model running with Ollama from within Claude Desktop or other MCP clients
ramp_mcp
appbuilder-sdk, 千帆AppBuilder-SDK帮助开发者灵活、快速的搭建AI原生应用
MCP server for Mixpanel Analytics integration with AI assistants. Enables Claude and other MCP clients to track events,...
gitlab mcp
Filesystem MCP server with SSE capabilities
MCP Server for handling Jira issues
Experimenting with MCP
An MCP server that integrates with the Freqtrade cryptocurrency trading bot.
BioMCP: Biomedical Model Context Protocol