Skip to main content
Glama
lawmatics-mcp

lawmatics-mcp

by oktopeak

Lawmatics MCP Server

Connect Claude to your Lawmatics legal CRM. Ask Claude to pull pipeline reports Lawmatics can't build natively, look up matters and contacts, check intake form submissions, create follow-up tasks — all without leaving your conversation.

Built by Oktopeak — AI transformation & automation for law firms

Digital transformation for legal and healthcare businesses. We build AI integrations, workflow automation, and custom software your firm owns outright — including this connector. → Book a 30-min call

TIP

Not a developer? You don't need to be.

The README below assumes someone comfortable editing a JSON config file. If that's not you or your team, we deploy this for law firms — scoped credentials, read-only mode if you want it, audit log wired in, one custom workflow, training.

→ Whole firm? The Firm Plan: $300 a month. Set up in your own cloud, every attorney signs in with their own login, one audit log, one automation built for you each month, no setup fee, cancel any time. → oktopeak.com/firm-plan/, or book a 30-min call

Jump to: What it does · Installation · Getting API access · Available tools · Read-only mode · Security · Known API limitations · Other connectors · Need it deployed for you?


What it does

Once connected, Claude can talk directly to your Lawmatics firm data. You can ask things like:

  • "How many open PNCs do we have per practice area?"

  • "Which marketing source brought in the matters we actually hired this quarter?"

  • "Show me every matter sitting in the 'Consult Completed' stage with no task attached"

  • "Export all personal injury leads from July with their custom intake fields"

  • "What did the Smith intake form submissions say this week?"

  • "Create a follow-up task for the Jones matter, due Friday, assigned to Sarah"

Lawmatics' built-in reporting is a common complaint among firms. With this connector, Claude becomes the reporting layer: it pulls raw records (including custom fields) and does the aggregation, cross-tabbing, and formatting itself.

Related MCP server: clio-mcp

Project status

This server is built strictly against the official Lawmatics API documentation (v1.22) and its published example payloads, with 80+ unit tests locking in the documented request/response contract. It has not yet been run against a live firm account — if you hit a mismatch with the real API, open an issue with the tool name and the error text. That's the point of it being open source: real-world reports make it solid for everyone.


Prerequisites: getting Lawmatics API access

  • Node.js 18+

  • A Lawmatics account with admin access

  • Developer Settings enabled on your account. Lawmatics gates API access behind a support request: contact Lawmatics support or email api@lawmatics.com and ask them to enable Developer Settings. It's free; it's just not on by default.

  • A developer app: once Developer Settings is on, go to Settings → Developers in Lawmatics, create an app, and set the Callback URL to http://localhost:5678/callback. You'll get a Client ID and Client Secret.

Get your access token (one time)

Lawmatics access tokens never expire, so you do this exactly once:

LAWMATICS_CLIENT_ID=your_client_id LAWMATICS_CLIENT_SECRET=your_client_secret npx -y @oktopeak/lawmatics-mcp auth

Open the printed URL, approve access, and the command prints your token plus a ready-to-paste config snippet. Store the token like a password — anyone holding it has full access to your firm's Lawmatics data until you delete the developer app.

Installation

