Remote MCP for Portuguese Sources

Portuguese Law AI MCP

From Legal Question to Official Source through One Endpoint.

Connect a compatible AI client to nine tools for researching legislation, official publications, and court decisions from Diário da República and DGSI.

Protected Endpoint

https://lauyer.org/api/mcp

Transport
Remote HTTP MCP
Authorization
Browser OAuth
Catalogue
9 tools
The client discovers the authorization server, obtains your consent, and returns to the endpoint with a Bearer token.

Request Architecture

One MCP Connection. Two Public Sources. A Verifiable Path.

Lauyer operates as an access layer between the AI client and Portuguese legal sources. Each search queries the source when requested, applies the defined usage cost, and returns a compact response so work can continue in the client.

Origin

Compatible AI Client

Sends a remote HTTP MCP call with the terms, filters, or identifiers required by the selected tool.

Access

Lauyer Endpoint

Validates the OAuth token, identifies the account, reserves the required units, and runs only the requested tool.

Retrieval

DGSI or Diário da República

The search or retrieval runs directly against the public source when the request arrives. Lauyer does not maintain a parallel copy of the complete corpus.

Return

Response with a Source Trail

Returns compact Markdown. DGSI includes the decision link; a full DR retrieval exposes any available DR, ELI, and PDF links.

Ordinary searches and retrievals do not pass through an AI provider. That path is used only when you deliberately select one of the two summary tools.

Tool Catalogue

Nine Tools, Organized by Source

Four DGSI tools cover court decisions. Five Diário da República tools cover legislation and official publications. The names below are the implemented MCP identifiers.

DGSI · 10 court databases

Court Decisions

dgsi_search

Searches decisions by terms, courts, and period. It can sort by date and retrieve the text of up to 10 decisions per database in the same request.

Usage

3 request units

dgsi_fetch

Retrieves a complete decision from its DGSI URL and returns the fields and text made available by the source.

Usage

1 request unit

dgsi_courts

Lists the names and aliases of the ten court databases that can be selected for a search.

Usage

Free

dgsi_tldr

Retrieves the decision and generates an AI summary in the requested language. It uses full text when available and otherwise uses the headnote.

Usage

1 AI summary

Diário da República

Legislation & Publications

dr_search

Searches legislation and publications by text, content type, act type, series, and period. It can retrieve up to 10 full texts per request.

Usage

2 request units

dr_fetch

Retrieves a complete act by identifier and returns the published fields, extracted text, and available official links.

Usage

1 request unit

dr_today

Lists the day’s Diário da República publications using the UTC date window, with an optional act-type filter.

Usage

1 request unit

dr_types

Lists the act-type aliases available for narrowing a Diário da República search.

Usage

Free

dr_tldr

Retrieves the act and generates an AI summary focused on what it changes, introduces, or revokes when supported by the text.

Usage

1 AI summary

OAuth & Discovery

The Client Discovers. You Authorize. The Token Opens the Endpoint.

The MCP client drives authorization and you confirm it in the browser. You do not need to paste an API key into the conversation or give your password to the client.

Authorization Lane
401 + WWW-Authenticate

Protected Resource

A call without a token receives an authentication challenge and the location of the protected-resource metadata.

Discovery

Authorization Server

The client reads the OAuth metadata published by Lauyer and identifies the required endpoints.

DCR

Client Registration

The server allows dynamic client registration to prepare the authorization flow.

Browser

Sign-In & Consent

You sign in with Google or verified email and confirm consent in the browser.

Bearer

Authorized Request

The client exchanges the code for a token and repeats the MCP call with Bearer authorization.

Data Boundaries

Ordinary Research and AI Summaries Follow Different Paths

The selected tool determines where data goes. A search queries only the relevant public source. A summary adds an AI provider to the path and should be treated as separate external processing.

Source Path

Terms, filters, or identifier

DGSI or Diário da República

The source receives the request from Lauyer’s Cloudflare infrastructure. The response is retrieved and formatted for your MCP client.

Lauyer · service boundary

Summary Path

Relevant legal text + instructions

OpenRouter → current Google Gemini model

This transfer happens only with dgsi_tldr or dr_tldr. Retention and training terms can differ between the providers involved.

Internal Ledger

The meter records usage, not a parallel legal archive.

