Remote HTTP MCP & OAuth

Portuguese Law AI Integrations

One Connection. Legal Research Tools in Your AI Client.

Connect a compatible AI client to Lauyer to research Portuguese legislation, official publications, and court decisions. The connection uses one shared MCP endpoint and browser-based OAuth authorization.

AI Client

AI Client

  • Remote HTTP MCP
  • Browser-based OAuth

Lauyer

OAuth · MCP

Shared endpointhttps://lauyer.org/api/mcp

Compatibility Requirements

Your Client Needs Two Capabilities. It Does Not Need an API Key.

Lauyer is a remote MCP server protected by OAuth. The client must accept an HTTPS MCP server URL and start browser authorization. An integration limited to local stdio servers, or without OAuth for remote MCP, cannot complete this connection.

Remote HTTP transport

The client sends MCP requests to Lauyer’s HTTPS address. There is no local Lauyer server to install and no public REST endpoint to configure.

Client-initiated OAuth

When Lauyer says the resource is protected, the client reads authorization metadata, registers itself, and opens the browser for sign-in and consent.

Dynamic registration

The server accepts dynamic client registration. The flow uses PKCE and bearer tokens; you should not copy tokens or store a Lauyer key in configuration files.

Client Compatibility

The Same Entry Point. Different Setup on the Client Side.

Compatibility depends on the client version, plan, and workspace policy. The guidance below distinguishes setup documented in this repository from clients you should confirm before configuring.

Compatibility Matrix

Claude Code

Setup is documented in the project README.

Remote MCP

Add Lauyer with --transport http and its URL.

Authorization

Open /mcp, select Lauyer, and choose Authenticate.

claude.ai

A custom connector is documented. Availability depends on plan and workspace policy.

Remote MCP

Add the URL as a custom connector.

Authorization

The client drives the browser OAuth flow.

Other MCP Clients

ChatGPT, Cursor, Codex, and other clients are not presented as verified on this page. Confirm the current client version, plan, and capabilities.

Remote MCP

Must accept a remote HTTPS MCP server.

Authorization

Must support OAuth and dynamic registration for that server.

Third-party menus and capabilities can change. If a client only asks for an API key or a stdio command, that path does not match Lauyer’s OAuth connection.

Browser Authorization

The Client Requests Access. You Decide at Lauyer.

Authorization separates technical setup from your decision to grant account access. Start the flow from a client you trust, confirm the Lauyer address in the browser, and review the requested permissions before allowing access.

Discovery

The client attempts /api/mcp, receives a 401 response, and follows the protected-resource and authorization-server metadata.

Sign-in

The browser opens Lauyer. The return destination remains attached while you sign in and, when needed, verify your email.

Consent

Lauyer shows the permissions requested. If you deny them, the client receives no authorization to list or call the tools.

Code & tokens

After approval, the client exchanges the PKCE-protected code for tokens and repeats the MCP request with a bearer token.

MCP Client Request

Authorize Access to Lauyer Tools

Sign in with Google or with a verified email address and password. Lauyer then presents the permissions requested by the client.

Requested permissions

  • openid
  • profile
  • email
  • offline_access

Your decision

Allow access

OAuth

Deny & return to client

MCP Client Request

After Authorization

The Tools Appear Where You Already Work with AI.

After the connection completes, the client can list and call Lauyer tools. Start a new conversation or session if your client only refreshes its tool catalog at startup.

Court Decisions · DGSI

Search ten DGSI databases, retrieve the public content of a decision, and list the available court codes.

  • dgsi_search
  • dgsi_fetch
  • dgsi_courts

Legislation & Publications · DR

Search Diário da República, retrieve an act, review today’s publications, and list accepted act types.

  • dr_search
  • dr_fetch
  • dr_today
  • dr_types

AI Summaries

Summarize a decision or act for initial triage. A summary is an AI-generated aid, not a legal source or professional conclusion.

  • dgsi_tldr
  • dr_tldr

Connect, Reconnect & Revoke

The Connection Has a Lifecycle. The URL Does Not Change.

Adding the server, authorizing an account, and maintaining authorization are separate actions. If the connection stops working, do not improvise an API key: return to the client’s OAuth flow.

Connect

Add the shared endpoint in the client, then complete sign-in and consent in the browser.

Reconnect

Use the client’s Authenticate or Connect action. If needed, remove the old connection, add the same URL again, and reauthorize.

Revoke

First use the client’s disconnect or revoke control. If the client does not provide one, request help at privacy@lauyer.org.

Connection States

The browser never opens

The client may not support OAuth for remote MCP, the feature may be disabled by the plan, or the configuration may be using stdio.

