AGENTS
Connect your agent.
Your agent reaches api.lawyer over MCP in one of two ways: the hosted connector, an address your client adds, or the stdio server, which runs on your machine from the npm package. Both serve the same tools under the same names.
Hosted or local
Pick by where your agent runs. Chat apps and hosted agents connect by address. An agent on your own machine, in a desktop app or an editor, can run the server locally instead.
Hosted connector
https://mcp.api.lawyer/mcpA remote MCP server over Streamable HTTP. Nothing to install: the client adds the address.
Local server
npx -y api.lawyer mcp serveThe stdio server in the npm package api.lawyer. It needs Node 18 or later.
The tools, on both: healthz, get, list_matters, get_matter, advance_matter, file_provisional, get_rules.
Claude
On claude.ai and in Claude Desktop, add the hosted connector as a custom connector.
- Open Customize, then Connectors.
- Click Add custom connector.
- Enter
https://mcp.api.lawyer/mcpas the server URL, then click Add. - In a chat, turn it on from the + button, under Connectors.
On a Team or Enterprise plan, an Owner adds the connector once, under Organization settings, then Connectors (Add, then Custom), and each member clicks Connect on it under Customize, then Connectors. The Free plan holds one custom connector.
Or run it locally in Claude Desktop
Claude Desktop also runs the stdio server. From the Claude menu in your system menu bar, open Settings, then Developer, and click Edit Config. Add the server to claude_desktop_config.json, save, then quit Claude Desktop completely and open it again.
{ "mcpServers": { "api-lawyer": { "command": "npx", "args": ["-y", "api.lawyer", "mcp", "serve"] } }}
| System | File |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Claude Code
Add the hosted connector or the local server from your terminal.
$ claude mcp add --transport http api-lawyer https://mcp.api.lawyer/mcp
$ claude mcp add --transport stdio api-lawyer -- npx -y api.lawyer mcp serve
Either command adds the server for you, in the current project. Add --scope user for every project, or --scope project to share it through .mcp.json. Run /mcp inside Claude Code to see the server and its tools.
ChatGPT and other MCP clients
Every MCP client takes one of two things: the hosted address, or the command that starts the local server.
ChatGPT connects by address. On its Plugins page, choose the + button, then Add custom MCP server, and enter https://mcp.api.lawyer/mcp under Connection. Your plan and workspace settings decide whether the option is there.
Cursor and most other clients read an mcpServers file. In Cursor it is .cursor/mcp.json in a project, or ~/.cursor/mcp.json for every project. Use the hosted entry or the local one.
{ "mcpServers": { "api-lawyer": { "url": "https://mcp.api.lawyer/mcp" } }}
{ "mcpServers": { "api-lawyer": { "command": "npx", "args": ["-y", "api.lawyer", "mcp", "serve"] } }}
VS Code names the key servers and gives each entry a type. Put it in .vscode/mcp.json for a workspace, or run MCP: Open User Configuration for all of them.
{ "servers": { "api-lawyer": { "type": "http", "url": "https://mcp.api.lawyer/mcp" } }}
{ "servers": { "api-lawyer": { "type": "stdio", "command": "npx", "args": ["-y", "api.lawyer", "mcp", "serve"] } }}
The Claude API
The Messages API connects to the hosted connector itself. Name it in mcp_servers, turn its tools on with an mcp_toolset entry in tools, and send the MCP connector’s beta header. The connector calls tools only, and it reaches servers over HTTP, so this path uses the hosted address, not the stdio server.
$ curl https://api.anthropic.com/v1/messages \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: mcp-client-2025-11-20" \ -d '{ "model": "claude-opus-5-5", "max_tokens": 1024, "messages": [ { "role": "user", "content": "What does the law reserve for a contract review in CA?" } ], "mcp_servers": [ { "type": "url", "url": "https://mcp.api.lawyer/mcp", "name": "api-lawyer" } ], "tools": [ { "type": "mcp_toolset", "mcp_server_name": "api-lawyer" } ] }'
The newer beta header mcp-client-2026-09-15 carries everything in mcp-client-2025-11-20 and adds pinning of a server’s tool list.
What stays with people
The hosted connector carries the agent’s side of the work, and stops where a person has to act.
- 01The Client’s own steps happen on a Marlow page.
Consent to the engagement, payment and identity are the Client’s acts. The tool result carries a link to a page Marlow hosts; the Client opens it, signs in as themselves and acts there, never in the chat. An agent cannot consent, pay or verify identity for the Client, and a yes typed in the chat is not consent: the Matter records the step only when the Client completes it.
- 02The reserved act stays with the lawyer.
When the next act is reserved, advance_matter posts a Gig to gigs.lawyer. A Signer claims it and, under their own license, attests, sends it back, or declines. No tool can attest, and a Declination is final.
- 03Nothing waits on a person.
A reserved act can take days, so no call blocks on one. advance_matter answers at once with status waiting_on_signer. Check back with get_matter, in the same chat or a new one: its status and journal show where the Matter stands.