Lauyer records the account, tool, source, model, tokens, estimated cost, and time to enforce limits and operate the service. The AI ledger does not intentionally retain the full document, instructions, or summary. Infrastructure and providers may keep their own technical logs.

Units & Allowances

Usage Reflects the Work Requested

Request units and AI summaries are separate meters. A tool runs only when the Pro allowance or a purchased credit lot can cover its full cost.

dgsi_search
3 request units
dr_search
2 request units
dgsi_fetch · dr_fetch · dr_today
1 request unit
dgsi_tldr · dr_tldr
1 AI summary
dgsi_courts · dr_types
No usage

Pro Subscription

1,000 request units + 40 summaries per UTC month

Pro costs €10 per month and renews monthly until canceled. The allowance is shared across all nine tools and resets at the start of each UTC calendar month. Applicable taxes are shown before purchase.

Optional Credits

More usage without changing the architecture

Buy a whole-euro amount from €10 to €50, with or without Pro. Each euro adds 100 request units and 4 AI summaries. Lots expire after 12 months; when Pro cannot cover a tool, the oldest purchased lot with enough units is used.

Professional Boundary

The Connection Ends at the Source. Responsibility Does Not.

Lauyer reduces the work required to locate and retrieve public materials. It does not decide what applies to a specific matter, confirm current status or procedural posture for you, or provide legal advice.

  1. Open the Original Source

    Read the decision on DGSI or the act on Diário da República. Confirm that the link, number, date, and text match the result presented.

  2. Confirm the Current Context

    Check amendments, revocations, rectifications, appeals, consolidated versions, and later decisions or acts that may matter.

  3. Separate Source from Summary

    An AI summary can omit exceptions, misread the text, or invent references. Never treat it as a legal source.

  4. Apply Qualified Review

    Submit conclusions with legal, employment, regulatory, or commercial consequences to appropriate professional assessment.

Before Connecting a Client

Frequently Asked Questions about the Legal MCP

What is the Portuguese law research MCP?+

It is a remote, OAuth-protected MCP endpoint that lets a compatible AI client call Lauyer’s research and retrieval tools. The endpoint is https://lauyer.org/api/mcp; there is no parallel public REST API.

Must I configure every tool separately?+

No. The same endpoint presents the available catalogue to the client after authorization. The tool is selected per request, without creating separate connections for DGSI, Diário da República, or summaries.

Which legal sources does Lauyer query?+

Lauyer queries DGSI for court decisions and Diário da República for Portuguese legislation and official publications. It does not currently include a dedicated EU directives source.

Do searches query the live sources?+

Every request queries the source when it runs. Availability, coverage, indexing, and result content depend on DGSI or Diário da República, as well as the terms and filters selected.

Can I reuse the same authorization in another client?+

Each client starts its own registration and authorization request. Adding a second client does not automatically transfer the first client’s consent or tokens.

What kind of AI client do I need?+

You need a client supporting remote HTTP MCP and OAuth. Lauyer does not require its own local application. Exact configuration depends on the client and does not change the endpoint or tool catalogue.

Do responses include links to the original source?+

DGSI search results and retrievals keep the decision link. For Diário da República, full retrieval returns any DR, ELI, and PDF links supplied by the source. Always open those links before citing or applying the content.

Can I research without using an AI provider?+

Yes. Use the search and retrieval tools without requesting a summary. The AI-provider path is activated only when the client deliberately calls dgsi_tldr or dr_tldr.

Can I include confidential information or personal data?+

Avoid professional secrets, unpublished facts, and unnecessary personal data. The MCP client sees the request and result; the public source receives search terms; and a summary adds AI providers to the path. Check your duties and each service’s terms before sending sensitive material.

Does Lauyer replace source review or legal advice?+

No. Lauyer helps locate, retrieve, and summarize public materials. Summaries can be wrong, and the service does not decide the law applicable to a matter. Professional use requires confirmation at the original source and qualified review.

What happens when the account lacks enough units?+

The tool does not run. Lauyer uses the available Pro allowance first and, when that cannot cover the request, looks for the oldest valid credit lot that can cover the tool’s full cost.

Does a failed tool consume units?+

No. The cost is reserved before execution and released when the tool ends with an error. The account keeps the charge only for a completed execution.

One Connection to Begin

Connect Your Client to Portuguese Legal Research

Authorize Lauyer’s MCP endpoint and use nine tools to reach public sources while keeping professional verification where it belongs.