mcp law office db
A Model Context Protocol server for law office database management that enables tracking clients, cases, billable time, and invoices.
A Model Context Protocol server for law office database management that enables tracking clients, cases, billable time, and invoices.
A Model Context Protocol (MCP) server implementation for law office database management, specializing in client records, case filing, time tracking, and invoice management.
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
execute_script
toolrecord_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 submissionpython3.11 --version
(or similar). If needed, install using your system's package manager (e.g., brew install [email protected]
on macOS).curl -LsSf https://astral.sh/uv/install.sh | sh
).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 installs mcp
and its extras, plus pydantic
)
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)
Ensure your virtual environment is active (source .venv/bin/activate
) and run:
```bash
python run_server.py --db-path ./database/law_office.db
````
Find your claude_desktop_config.json
file.
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
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
).
json
{
"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.