Add this to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "lawmatics": {
      "command": "npx",
      "args": ["-y", "@oktopeak/lawmatics-mcp"],
      "env": {
        "LAWMATICS_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}

Restart Claude Desktop. Ask "Who am I logged in as in Lawmatics?" to verify the connection (it calls get-current-user).

With Claude Code

claude mcp add lawmatics -e LAWMATICS_ACCESS_TOKEN=your_token_here -- npx -y @oktopeak/lawmatics-mcp

Available tools

37 tools. Matters are what Lawmatics calls "prospects" internally — every lead and case, whether PNC, hired, or lost.

Group

Tools

Matters

list-matters, get-matter, find-matter (by email/phone/name), create-matter, update-matter

Contacts

list-contacts, get-contact, find-contact, create-contact, update-contact

Companies

list-companies, get-company, find-company

Pipeline & firm data

list-pipelines, list-stages, list-practice-areas, list-sources, list-sub-statuses, list-users, get-current-user

Tasks

list-tasks, create-task, update-task

Events

list-events, create-event

Notes & timeline

list-notes, create-note, list-activities

Tags

list-tags, attach-tags, detach-tags

Custom fields

list-custom-fields (+ experimental set-matter-custom-fields, see below)

Intake forms

list-forms, get-form, get-form-entries, submit-form

Billing

list-invoices (read-only in the Lawmatics API)

Every list tool supports the full Lawmatics query surface: one filter (filter_by / filter_on / filter_with with =, !=, <, >, like, ilike, null, not_null), sorting, field selection (fields, including custom_fields), and pagination — plus a fetch_all option that follows pagination up to 1,000 records and always tells you if the result was truncated.

Custom fields

Lawmatics firms live in custom fields. To read them, add custom_fields to the fields parameter of any get/list tool. list-custom-fields shows every field definition including picklist options, so Claude can interpret raw values.

Writing custom field values is only loosely documented by Lawmatics, so set-matter-custom-fields ships behind a flag until someone with a live account confirms the request shape (set LAWMATICS_EXPERIMENTAL_TOOLS=1 to enable it — and please report whether it works).

Read-only mode

Set LAWMATICS_READ_ONLY=1 in the server's env config and every write tool (create/update/tag/submit) is removed entirely — not just blocked, they don't exist as far as Claude is concerned. Recommended for a first rollout, for reporting-only use, and for cautious partners.

Configuration reference

Env var

Purpose

LAWMATICS_ACCESS_TOKEN

Required. Your OAuth access token (never expires).

LAWMATICS_READ_ONLY

1 = disable all write tools.

LAWMATICS_EXPERIMENTAL_TOOLS

1 = enable tools whose API shape Lawmatics hasn't fully documented.

LAWMATICS_RATE_LIMIT_PER_MIN

Client-side throttle. Default 50 (Lawmatics documents both 50/min and 150/min; we default to the safe one).

LAWMATICS_AUDIT_LOG

0 = disable the local audit log.

LAWMATICS_AUDIT_LOG_PATH

Audit log location (default ~/.lawmatics-mcp/audit.log).

LAWMATICS_CLIENT_ID / LAWMATICS_CLIENT_SECRET

Only for the one-time auth command.

LAWMATICS_REDIRECT_PORT

OAuth callback port (default 5678).

LAWMATICS_API_BASE

API base override (default https://api.lawmatics.com/v1).

Security

  • Your token stays on your machine. It lives in your MCP config file and is sent only to api.lawmatics.com. This server has no backend, no telemetry, and phones home to no one.

  • Audit log. Every tool call (name, arguments, outcome) is appended to a local JSONL file at ~/.lawmatics-mcp/audit.log, so a firm admin can always answer "what did the AI touch." Note that tool arguments can include client data (names, emails, note text) — the log lives only on your machine, but include it in your firm's data retention policy, or disable it with LAWMATICS_AUDIT_LOG=0.

  • Least privilege caveat. The Lawmatics API has no scopes: any token has full CRUD access. Read-only mode is enforced by this server, not by Lawmatics — pair it with the audit log, and delete the developer app to revoke access entirely.

  • Data flow. Records Claude requests flow from Lawmatics through this local process into your MCP client and its model context. Review your AI provider's data handling terms the same way you would for any vendor touching client data.

Known Lawmatics API limitations

Things this connector cannot do because the underlying API doesn't support them (as of API v1.22):

  • No pipeline stage moves. The API exposes stages read-only; sub_status_id on update-matter is the closest control.

  • One filter per request. Complex queries need fetch_all + letting Claude filter the result.

  • Page size is fixed at 25. Large exports take one request per 25 records (the built-in throttle respects the rate limit).

  • Invoices, pipelines, sources, campaigns are read-only.

  • No e-signature, document templates, email sending, or automation management via API.

  • Webhooks are configured in the Lawmatics dashboard only (no API management).

Roadmap

File upload/download, time entries and expenses, relationships, task subtasks/comments, and Collections (Lawmatics' custom data tables) — in rough order of demand. Open an issue if you need one sooner.

Other connectors by Oktopeak

Each connector has its own overview page on oktopeak.com with setup notes and FAQ:

Same architecture, same audit logging. All MIT licensed.

Need more than the connector?

The connector is free and stays free. Firms hire us for what's around it: deployment on every attorney's machine, scoped credentials, custom workflows ("every morning, list yesterday's new leads by source with intake answers"), integrations Lawmatics doesn't have, and the production software layer when you outgrow Zapier.

→ Whole firm? The Firm Plan: $300 a month. Set up in your own cloud, every attorney signs in with their own login, one audit log, one automation built for you each month, no setup fee, cancel any time. → oktopeak.com/firm-plan/ · Book a 30-min call

Want a polished overview of this connector with FAQ? → oktopeak.com/lawmatics-mcp/

Supporting this project

This connector is free, MIT licensed, and maintained by Oktopeak. It always will be; we don't take donations. If it saved you time, the things that actually help:

  • Star this repo. It is genuinely how other firms find it.

  • Tell another firm running Lawmatics.

  • Leave a review if we helped you directly.

  • Need it deployed, extended, or maintained for your firm? Commercial support; that is what funds the free work.

Development

npm install
npm test          # 80+ unit tests against the documented API contract
npm run build
npm run inspect   # MCP Inspector against the built server

Contributions welcome — especially reports from live Lawmatics accounts.

License

MIT © Oktopeak

Available Tools

37 tools
attach-tagsA

Attach tags to a matter, contact, company, or task. Tags that don't exist yet are created.

Inputs: tags (required), target_id (required), target_type (required).

create-contactA

Create a new contact (person) without a matter. To create a lead with a case, use create-matter.

Inputs: last_name (required), first_name (required), email, notes, +1 more.

create-eventA

Create an event (appointment), optionally attached to a matter or contact and with user hosts. Set send_invites: false to avoid emailing attendees.

Inputs: name (required), end_date (required), start_date (required), all_day, +10 more.

create-matterA

Create a new matter (lead). By default this also creates a contact from first/last name. Pass contact_id to attach an existing contact, or match_contact_by to reuse a contact matched on email/name/phone (falls back to creating one). Pass company_id or company_name for a company matter. Tags that don't exist yet are created automatically.

Inputs: last_name (required), first_name (required), tags, email, +10 more.

create-noteA

Create a note on a matter, contact, or company.

Inputs: body (required), name (required), notable_id (required), notable_type (required).

create-taskA

Create a task, optionally attached to a matter/contact/company and assigned to users.

Inputs: name (required), done, due_date, priority, +5 more.

detach-tagsB

Detach tags from a matter, contact, company, or task.

Inputs: tags (required), target_id (required), target_type (required).

find-companyA

Find a single company by exact email, phone, or name. Returns the best match or not_found.

Inputs: by (required), value (required).

find-contactA

Find a single contact by exact email, phone, or name. Returns the best match or not_found. For fuzzy searches use list-contacts with filter_with: 'ilike' and % wildcards.

Inputs: by (required), value (required).

find-matterA

Find a single matter by exact email, phone, or name. Returns the best match or not_found. For fuzzy or multi-result searches use list-matters with filter_with: 'ilike' and % wildcards.

Inputs: by (required), value (required).

get-companyA

Get full details for a single company by ID.

Inputs: company_id (required), fields.

get-contactA

Get full details for a single contact by ID, including custom fields.

Inputs: contact_id (required), fields.

get-current-userA

Get the user the access token belongs to. Also the cheapest way to verify the connection works.

Inputs: no named parameters.

get-formA

Get one custom form including its field layout (field IDs, labels, types, required flags).

Inputs: form_uuid (required).

get-form-entriesA

List submissions for a custom form, each with label/value pairs and the matter it created.

Inputs: form_uuid (required), page, fetch_all.

get-matterA

Get full details for a single matter by ID, including custom fields and related records (contact, stage, practice area, tasks, notes, events, invoices as {id, type} references).

Inputs: matter_id (required), fields.

list-activitiesA

List timeline activities (audit trail of everything that happened: notes, emails, stage moves...). The Lawmatics API REQUIRES a filter here — pass filter_by ('matter_id' or 'contact_id') and filter_on.

Inputs: filter_by (required), filter_on (required), page, fetch_all.

list-companiesB

List companies with optional filter, sort, and pagination.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-contactsA

List contacts (people) with optional filter, sort, and pagination. A contact is the person; the matter (prospect) is the case/lead attached to them.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-custom-fieldsA

List the firm's custom field definitions (id, name, field_type, owner type, list options). Read a record's custom field VALUES by adding 'custom_fields' to the fields parameter of get-matter / get-contact / list-matters.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-eventsA

List events (appointments) with optional filter, sort, and pagination. For a date range, filter_by: 'start_date' with filter_with: '>=' (one filter per request; sort by start_date and paginate for windows).

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-formsA

List the firm's custom forms (intake forms). Form IDs are UUIDs. Use get-form to see a form's field structure.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-invoicesA

List invoices (read-only in the Lawmatics API). Amounts are integer cents. Useful filters: status, due_at, matter_id. Fields include amount_cents, amount_paid_cents, outstanding_amount_cents, due_at, pdf_url.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-mattersA

List matters (leads/prospects/clients) with optional filter, sort, and pagination. Matter status is 'pnc' (potential new client), 'hired', or 'lost'. Useful filters: status, practice_area_id, stage_id, source_id, sub_status_id, created_at, estimated_value_cents, actual_value_cents. For pipeline reporting, combine filter_by with fields and fetch_all, then aggregate the result.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-notesA

List notes with optional filter, sort, and pagination. To get one matter's notes, use filter_by: 'matter_id' with the matter ID as filter_on.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-pipelinesA

List the firm's pipelines with matter counts, estimated value, and stage references. Use with list-stages to build a full pipeline board view.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-practice-areasB

List the firm's practice areas (id, name, color).

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-sourcesA

List marketing sources (where leads come from: Google, referrals, etc.). For source ROI reporting, use list-matters with filter_by: 'source_id'.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-stagesA

List all pipeline stages. Each stage references its pipeline. To count matters per stage, use list-matters with filter_by: 'stage_id'.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-sub-statusesA

List matter sub-statuses. Each belongs to a top-level status: pnc (potential new client), hired, or lost. Use the IDs with create-matter / update-matter.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-tagsC

List the firm's tags.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-tasksA

List tasks with optional filter, sort, and pagination. Useful filters: done (true/false), due_date (with <, >= operators), priority, matter_id, contact_id.

Inputs: page, fields, sort_by, fetch_all, +4 more.

list-usersA

List the firm's Lawmatics users (staff). Use the IDs for task/event assignment.

Inputs: page, fields, sort_by, fetch_all, +4 more.

submit-formA

Submit an entry to a custom form — creates a matter/contact and fires the form's automations, exactly like a website submission. Standard keys: first_name, last_name, email, phone. Custom fields use the key form 'custom_field_' (IDs from get-form or list-custom-fields). utm_source/utm_campaign/utm_medium/utm_term are also accepted.

Inputs: data (required), form_uuid (required).

update-contactC

Update a contact. Only the provided fields change.

Inputs: contact_id (required), email, phone, last_name, +1 more.

update-matterA

Update a matter. Only the provided fields change. Note: the public API has no documented way to move a matter between pipeline stages — sub_status_id is the closest control.

Inputs: matter_id (required), tags, email, notes, +8 more.

update-taskB

Update a task — e.g. mark it done, change the due date, or reassign it.

Inputs: task_id (required), done, name, due_date, +3 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 37 tools

    Disambiguation5/5

    Each tool targets a distinct entity or action, and overlapping categories like find-* vs get-* vs list-* are clearly separated by unique ID, exact match, or filtered listing. No tools appear to do the same thing.

    Naming Consistency5/5

    All tool names follow a predictable verb_noun pattern with consistent separators and verbs (get, list, create, update, find, attach, detach, submit). The naming is uniform and easy to infer.

    Tool Count2/5

    With 37 tools, this server is well over the 25-tool threshold for a heavy surface. While the domain is broad, many reference-data list tools could be consolidated, and the count will overwhelm agents.

    Completeness3/5

    Core workflows for matters, contacts, tasks, and forms are covered, but there are notable gaps: no delete for any entity, no create/update for companies, no update/delete for events/notes, and no true pipeline stage movement. These are workable limitations but leave lifecycle coverage incomplete.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      Enables Claude to access and manage your law firm's MyCase account, including cases, clients, tasks, invoices, and more.
      100
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects Claude to Clio practice management, enabling AI-assisted access to matters, contacts, documents, tasks, and billing with audit logging and encryption for law firm compliance.
      356 npm
      28
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      Connects Claude to your JobNimbus account via API, enabling management of contacts, jobs, notes, and other CRM entities through natural language.
      19
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects Claude to the WhatConverts API, enabling management of leads, accounts, profiles, tracking numbers, and recordings through natural language.
      1
      MIT