Connect a client

Add Advisor to your MCP client, sign in or present your API key, and call health to prove the connection works. Each client is configured differently, so use the tab for yours.

FactValue
Endpointhttps://advisor.lawatlas.ai/api/mcp (streamable HTTP)
Older addresses, still servedhttps://advisor.lawatlas.ai/api/mcp/sse (SSE) and https://advisor.lawatlas.ai/api/mcp-http/mcp (streamable HTTP). A connection made with either keeps working
Subscriber sign-inOAuth 2.1 with PKCE; your client registers itself, so you need no Client ID
Partner credentialAuthorization: Bearer <API key>, read from the environment variable LAWATLAS_API_KEY

Before you begin

Connect as a subscriber

Your client opens a browser for you to sign in with your Advisor account.

Claude Code

# Add the server, then sign in from inside Claude Code: run /mcp, choose lawatlas, authenticate.
# Do not pass --client-id: Claude Code registers its own client.
# Claude desktop app, Code tab: run this in a terminal, then start a new session
# (an open session does not see the server) and run /mcp there to sign in.
claude mcp add --transport http --scope user lawatlas https://advisor.lawatlas.ai/api/mcp

Claude Desktop

Settings > Customize > Connectors > Add > Custom connector
  Name:   LawAtlas.ai MCP
  URL:    https://advisor.lawatlas.ai/api/mcp
Choose Continue, then Add. Leave every other setting as it is.
Sign in with your Advisor account when the browser opens.

OpenAI Codex

# Add the server, then sign in.
codex mcp add lawatlas --url https://advisor.lawatlas.ai/api/mcp
codex mcp login lawatlas

Connect as a partner

Every request carries your API key. No one signs in.

Claude Code

claude mcp add --transport http --scope user lawatlas https://advisor.lawatlas.ai/api/mcp \
  --header "Authorization: Bearer $LAWATLAS_API_KEY"

Cursor

{
  "mcpServers": {
    "lawatlas": {
      "url": "https://advisor.lawatlas.ai/api/mcp",
      "headers": { "Authorization": "Bearer ${env:LAWATLAS_API_KEY}" }
    }
  }
}

OpenAI Codex

# ~/.codex/config.toml
[mcp_servers.lawatlas]
url = "https://advisor.lawatlas.ai/api/mcp"
bearer_token_env_var = "LAWATLAS_API_KEY"

Python SDK

import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    headers = {"Authorization": f"Bearer {os.environ['LAWATLAS_API_KEY']}"}
    async with streamablehttp_client("https://advisor.lawatlas.ai/api/mcp", headers=headers) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool("health", {})
            print(result.content[0].text)

asyncio.run(main())

TypeScript SDK

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://advisor.lawatlas.ai/api/mcp"),
  { requestInit: { headers: { Authorization: `Bearer ${process.env.LAWATLAS_API_KEY}` } } },
);
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);
const result = await client.callTool({ name: "health", arguments: {} });
console.log(result.content);

curl

curl -s https://advisor.lawatlas.ai/api/mcp \
  -H "Authorization: Bearer $LAWATLAS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"health","arguments":{}}}'

Note: The streamable HTTP endpoint is stateless: every request stands alone and needs no session. A single tools/call request, as in the curl tab, works without an initialize first.

Verify

Call health. A good response has "status": "ok", the corpus counts and, for a partner key, a partner_key block saying when the key expires. Trimmed from a real response captured on 10 October 2026:

{
  "status": "ok",
  "corpus": {
    "counts_by_kind": { "act": 4773, "legislative_instrument": 24136, "notifiable_instrument": 3475, "...": "..." }
  },
  "partner_key": { "key_ending": "2_Bo", "expires_at": "2027-01-08T05:27:24.928483Z", "days_to_expiry": 89 }
}

The full response is on the health page.

What Advisor exposes

28 tools, all of which read. See the tools index.

Access and permissions

A subscriber's paid tools need an active AI Pro subscription; health and renew_subscription work for any signed-in subscriber. A partner key works only while the AI Pro subscription of the organisation that owns it is active, and only for the scopes its client holds.

Troubleshooting

ProblemCauseSolution
Claude Desktop: "This connector will use SSE transport, which is being deprecated", then "Couldn't check the server"The connector was given the older address ending /sseUse https://advisor.lawatlas.ai/api/mcp
Claude Desktop shows sign-in choicesClaude could not settle sign-in by itselfKeep Sign in now and choose Register automatically. Advisor's sign-in does not support Use Claude's published identity
Claude Code: invalid_request, redirect_uri does not matchA Client ID registered for another client (Claude Desktop) was usedRemove the Client ID, clear the stored sign-in (in /mcp choose the server, then Clear authentication, or run claude mcp logout lawatlas on Claude Code 2.1.186 or later), then authenticate again
zsh: command not found: claudeClaude Code is installed in ~/.local/bin, which is not on your PATHecho 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
The server is not listed in /mcpAdded at a scope this project does not read, or the session started before the server was addedAdd it with --scope user, or restart Claude Code (in the desktop app's Code tab, start a new session)
HTTP 401No credential, or the key is unknown, revoked, suspended or expiredCheck LAWATLAS_API_KEY, and the key's status in the partner page
A tool answers FORBIDDEN mentioning the subscriptionThe AI Pro subscription has lapsed (for a partner, the owning organisation's)Renew the subscription in Advisor

More rows in Troubleshooting.

Add the skills

The LawAtlas.ai skills tell your agent how to answer with the law Advisor returns: quote it exactly, cite each passage and give its check label. Skills explains them and the four ways to add them; in Claude Code it is one command.

Next steps