Portuguese Law AI MCP: Search DGSI & Diário da República
Learn how a Portuguese Law AI MCP connects Claude, ChatGPT, Cursor, and Codex to live DGSI decisions and Diário da República legislation.

Pedro Martins6 min readIn Portuguese legal research, the first problem is reaching the right source; AI comes second. A language model explains legal concepts well, but its training data cannot guarantee that a decision is current, that a diploma has not been amended, or that a citation exists exactly as quoted.
A Portuguese Law AI MCP solves this differently: it gives an AI client tools to query the legal source at the moment the question is asked. That is why INDIGIT built Lauyer, an MCP server that connects compatible clients to Portuguese court decisions on DGSI and to legislation and official publications on Diário da República.
In short
Your AI assistant runs the conversation. Lauyer queries the official sources live. The final check against the official document is still yours.
Why Legal AI Needs Live Sources
General-purpose models help you plan a search strategy, translate terminology, compare arguments and summarise text you provide. As an authority on what Portuguese law says today, they are unreliable.
Three things keep changing:
- legislation is amended, rectified, regulated or revoked;
- new decisions are published, and later case law changes how earlier ones are read;
- source portals change their indexes, identifiers and available text.
The safest workflow therefore retrieves the source first and interprets it second: find the document, open it, identify the governing text, and only then bring AI into the analysis.
What Lauyer Connects
DGSI Court Decisions
DGSI publishes decisions from several Portuguese courts. Lauyer searches the supported courts, filters by date, returns metadata for each result and fetches the full decision whenever the source provides it.
Example requests:
- “Find recent Supremo Tribunal de Justiça decisions about non-compete clauses.”
- “Search Tribunal da Relação do Porto decisions mentioning workplace harassment since 2023.”
- “Open this DGSI result and extract the court, process number, date, holding and cited provisions.”
Every result keeps its DGSI link. That link is worth more than any persuasive paragraph from a model, because it lets you check what was actually published.
Diário da República Legislation
Diário da República is the official publication of Portuguese legislation and other public acts. Lauyer searches acts, filters by type or date, fetches a specific publication and lists the latest publications.
That lets you ask questions such as:
- “What employment legislation was published today?”
- “Find recent acts on telework and occupational safety.”
- “Fetch this decree-law and identify what it amends or revokes.”
These results do not replace a legislative consolidation service. Always check the publication, later amendments, rectifications, commencement and any consolidated version from an official source.
How MCP Fits Into the Workflow
MCP (Model Context Protocol) is a standard that lets an AI client call external tools. Rather than loading a legal database into every assistant, the client discovers Lauyer’s tools and uses them when a request needs Portuguese legal information.
The typical process:
- Add Lauyer (
https://lauyer.org/api/mcp) as a remote HTTP MCP server in a compatible client. - The client opens Lauyer in the browser.
- Sign in and review the requested permissions.
- Return to the client and start a new conversation.
- Ask a question that needs DGSI or Diário da República.
- The client calls the right tool and receives the result with a link to the source.
With OAuth, the connection belongs to your account. There is no permanent API key to paste into an editor configuration file. Full setup instructions are on lauyer.org.
Research Prompts That Produce Better Results
A good legal-research prompt states the task, jurisdiction, date range and output format. Compare:
Tell me everything about dismissal law in Portugal.
Search Diário da República for legislation published since 2022 concerning dismissal for employee misconduct. Return the title, number, publication date, affected provisions and source link. Then search STJ decisions applying those provisions and separate source text from your analysis.
The second prompt gives the assistant a retrieval plan and a format that makes checking easy. Other useful instructions:
- name the court or courts;
- set start and end dates;
- ask for process and diploma numbers exactly as published;
- ask for direct quotations only when the full text was fetched;
- require a link beside every material claim;
- ask the assistant to flag when it only received a headnote.
What AI Summaries Can and Cannot Do
Lauyer can ask an AI model to summarise a fetched decision or act. This helps with triage: deciding whether a long document deserves a full read, finding the operative part or drafting a first list of issues.
A summary does not replace the document. It can omit an exception, mistake the headnote for the full reasoning, misread the procedural history or invent a citation. The model also cannot know that later case law changed the position unless that later source was retrieved.
The summary is never the source
Do not put an AI summary into advice, a court filing, a disciplinary decision or a compliance conclusion without checking every material statement against the original source.
Lauyer’s AI & Data Use Policy explains which providers the text passes through and what is recorded when you request a summary.
Privacy and Professional Responsibility
Your AI client, Lauyer, the legal source and the AI model can each be a separate point of data processing. This matters when a search includes client details, employee information, privileged communications, criminal-offence data or third-party identifiers.
Keep searches focused on the source and remove names and facts you do not need. Before using any external AI or MCP service for professional work, check your secrecy duties, client instructions, internal policies, records rules and lawful basis for processing personal data.
Lauyer does not store a copy of the Portuguese legal corpus: searches run live against the sources. AI summaries work differently, because the selected text is sent through OpenRouter to the configured model provider. Lauyer’s Privacy Policy describes the full data flow.
A Verification Checklist
Before relying on a result:
- Open the original DGSI or Diário da República link.
- Confirm the court, process number, act number, date and series.
- Check whether you received the full text, an excerpt or only the headnote.
- Look for amendments, revocations, rectifications, commencement, appeals and later decisions.
- Separate quoted source text from the assistant’s interpretation.
- Remove unnecessary personal data before sharing the output.
- Have a qualified person review work that affects rights, employment, compliance, litigation or money.
Where a Portuguese Law AI MCP Helps Most
The value is not that “AI knows Portuguese law”. It is that AI can reach Portuguese legal sources while you work.
That speeds up the first research pass, makes source links easier to collect and cuts the constant switching between portals. The final judgement stays human: whether a result is official, current, relevant, complete and right for the matter at hand.
To try it, connect Lauyer to your AI client. If you want to connect data sources or internal systems to AI assistants in your business, see INDIGIT’s AI Integrations service.


