MCP connector
Legalize also runs as an MCP server, so an agent (Claude, ChatGPT, Cursor, or any other MCP client) can query the corpus directly instead of calling the REST API. Same data, same auth model, same quota.
/mcp counts against the same requests_used counter as a REST call
to /api/v1/*. There is no separate MCP allowance — see
pricing for the limit on your tier.
Connect
Add this endpoint to any MCP client. There's no anonymous mode: every call authenticates via OAuth and is tied to your account.
For Claude specifically, /mcp has a one-click install link and walks through the sign-in step.
Tools
Seven read the corpus:
list_countries— which countries are in the corpus, and how many laws each holds.search_laws— find a norm by words in its title or its official number.get_law— read what a norm says today, whole text or one article.law_at_date— what the norm said on a given day, with the git SHA behind that version.diff_law— what changed between two dates, as a diff of the two texts.reform_history— which norms amended this one, when, and what each says it touched.law_stats— corpus-level counts (laws, reforms, articles) for a country.
The rest manage this account's own subscriptions — a
webhook endpoint you run, or a daily email to your own address.
They are the only tools that write, and what they write is your own subscription — no tool
can alter a law, a version or a corpus. The ones that create or delete are declared to clients
with readOnlyHint: false, so a client that asks before a write will ask before
them:
preview_webhook— try a subscription rule against the last 30 days without creating anything: how many events it would have delivered, and which. Read-only.create_webhook— subscribe an HTTPS endpoint to law changes, narrowed by country, by specificlaws, or by words in the title and subject headings. The signing secret is not returned — anything a tool returns lands in the transcript, and that key can forge a delivery. It answers with asecret_url; you collect the key on the dashboard, where it is shown once and rotated.list_webhooks— the endpoints this account has, with theidthe others take. Secrets are never returned.set_webhook_enabled— pause one, or resume a paused one. The endpoint, its rule and its delivery history all stay. A pause of up to a week is caught up on resume; older changes are not delivered, because the fan-out looks back seven days.delete_webhook— remove one. Deliveries stop and its history goes with it.create_email_digest— the same rule, delivered as one email a day to the account's own address rather than to a server you run. That address cannot be set to somebody else's: this is not a way to send mail to a third party.langchooses the language of the mail, English or Spanish, and not of the laws. A day on which nothing matched sends nothing.list_email_digests— the digests this account gets, with the rule and language of each and theidthe next one takes.set_email_digest_enabled— pause the mail, or resume it. A paused digest keeps its place in the change history: whatever matches while it is paused arrives in the first mail after it resumes, rather than being lost.delete_email_digest— stop one for good. Recreated later, it starts from the day it is recreated and the gap is not sent.
feature_not_available error and create nothing — see pricing.
The change feed is the pull-based alternative and is on every plan.
Quota exceeded
Past your monthly limit the connector answers a structured quota_exceeded error
instead of running the tool — nothing is charged, nothing is cut off silently, and normal
service resumes when the period rolls over.