Confirm remote HTTP, OAuth, and the exact URL. Do not enter an API key.

Consent was denied

Without approval, the client returns without authorization to list or call Lauyer tools.

Restart the flow only from your chosen client and review the permissions again.

Authorization stopped working

The token may have expired, been revoked, or remained tied to an old client configuration.

Choose Authenticate or Connect. If it persists, remove the entry and add the same URL again.

Connected, but no tools appear

Some clients only refresh their tool list when a conversation, session, or application restarts.

Start a new session and confirm the client points to https://lauyer.org/api/mcp.

Data Along the Connection

Client, Lauyer & Source Have Different Roles.

A research request can pass through several parties. For legal, employment, or compliance work, remove unnecessary data and confirm applicable policies and duties before sending personal or confidential information.

Data Path

AI Client

Sees the conversation, tool parameters, and results. It may retain them under its settings, contract, and workspace policy.

Lauyer

Processes necessary account, authentication, consent, usage, and billing data. It sends each search or retrieval request to the selected source.

Legal Source

DGSI or Diário da República receives the necessary request and returns public content available at that time. It may keep its own technical logs.

Separate Branch: AI Summary

Only when you request a summary, Lauyer sends the relevant legal text and instructions to OpenRouter and the underlying model provider.

Lauyer does not maintain a parallel copy of the complete DGSI or Diário da República corpus. Always open the original link and confirm the text, date, legal status, amendments, appeals, and context before relying on a result.

Access, Usage & Credits

Authorization Is Not the Same as Using a Tool.

The OAuth connection lets an authorized client request tools. Usage is counted only when those tools are called, according to each tool’s weight.

Search & Retrieval

Pro costs €10 per month and includes 1,000 request units per UTC calendar month. Searches and retrievals have different weights; court-list and act-type tools are free.

AI Summaries

Pro separately includes 40 AI summaries per UTC calendar month. Each dgsi_tldr or dr_tldr uses one AI-summary unit. A summary does not replace reading the original source.

Optional Top-Ups

You can buy €10 to €50 in credits, with or without Pro. Each euro adds 100 request units and 4 AI-summary units; top-up lots expire 12 months after payment.

Before You Connect

Frequently Asked Questions about AI Integrations

What must my AI client support?+

It must accept a remote HTTP MCP server over HTTPS and start browser-based OAuth, including dynamic client registration. Support for local stdio servers alone is not enough.

What is the Lauyer MCP server address?+

The production endpoint is https://lauyer.org/api/mcp. The same address exposes the tool catalog after authorization; there are no separate URLs for DGSI and Diário da República.

Do I need an API key?+

No. The connection uses browser-based OAuth. If a client only asks for an API key, confirm that it supports OAuth authentication for remote HTTP MCP servers. Do not copy access tokens into configuration.

How do I sign in during connection?+

Use Google or a verified email address and password. Lauyer preserves the return to the MCP flow through sign-in, verification, and consent.

Which permissions appear at consent?+

The current flow can request openid, profile, email, and offline_access. Always review the screen shown. The offline_access scope lets the client maintain access through token renewal until authorization expires or is revoked.

Can I connect more than one client?+

Yes, provided each client is compatible. Every client starts its own authorization request and may have different storage, audit, and workspace-administration practices.

How do I reconnect a client?+

Use the client’s Authenticate or Connect action and complete the browser flow again. If an old configuration remains, remove it and add https://lauyer.org/api/mcp again before authorizing.

How do I revoke authorization?+

Start with the client’s disconnect or revoke control. If that control is unavailable or fails, contact privacy@lauyer.org for help. Revoking the connection does not automatically erase data retained independently by the client.

What becomes available after authorization?+

The client can list tools for searching and retrieving DGSI and Diário da República material, listing courts and act types, and requesting AI summaries. Some clients need a new conversation or session to refresh the catalog.

What data can the AI client see?+

The client sees the conversation, parameters sent to tools, and returned results. It may also retain authorizations and logs under its policies and workspace settings. Check those conditions before using professional data.

Does a result or summary replace the original source?+

No. Sources can be incomplete or unavailable, and AI summaries can omit context or be wrong. Open DGSI or Diário da República and confirm the document, version, legal status, amendments, and relevant context.

Does authorization include unlimited use?+

No. OAuth authorizes the connection, but every tool remains subject to the allowance available on the account. Connecting several clients does not create separate limits: they all use the same Lauyer account.

Bring the Sources into Your Workflow

Connect the Client. Authorize Access. Start at the Source.

Add the endpoint, complete browser consent, and confirm that the tool catalogue becomes available in the client.

Get the Tools