Skip to main content
Glama

100% Local-First Software: Installed and run locally on your own machine, device, or private server — never a cloud SaaS. All data, vaults, and credentials remain on hardware you control (defaults to local_only; optional Bearer-authenticated Intranet/LAN hosting is opt-in).


One Legal (platform.onelegal.com) powers California, Nevada, and Federal court eFiling, eService, Courtesy Copy Delivery, Service of Process, and Sheriff Delivery—but exposes no public developer API or webhooks. Roshi's One Legal MCP bridges that gap cleanly, locally, and safely:

  • Encrypted Multi-Account Vault & Silent Auto-Login: Add one or more One Legal accounts via the localhost dashboard UI, CLI (roshi-one-legal-cli add-account), MCP (add_account), or interactive Chrome/Edge SSO/MFA login. Credentials and session cookies are encrypted locally with Windows DPAPI (on Windows) or PBKDF2-HMAC-SHA256 + owner-only 0600 keyfile (on macOS/Linux) under ~/.roshi-one-legal-mcp/—never stored in plaintext and never exposed to LLMs or logs.

  • Direct Fast JSON API + Serialized Order Wizard: Combines One Legal's live MVC JSON endpoints (MattersOrderStatus/GetSearchResults, Drafts/GetDraftListItems, CourtInfo/*, BillingCenter/*) and Matters/Downloads BFF (prod-s2-ol-platform-bff.onelegal.com/api/v1) with a per-account serialized Playwright wizard engine that safely handles One Legal's server-side ASP.NET Session state.

  • Draft-First Legal & Financial Guardrails: Every order tool defaults strictly to mode="dry_run" (validates local PDFs, SHA-256 hashes, 255-char clerk note limits, and policy caps). Use mode="save_draft" to stage complete orders inside One Legal's Drafts with zero fees charged; live submission requires mode="submit", dry_run=False, AND confirm_submit=True—and can be disabled completely via a CLI-locked draft_only_mode policy!

  • Court Clerk Rejection Monitoring & SHA-256 Conformed-Copy Vault: Incremental polling detects every Complete (conformed copy ready), Rejected by Court (capturing exact Message from the Court Clerk & Message from One Legal + RE-FILE status), Action Needed, Serve Failed, and eServe recipient open/view event—auto-downloading conformed copies, confirmation receipts, and invoices into ~/RoshiOneLegal/ indexed with SQLite FTS5.

  • Zero Vendor Lock-In & Roshi/TWiN Ecosystem Native: Works across Hermes, OpenClaw, goose, Cline, Continue, VS Code, Antigravity, Claude Code, OpenAI Codex, and custom scripts. Auto-registers with roshi-server-manager-mcp (https://roshi.servers.local) under https://roshi.onelegal.local, publishes docket alerts to roshi-agent-board-mcp (https://roshi.board.local), and announces urgent clerk notices via roshi-speech-mcp (https://roshi.speech.local).


Related MCP server: Jusratio Case File

Quick Start (All AI Hosts & Local Stacks)

1. Zero-Touch MCP Config (Hermes, OpenClaw, goose, Cline, Antigravity, Claude Code, Codex)

{
  "mcpServers": {
    "roshi-one-legal-mcp": {
      "command": "python",
      "args": ["C:/path/to/roshi-one-legal-mcp/bootstrap_mcp.py"]
    }
  }
}

2. Local Editable Install & Standalone CLI

# Windows PowerShell
.\setup.ps1
.\onelegal-tool.ps1 doctor
.\onelegal-tool.ps1 add-account --account default --email you@firm.com --verify
.\onelegal-tool.ps1 sync --download-docs
.\onelegal-tool.ps1 dashboard
# macOS / Linux
./setup.sh
roshi-one-legal-cli doctor
roshi-one-legal-cli add-account --account default --email you@firm.com --verify
roshi-one-legal-cli sync --download-docs
roshi-one-legal-cli dashboard

Method

Best For

Where Credentials Live

Local Dashboard UI (https://roshi.onelegal.local → Accounts & Policy)

Highest privacy — password never enters AI chat context

Encrypted at ~/.roshi-one-legal-mcp/accounts/<slug>/credentials.enc

CLI Prompt (roshi-one-legal-cli add-account --email you@firm.com)

Terminal/Hermes/automation users (getpass hidden input)

Encrypted via Windows DPAPI / 0600 local vault

MCP Tool (add_account / store_credentials)

Direct agent-assisted onboarding

Encrypted immediately; never returned in tool output

Interactive Browser (connect_account(mode="browser"))

SSO / MFA accounts without storing a password

Isolated persistent browser profile + encrypted cookies


MCP Tool Catalog (26 Tools)

Category

Tools

Accounts & Diagnostics

one_legal_doctor, list_accounts, add_account, store_credentials, connect_account, remove_account, set_default_account

Docket Monitoring & Vault

sync_docket, list_orders, get_order_details, search_docket, download_order_documents, export_docket

Cases, Matters & Billing

list_cases_and_matters, list_drafts, lookup_court_filing_rules, get_billing_summary

Court Filing & Service

create_filing_order, create_eservice_order, create_courtesy_copy_order, create_service_of_process_order, refile_rejected_order

Automation, Safety, Hosting & UI

manage_watch_rules, manage_policy, manage_hosting, manage_dashboard


Filing Safety & Privacy Policy (CLI-Lockable)

Lock down agent permissions directly from your terminal so no AI agent can weaken them:

# Allow AI agents to prepare & SAVE DRAFTS in One Legal, but block live paid submissions:
roshi-one-legal-cli policy draft-only-on
roshi-one-legal-cli policy set-cap --max-fee 250
roshi-one-legal-cli policy lock

All private state stays outside source repositories:

  • ~/.roshi-one-legal-mcp/ — encrypted credentials, session cookies, isolated browser profiles, watch rules, lockable policy

  • ~/RoshiOneLegal/ — SQLite FTS5 docket database (vault.db), SHA-256 conformed copies, receipts, invoices, audit screenshots

  • ~/OneLegalExports/ — Markdown, CSV, and JSON docket reports

Local-Only & Opt-In Intranet (LAN) Hosting

  • Defaults strictly to local_only (https://roshi.onelegal.local/).

  • Toggle Intranet (LAN) access from the dashboard's Hosting & Intranet (LAN) Access card (https://roshi.onelegal.local/), via manage_hosting(action="status"|"enable_intranet"|"disable_intranet"|"rotate_token"), GET/POST /api/v1/hosting, or the CLI:

roshi-one-legal-cli hosting status
roshi-one-legal-cli hosting enable-intranet
roshi-one-legal-cli hosting rotate-token
roshi-one-legal-cli hosting disable-intranet
  • Enabling Intranet auto-generates an rsh_... Bearer token at ~/.roshi-one-legal-mcp/hosting.json (0600 on POSIX), requires Bearer auth on all non-loopback requests, syncs exposure policy with https://roshi.servers.local/, and keeps raw token reveal strictly loopback-only.

License

MIT © 2026 RIAEvangelist (Roshi)

Available Tools

33 tools
add_accountA

Add a One Legal account with encrypted local credential storage (DPAPI / 0600 vault) and/or interactive browser login.

  • If email and password are provided (or mode='credentials'), credentials are encrypted immediately at rest under ~/.roshi-one-legal-mcp/accounts/<slug>/credentials.enc so the MCP can automatically log in and silently refresh expired One Legal ASP.NET sessions.

  • If no password is supplied (or mode='browser'), launches Chrome/Edge on idp.onelegal.com with an isolated persistent browser profile (ideal for SSO/MFA or keeping passwords out of chat).

  • You can also add accounts privately via the CLI (roshi-one-legal-cli add-account --email ...) or the local dashboard (https://roshi.onelegal.local) without typing passwords in chat.

Inputs: mode, email, account, headless, +3 more. Returns: object

connect_accountB

Authenticate a One Legal account via idp.onelegal.com and verify live portal access.

Modes:

  • credentials (default): Uses stored encrypted credentials (add_account / store_credentials or Antigravity Accounts tab) to sign in and automatically refresh short-lived One Legal sessions.

  • browser: Launches system Chrome/Edge to idp.onelegal.com with an isolated persistent profile for interactive SSO/MFA sign-in.

Inputs: mode, account, headless, set_as_default, +1 more. Returns: object

convert_court_pdfB

Convert any local court PDF into an auditable, page-linked Markdown derivative + provenance manifest.json.

Never writes inside the source PDF directory unless output_dir explicitly points there.

Inputs: pdf_path (required), output_dir (required), engine, overwrite, +5 more. Returns: object

create_courtesy_copy_orderC

Prepare, save as draft, or submit a Courtesy Copy Delivery (DeliveryType-CCD) or Other Court Delivery (DeliveryType-OCD) order.

Inputs: documents (required), mode, court, account, +13 more. Returns: object

create_eservice_orderC

Prepare, save as draft, or submit a standalone One Legal eService order with trackable open/download receipts.

Inputs: documents (required), recipients (required), mode, court, +7 more. Returns: object

create_filing_orderA

Prepare (dry_run), stage as a One Legal Draft (mode='save_draft', dry_run=False), or submit (mode='submit', dry_run=False, confirm_submit=True) a multi-document Court Filing order.

Supports eFiling, Physical Filing, Case Initiation, Subsequent Filing, structured multi-document filings=[...] (per-document document_type/filing_code, exact caption document_description, security, attachments), full No-Fee / Fee Waiver / Government Agency exemption handling (fee_mode: standard, waiver_existing, waiver_concurrent, no_fee_statutory, zero_fee_filing), automatic 255-char Clerk Message composition, CRC 2.250 confidentiality & separate-filing bundling guardrails, post-judgment 60-day fee waiver expiry alerts, bundled eService (assignment_type='efiling_eservice'), Process Serving (assignment_type='efiling_serve'), and inline Courtesy Copy Delivery (include_courtesy_copy=True).

Inputs: mode, court, state, account, +37 more. Returns: object

create_service_of_process_orderB

Prepare, save as draft, or submit a Service of Process (order_kind='process_serving') or Sheriff Delivery (order_kind='sheriff_delivery') order.

Inputs: documents (required), party_to_serve (required), service_address (required), mode, +12 more. Returns: object

decisions_search_documentsC

Run 100% local calibrated Decisions-style search (yes/no or custom choice rubric) across converted court filing Markdown pages.

Stage 1 retrieves candidate pages via SQLite FTS5 + docket filters. Stage 2 scores each page with a free, self-hosted open-weight local decision model discovered via Roshi Model Manager (https://roshi.models.local), Roshi Environment MCP (https://roshi.env.local), llama.cpp, vLLM Semantic Router, Ollama, or local thx01:

  • Open Jev-compatible local POST /v1/systemone (Karpo Decision 31B, Mammoth-1 27B, Elephant-1 9B, Cloudflare Clef 27B Apache 2.0 multimodal, vLLM-SR d3 family, Decider 4B, Winnow 12B, Nimble 9B, Tev1)

  • Single-pass local THX-01 (322M Apache 2.0 encoder, backend='thx01', ~10 ms/page)

  • Structured JSON local LLM (/v1/chat/completions or /api/chat)

  • Graceful zero-model FTS5 BM25 fallback when no local model is running yet.

Inputs: question (required), model, backend, base_url, +10 more. Returns: object

download_and_convert_docketB

Download One Legal PDFs (filed & returned) to ~/RoshiOneLegal/cases/ with SHA-256 and convert them locally into auditable, page-linked Markdown + FTS5 page index.

Preserves 1–28 California pleading-paper margin line numbers, detects interactive & flattened Judicial Council checkboxes inline ([X] / [ ]), extracts anti-aliased image court filing stamps (ELECTRONICALLY FILED), runs RapidOCR on scanned pages, and optionally uses a local VLM (glm-ocr, qwen3-vl, deepseek-ocr, olmocr2) via Roshi Model Manager (https://roshi.models.local) or Ollama (http://127.0.0.1:11434).

Inputs: engine, account, order_ids, overwrite, +11 more. Returns: object

download_order_documentsA

Download conformed copies, returned court documents, original uploaded files, ZIP archive, or invoice PDF with SHA-256 verification.

which: 'returned' (default — court-stamped conformed copies & proofs), 'your_files', 'all', or specify doc_id for one file.

Inputs: order_id (required), which, doc_id, account, +3 more. Returns: object

export_docketB

Export the local docket and clerk status log to Markdown, CSV, or JSON under ~/OneLegalExports/.

Inputs: fmt, status, output_dir, case_number. Returns: object

get_billing_summaryB

Retrieve One Legal Billing Center invoices, recent statements, payments, and strictly masked payment methods.

Inputs: page, account, page_size. Returns: object

get_order_detailsB

Get complete details for a One Legal order: Status, Court Transaction #, Message from Court Clerk, Message from One Legal, Returned Docs vs Your Files, eServe recipient open/view timeline, Related Bundled Orders, and Re-File eligibility.

Inputs: order_id (required), source, account, include_receipt. Returns: object

list_accountsA

List all configured One Legal accounts (safe metadata only — zero passwords or cookies).

Inputs: no named parameters. Returns: object

list_cases_and_mattersC

Browse One Legal Matters (BFF API), Case Portfolio, and optional matter-level billing summary & invoices.

Inputs: account, matter_id, page_size, page_number, +2 more. Returns: object

list_draftsC

List saved One Legal draft orders via GET /Drafts/GetDraftListItems.

Inputs: page, account, page_size, filter_text, +1 more. Returns: object

list_ordersB

List and filter One Legal orders from source='live' (portal JSON API) or source='vault' (offline local SQLite).

Inputs: limit, source, status, account, +7 more. Returns: object

lookup_court_filing_rulesB

Query live One Legal court catalogs, Fee vs. No-Fee document types / filing codes, locations, sheriff courts, optional services, party types, fee exemptions & service levels.

lookup options: court_catalog (unified summary, parity with Tyler Tech lookup_court_filing_rules), filing_codes / document_types (supports search=... & no_fee_only=True, falls back to synced vault-observed doc types when JTI wizard session is idle), jurisdictions, states, courts, order_courts, court_locations, location_codes, sheriff_states, sheriff_courts, case_categories, case_types, party_types, optional_services, fee_exemption_types, service_catalog, courtesy_copy_locations, courtesy_copy_service_levels, delivery_service_levels, order_types, order_statuses, firm_contacts, autocomplete_cases, autocomplete_contacts, customer_locations, vault_document_types.

Inputs: court, query, state, lookup, +9 more. Returns: object

manage_dashboardC

Start, stop, or inspect the local Court-Clerk Dashboard & REST/SSE API (https://roshi.onelegal.local).

Inputs: host, port, action. Returns: object

manage_heartbeatA

Inspect, pulse, or configure the One Legal session keep-alive heartbeat.

Keeps platform.onelegal.com & idp.onelegal.com cookies warm via lightweight HTTP pings (~0 MB idle RAM) only while actively used by default (only_when_active=True, auto-pausing with zero outbound pings after idle_timeout_seconds of inactivity — default 1800s / 30m). Attempts a silent OIDC bounce before headless Playwright DPAPI re-login. Supports modes: 'http_with_playwright_fallback', 'playwright_persistent', or 'off'.

Args: action: One of 'status', 'pulse', 'start', 'stop', or 'configure'. mode: Optional heartbeat mode when action='configure'. interval_seconds: Pulse interval (60–7200s, default 720s / 12m). allow_auto_relogin: Allow automatic headless Playwright DPAPI re-login if IdP cookie expires. only_when_active: When True (default), pause outbound pings automatically while idle. idle_timeout_seconds: Inactivity window before pausing (120–14400s, default 1800s / 30m). account: Optional account alias when action='pulse'.

Inputs: mode, action, account, interval_seconds, +3 more. Returns: object

manage_hostingA

Inspect or toggle Local-Only vs Intranet (LAN) hosting for Roshi's One Legal MCP (https://roshi.onelegal.local/).

Defaults strictly to local_only. Enabling intranet auto-generates a Bearer token and syncs exposure policy to Roshi's Server Manager (https://roshi.servers.local/). Never returns raw tokens.

Args: action: One of 'status', 'enable_intranet', 'disable_intranet', or 'rotate_token'. require_auth: Require Bearer token authentication on non-loopback requests (default True).

Inputs: action, require_auth. Returns: object

manage_policyC

Inspect (get) or update (update) local One Legal filing safety & sealed-case policy (respects CLI lock).

Inputs: action, draft_only_mode, add_ignored_case, max_order_fee_usd, +2 more. Returns: object

manage_watch_rulesC

Manage One Legal docket monitoring rules (list, add, toggle, delete, events, run_once).

Inputs: name, action, account, enabled, +10 more. Returns: object

open_account_setupB

Launch the standalone Keisaku-style One Legal Account Access Setup desktop window on the user's real desktop.

Inputs: force, reason, account. Returns: object

open_dashboardA

Ensure the Court-Clerk Dashboard daemon is running and open it as a native desktop app window (https://roshi.onelegal.local/).

Prefers an already-installed local PWA / Roshi Local Desktop App shortcut first; otherwise opens Edge/Chrome/Brave in chromeless --app= mode (1120x840 centered).

Inputs: prefer_installed_app. Returns: object

refile_rejected_orderC

Prepare, draft, or execute One Legal's RE-FILE workflow on a Rejected by Court order with full fee waiver, CRC 2.250 & clerk-note guardrails.

Inputs: order_id (required), mode, account, dry_run, +11 more. Returns: object

remove_accountB

Remove a configured One Legal account and wipe its encrypted credentials, session cookies, and browser profile.

Inputs: account (required), confirm_delete. Returns: object

search_docketB

Full-text SQLite FTS5 search across all synced cases, orders, court clerk rejection messages, parties served, and document titles.

Inputs: query (required), limit. Returns: object

set_default_accountA

Switch the default One Legal account alias used by all tools when account is omitted.

Inputs: account (required). Returns: object

store_credentialsB

Encrypt and store One Legal login credentials locally (DPAPI on Windows / owner-only 0600 encrypted vault on POSIX).

SECURITY: Password is encrypted immediately and never returned in output or logs. Set verify_login=True to immediately perform OIDC login via idp.onelegal.com and cache session cookies.

Inputs: email (required), password (required), account, headless, +1 more. Returns: object

sync_docketB

Sync One Legal orders, matters, court clerk messages, and eServe timelines into ~/RoshiOneLegal/, evaluating watch rules and optionally auto-downloading conformed copies.

Inputs: limit, account, sync_matters, download_invoices, +2 more. Returns: object

verify_markdown_vaultC

Perform read-only direct-PDF verification of every converted Markdown document, SHA-256 hash, manifest, and rendered page PNG in ~/RoshiOneLegal/.

Inputs: limit, case_number. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 33 tools

    Disambiguation3/5

    Most tools target distinct resources, but several clusters overlap: add_account vs store_credentials vs connect_account vs open_account_setup all concern account setup/auth, and manage_dashboard vs open_dashboard both manage the local dashboard. The create_*_order tools also blur with create_filing_order, which itself supports bundled eService and service of process, but the lengthy descriptions do provide enough guidance to choose correctly.

    Naming Consistency4/5

    The surface is predominantly consistent verb_noun snake_case (list_orders, create_filing_order, manage_policy, verify_markdown_vault). A few outliers like decisions_search_documents and one_legal_doctor break the pattern, but they remain readable and do not create systematic confusion.

    Tool Count2/5

    At 33 tools the surface is heavy for a single MCP server, and the account/session cluster alone contains eight tools that could likely be consolidated. The breadth reflects a complex legal-filing domain, but the count exceeds a manageable set and increases selection overhead.

    Completeness4/5

    Coverage is broad: account/auth lifecycle, billing, docket sync/list/search/export, order details and downloads, multiple filing creation flows, refile, court-rule lookup, watch rules, policy/hosting, and document conversion/verification. Minor gaps exist around editing or deleting saved drafts and cancelling/updating submitted orders, but core workflows are well covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables US case law search, citation parsing, practice management via Clio, and federal court filings through PACER.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local-first MCP server that connects to legal case-management systems like ActaPort, letting AI agents read and prepare work for lawyer approval by replaying saved browser sessions.
      AGPL 3.0
    • A
      license
      C
      quality
      B
      maintenance
      Exposes 55 forensic tools over the Model Context Protocol so agents can query Chilean statutes, jurisprudence, administrative dicta and doctrine from official state sources such as BCN, PJUD, CGR and DT, while running locally for confidential casework. It also supports citation-validated drafting, deadline and docket monitoring, judgment deconstruction, OCR dossier compilation and legal knowledge-graph analysis for civil-law practice, teaching and research.
      114
      218 PyPI
      8
      Apache 2.0