All posts

Agents 3 min read By Marlow

Connect any agent to a lawyer

Marlow speaks MCP, so a chat app, a coding agent or your own application can reach a qualified lawyer. One address or one command, and seven tools.

In short

Add Marlow to the agent as an MCP server. Chat apps and hosted agents use the hosted connector at mcp.api.lawyer/mcp, and agents on your own machine can run the server from npm. Either way the agent gets the same seven tools, and the reserved act still goes to a qualified lawyer.

When an agent reaches a legal question, it either guesses or tells the user to find a lawyer. With Marlow added as a Model Context Protocol (MCP) server, it can check what the law reserves, move a matter forward and hand the reserved part to a qualified lawyer, without leaving the conversation.

Two ways in

The hosted connector is an address. Chat apps and hosted agents add it in their connector settings, and nothing is installed:

text
https://mcp.api.lawyer/mcp

The local server runs on your machine from npm, with Node 18 or later. Desktop apps, editors and coding agents start it with one command:

bash
npx -y api.lawyer mcp serve

Both serve the same tools under the same names. The setup guide has the exact steps for each client. In a config file, the local entry looks like this:

json
{  "mcpServers": {    "api-lawyer": {      "command": "npx",      "args": [        "-y",        "api.lawyer",        "mcp",        "serve"      ]    }  }}

Name the server api-lawyer, with a hyphen. Some clients reject a dot in a server name.

The tools

  • get_rules: what the law reserves for a matter type in the client’s state.
  • advance_matter: one turn on a matter. Open stages commit; a reserved act comes back as an escalation.
  • get_matter and list_matters: where a matter stands, with its journal.

The other three are healthz, get and file_provisional. The MCP reference lists every argument.

A typical run: the agent calls get_rules and learns that advice on a contract’s risks is reserved to a lawyer admitted in the client’s state. It calls advance_matter until the matter answers waiting_on_signer. Later, get_matter shows what the lawyer decided.

What stays with people

The connector carries the agent’s side of the work and stops where a person has to act.

  • The client’s own steps. Consent, payment and identity happen on a page Marlow hosts. The client opens the link and acts as themselves. A yes typed into a chat is not consent.
  • The reserved act. A lawyer claims the work and, under their own license, attests, sends it back or declines. No tool can attest, and a decline is final.

A lawyer can take days, so no call waits on one. advance_matter answers at once, and the agent checks back with get_matter, in the same chat or a new one.

To see the whole loop before a real matter, run it in the sandbox. Legal work, made executable explains what happens between the request and the decision.

Questions

Which AI apps can connect to Marlow?

Any client that speaks MCP. Chat apps and hosted agents add the hosted connector by its address. Desktop apps, editors and coding agents can also run the local server from npm. The setup guide on api.lawyer covers the common clients step by step.

Is the hosted connector different from the npm server?

No. Both serve the same seven tools under the same names. The hosted connector needs nothing installed; the local server runs on your machine and needs Node 18 or later.

No. Attesting is the lawyer’s act, under their own license. Consent, payment and identity are the client’s acts, on a page Marlow hosts. No tool performs any of them.

What does the agent see while a lawyer works?

The status waiting_on_signer, which advance_matter returns at once. get_matter shows the status and the journal at any time, including the lawyer’s decision once it is made.

See your firm in Marlow.

Answer five short questions and open a working console, filled with sample matters.