PT Law
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@pipeworx/pt-law
Portuguese legislation (Decreto-Lei and Lei, from the Diario da Republica) and higher-court decisions (STJ, STA and the five Tribunais da Relacao).
Part of Pipeworx — an MCP gateway connecting AI agents to 2106+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
Tools
pt_dre_get_act(type, number, year, publication_date?)— resolves a Decreto-Lei or Lei to its Diario da Republica page link. The publication date is optional: without it the number and year are resolved through the Diario da Republica public search (the result saysresolved_via: dre_search). A wrong number or date returns an explicitfound: false; an unavailable or changed search returns an error naming the official site.pt_court_search(query, court?, limit?, start?)— free-text search of court decisions; returns session date, case number, relator, descriptors and a decision link per hit. Empty results carry areason.pt_court_get_decision(url)— one decision's labelled fields and, where published, the full text.
Related MCP server: Portuguese Law MCP Server
Auth
Keyless.
Data sources
INCM, Diario da Republica (legislation, European Legislation Identifier resolver).
Portuguese courts, Bases Juridico-Documentais (DGSI): STJ, STA, TRL, TRP, TRC, TRE, TRG.
Notes
The identifier scheme needs the publication date, so a number-only call first finds the date through the Diario da Republica public search (anonymous, no login), caches it in the isolate, then resolves the act as usual. Very old acts may not resolve.
Only Decreto-Lei and Lei are offered, the two act types confirmed against the live resolver.
The decision database is an old Lotus Domino site. Search pages come back as UTF-8 and decision pages as ISO-8859-1; the pack detects which. Session dates are MM/DD/YYYY upstream and are returned as ISO. Search returns relevance order, not newest first. Full text is online only where the decision's "Texto Integral" field is S.
Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"pt-law": {
"url": "https://gateway.pipeworx.io/pt-law/mcp"
}
}
}What this endpoint actually serves
tools/list at https://gateway.pipeworx.io/pt-law/mcp returns the tools in the table
above plus five Pipeworx tools: ask_pipeworx, discover_tools, ask_pipeworx_grounded, company_register_search and company_facts.
ask_pipeworx answers a question this pack does not cover by routing across the
whole catalog, without adding a second MCP server.
Add an option to the same URL:
https://gateway.pipeworx.io/pt-law/mcp?meta=1lists this pack's tools plus up to 48 shared Pipeworx tools (48 when this README was generated; a connection without an account lists fewer, and its owntools/listis the exact answer on any given day).https://gateway.pipeworx.io/pt-law/mcp?meta=0lists this pack's tools alone.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}Both URLs reach the same gateway and the same 2106+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one (it is not listed on a ?meta=0 connection).
No MCP client? Call it over HTTP
curl -X POST https://gateway.pipeworx.io/v1/tools/pt_dre_get_act \
-H 'Content-Type: application/json' \
-d '{"type":"decreto-lei","number":"10","year":2024,"publication_date":"2024-01-08"}'No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/pt_dre_get_act. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.
Run it from npm
@pipeworx/mcp-pt-law is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with npx, and it forwards every call to the same
https://gateway.pipeworx.io/pt-law/mcp endpoint shown above. It needs network access;
there is no offline mode.
{
"mcpServers": {
"pt-law": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-pt-law"]
}
}
}Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
"env": { "PIPEWORX_API_KEY": "<your key>" } to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.
It lists only this pack's tools by default. Set PIPEWORX_META_TOOLS=1 to
also list ask_pipeworx and the other gateway-wide tools.
Behind an HTTPS proxy: Node's built-in fetch does not read HTTPS_PROXY by
default. Newer Node releases honour it when NODE_USE_ENV_PROXY=1 is set; check
your Node version's documentation.
Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
ask_pipeworx({ question: "your question about Pt Law data" })The gateway picks the right tool and fills the arguments automatically.
More
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Case law search, court decisions and súmulas, across indexed public sources (STF, STJ, TST, state co
Search official Brazilian case law (jurisprudência) from the STJ and STF by terms, party or CNPJ.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
Polish legal data for AI assistants: full-text search across 2.94M+ court rulings (common courts, Supreme Court, Constitutional Tribunal, KIO, NSA/WSA), statute text and version history from the official ELI register (164k+ acts), rulings citing a provision and citations between rulings, a citation verifier for case numbers, case-outcome and duration statistics, KIS tax interpretations, CJEU rulings applied in Poland, UODO decisions, KRS company lookup, court competence, official bank accounts and legal calculators. Works without an API key (daily limit).
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to provide Portuguese legal advice by exposing legal calculators, templates, and reference documents through the MCP protocol.MIT
- AlicenseNot gradedqualityFmaintenanceEnables querying Portuguese legislation, including statutes, provisions, and EU law implementations, with tools for search, citation validation, and currency checks.36 npmApache 2.0
- AlicenseAqualityCmaintenanceEnables natural-language queries of Brazilian court cases through the public DataJud and DJEN APIs, retrieving case details, movements, publications, and parties across 92 tribunals, and calculating procedural deadlines in business days. It also offers optional Domicílio Judicial Eletrônico tools for listing and acknowledging intimations.11MIT
- AlicenseAqualityBmaintenanceEnables read-only search of Spanish legislation and multi-tier case law from official registries, retrieval of full legal texts as Markdown, and verification of statutory and case-law citations.6MIT