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.
We turn on agent access for your account and confirm. Nothing is connected at that point and no data has moved — it only puts the AI Agent Access page in your settings so an administrator can take it from there.
Step 2 — Enable the agent in settings
A firm administrator opens Settings → AI Agent Access, finds Claude in the list, and clicks Enable.
Enabling asks which permissions the agent may have — see What an assistant can do for what each one covers. What you pick here is the ceiling for the whole firm: nobody can grant their assistant more than this, though each person can grant less when they connect. For a read-only firm, leave every change permission off.
You can come back to this page at any time to change the permissions or to disable the agent. Changes take effect within seconds, including for assistants that are already connected.
Step 3 — 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
Your administrator sets the firm's ceiling in Step 2, and each person chooses what to allow within it 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, an administrator opens Settings → AI Agent Access and disables the agent. 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" | The agent is not enabled for your firm. An administrator should check Settings → AI Agent Access, or get in touch if that page is not there |
| 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, or your firm does not allow it. Disconnect and reconnect to choose again; if it is still refused, an administrator should check Settings → AI Agent Access |
| 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.