Official sourcescylaw.org · EUR-Lex
Europaius

Building Your Own AI Agent on the Europaius Legal Corpus

Anyone building a custom agent for legal or compliance tasks does not need to build a database of legislation from scratch. The Europaius MCP server provides search, full-text retrieval and cross-country comparison as standard tools that an agent can call via the MCP SDK.

Custom AI Agent with a Legal Corpus: MCP SDK and API Key
Europaius Cyprus: Corpus Content

The examples in this guide are based on Czech law. The same tools also work with the Europaius Cyprus corpus:

1 704 Laws86 226 Case law1 704 Laws with AI explanation

Europaius Cyprus →Search

Signing In from Code

For interactive use, standard OAuth sign-in takes place in the browser; the MCP SDK for both Python and TypeScript can handle it. For server-side agents and automations, use the API key from the Europaius pricing page: enter it at login instead of an email address, or have your own OAuth client complete authorisation once and store the refresh token. The key starts with the prefix eur_ and is tied to the account and its limits.

Tools

  • search(query, states): returns JSON {"results":[{id,title,url,snippet}]} across legislation and case law.
  • fetch(id): full text of a document by identifier, including metadata (court, date, ECLI, country).
  • search_law, find_caselaw, find_caselaw_cz: targeted search within legislation or case law with parameters.
  • get_paragraf(state, law, paragraf): exact wording of a section by statute number.
  • souvislosti(para_id): verified citation links for a section.
  • compare_norm(query, states): the most relevant provisions from each country.
  • vyklad, list_states: interpretation of a Czech section, overview of coverage.

Identifiers

Identifiers returned by the search tool are stable and can be stored. Decisions of Czech courts: case:<court>:<slug>, where the court is ns, nss, us or justice — all Czech sources. Section: para:CZ:89/2012:§2991. Document from another jurisdiction: eu:DE:<id>. For decisions, the fetch tool returns the legal proposition, operative part and reasoning as a single text, up to 80,000 characters.

Python Example

from mcp import ClientSession; from mcp.client.streamable_http import streamablehttp_client; async with streamablehttp_client("https://mcp.europaius.com/mcp", headers={"Authorization": "Bearer <token>"}) as (r, w, _): async with ClientSession(r, w) as s: await s.initialize(); res = await s.call_tool("search", {"query": "limitation of claims", "states": ["CZ"]}). The result is text containing JSON, which you parse as usual. You obtain the token either through the OAuth flow or from API key login.

Recommendations for Agents

  • Give the agent a system instruction to call the tool for every legal claim and to include the URL from the result in its answer.
  • Store document identifiers, not full texts; retrieve the full text only when actually needed.
  • Expect the first query to a foreign jurisdiction to take longer; use a timeout of at least 120 seconds.
  • Respect account limits; an agent running in a loop can burn through 100 queries quickly, so use a subscription for production.
Connect Europaius to Your AI

The connector address is the same for all tools. Sign in with your email, and you're done within two minutes.

https://mcp.europaius.com/mcp

Connection Instructions →Pricing

Frequently Asked Questions

3
Can I call the server without MCP, using plain HTTP?

The protocol is JSON-RPC over HTTP, so technically yes, but the MCP SDK handles sessions, streaming and errors for you. We recommend using the SDK.

Is there a sandbox or test environment?

The free account with 100 queries per day serves as a test environment. The data is identical to production.

How do I report a bug or a missing source?

Via the contact form at europaius.com. For a missing source, please specify the country and document type.

Related Guides

4
How to add the Europaius MCP server to Claude Code, Cursor and VS Code with one command and use law and case l
How to connect legislation and case law to Microsoft Copilot, Copilot Studio and GitHub Copilot via the Europa
How the Europaius MCP connector is secured: OAuth 2.1 login with PKCE, what the server sees and doesn't, token
What it costs to connect the legal corpus to Claude, ChatGPT or Copilot: free account with 100 queries a day,

All Guides: Europaius for Lawyers: Sources, Anonymisation, Security · Laws & Case Law in Claude: Connect via MCP Connector · ChatGPT with Verified Legal Sources: Europaius Connector · Perplexity with the Europaius legal corpus: custom MCP connector · What is an MCP connector and why lawyers need it · Why AI Invents Case Law and How to Prevent It · AI in a Law Firm: Deployment with Verified Sources · AI for In-House Lawyers: Contracts, Compliance, Fast Answers · AI for Accountants and Tax Advisors: Laws and Case Law · Case Law Research with AI: NS, NSS and ÚS in One Chat · Comparing Law Across EU Countries with AI: One Query, 25 Countries · Employment Law with AI: Dismissals & Severance Pay · Tenancy Law and AI: Notice, Deposit, Rent Increases by Law · GDPR and AI Compliance: Regulation, Statute and Case Law Combined · Connector or Uploading a Law as a PDF? A Comparison · Statutory Interpretations in AI: Clear, No Hallucinations

This information is provided for general guidance only and does not constitute legal advice. Connecting the connector requires a Europaius account (free of charge). More About Europaius · Europaius CY