Agents / MCP
Private beta. Access is enabled per firm, on request. Use the chat function in LeanLaw or email
[email protected]. This page is for firms in the beta and is subject to change without notice.
LeanLaw has an MCP server at https://api.leanlaw.io/mcp. Connect an AI assistant to it and it can work with
your firm's clients, matters, time entries, expenses, fixed fees and invoices on your behalf.
The server exposes the same operations as the REST API, plus some higher-level ones that combine several API calls into a single action. Connect and the client will list what is available.
An agent can also use the REST API directly, without MCP — see OpenAPI.
Step 1 — Ask us to enable your firm
A firm administrator emails [email protected] with:
- Which firm — your LeanLaw account name.
- Which assistant — Claude, or Copilot.
- What it may access — optional. By default your people can grant any of the permissions below; tell us if you want to cap it, for example read-only.
We enable it and confirm. Nothing is connected at that point and no data has moved — enabling only means the people at your firm are now allowed to connect for themselves.
Self-service settings for this are coming; until then there is no screen and it has to come through us.
Step 2 — Each person connects their own assistant
Once your firm is enabled, anyone at the firm connects for themselves. They sign in to LeanLaw, see exactly what is being requested, and approve it. Their connection carries their own access — an assistant cannot see anything the person could not see by signing in.
Claude Desktop, Claude Cowork, and claude.ai
-
Open Settings → Connectors.
-
Choose Add custom connector.
-
Name it
LeanLawand enter the URL:Code -
Click Add, then Connect on the new connector.
-
A LeanLaw sign-in page opens. Sign in, review the permissions, and approve.
The connector shows as connected and LeanLaw's tools become available in your conversations.
Claude Code
Code
Then run /mcp and choose Authenticate. A browser opens for sign-in and approval.
Microsoft Copilot
Add https://api.leanlaw.io/mcp as a connector and sign in when prompted. Copilot's setup differs by
product and tenant policy; contact us if you do not see the option.
Use the URL exactly as written. A trailing slash is a different address and the connection will fail.
What an assistant can do
Each person chooses what to allow when they connect. Permissions are per kind of data, and reading is separate from changing:
| Data | Can read | Can change |
|---|---|---|
| Clients | Yes | Yes |
| Matters | Yes | Yes |
| Time entries | Yes | Yes |
| Expenses | Yes | Yes |
| Fixed fees | Yes | Yes |
| Invoices | Yes | — |
| Account balances | Yes | — |
| Billing codes | Yes | — |
Trust accounts and settlements are not reachable through the API or the MCP server, so no assistant can read or change them.
Permission to change data is permission to change it at all, not permission to change anything without asking. A well-behaved assistant will tell you what it is about to do and wait for you to say yes.
Ending a connection
Anyone at the firm can disconnect their own assistant from within it — remove the connector in Claude, or run
claude mcp remove leanlaw.
To end connections centrally, or to turn off agent access for the whole firm, email [email protected]. It
takes effect within seconds, including for assistants that are currently connected.
If something does not work
| What you see | What it means |
|---|---|
| "Your firm hasn't approved this agent yet" | Step 1 has not been done for your firm. An administrator should get in touch |
| Sign-in page never appears, or the client reports it cannot reach the server | Check the URL, including the trailing slash |
| The assistant says it lacks permission for something | That permission was not approved when you connected. Disconnect and reconnect to choose again |
| It worked yesterday and now asks you to reconnect | The connection was ended, or expired. Reconnect from the client |
Building your own integration
If you are building an app rather than connecting an assistant, get in touch at [email protected]. We will
register it and walk you through the OAuth setup — it uses the authorization code flow with PKCE, and one
connection covers both the MCP server and the REST API.
For server-to-server integrations with no individual user behind them, an API key is usually the better fit — see Authentication.