> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the Legal Data Hunter MCP server

The Legal Data Hunter MCP connector routes your AI agent's tool calls to Legal Data Hunter's own MCP server through Scalekit. Each user signs in to Legal Data Hunter once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 7 tools.

**Authentication:** OAuth 2.1/DCR
**Categories:** Search, Analytics
**Tools:** 7: 6 read, 1 write, 0 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=LEGALDATAHUNTERMCP)

## What you can do

- **Search legal sources**: find statutes, regulations, case law, and official doctrine across many jurisdictions
- **Resolve citations**: turn an informal legal citation into the exact matching document
- **Read legal documents**: retrieve a document's text snippet or its complete body
- **Browse coverage**: list available countries, data sources, and filter values such as courts, chambers, and date ranges

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Legal Data Hunter MCP connection

   In **AgentKit > Connections**, create a Legal Data Hunter MCP connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Legal Data Hunter MCP server, so you don't need to register an OAuth app.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'legaldatahuntermcp'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Legal Data Hunter MCP:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'legaldatahuntermcp_discover_countries',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "legaldatahuntermcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Legal Data Hunter MCP:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="legaldatahuntermcp_discover_countries",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'legaldatahuntermcp_discover_countries',
  toolInput: {},
  connector: 'legaldatahuntermcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="legaldatahuntermcp_discover_countries",
    tool_input={},
    connection_name="legaldatahuntermcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `legaldatahuntermcp_discover_countries`

Discover Countries · Read-only

List all available countries with their document counts and source counts. Returns LDH jurisdiction codes (mostly ISO 3166-1 alpha-2, plus supranational codes like EU, UN, CoE, INTL, OECD) with case law, legislation, and doctrine source counts and total document counts. This is the authoritative list of valid country codes to use in search and resolve_reference.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `legaldatahuntermcp_discover_sources`

Discover Sources · Read-only

List all data sources available for a specific country. Returns source IDs, data_types (namespaces each source covers: "case_law", "legislation", or "doctrine"), court names, tiers, document counts, and date ranges. Use this to understand what data is available before filtering a search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `country_code` (`string`, required): LDH jurisdiction code for the country whose sources to list, e.g. "FR", "DE", "EU".
- `include_empty` (`boolean`, optional): If true, include sources with zero indexed documents (placeholders awaiting backfill). Default: `false`.

Example input: `{"country_code":"FR"}`

### `legaldatahuntermcp_get_document`

Get Document · Read-only

Retrieve a legal document by its source and source_id. Returns a 2 KB text snippet by default; pass include_full_text=true to inline the complete document body. Use source and source_id values from search or resolve_reference results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source` (`string`, required): Source identifier for the legal database, e.g. "FR/Judilibre" or "DE/BVerfG".
- `source_id` (`string`, required): Document identifier within the specified source.
- `include_full_text` (`boolean`, optional): If false (default), text is truncated to the leading 2 KB with text_truncated=true. Set true to return the full document text inline. Default: `false`.

Example input: `{"source":"FR/Judilibre","source_id":"<source_id>"}`

### `legaldatahuntermcp_get_filters`

Get Filters · Read-only

Get available filter values for a specific data source. Returns distinct courts, jurisdictions, chambers, decision types, languages, court tiers, and date ranges that can be used to refine search results. For sources spanning multiple namespaces, pass namespace to select which namespace's filters to return.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `source` (`string`, required): Source identifier to get filters for, e.g. "FR/Judilibre" or "AT/RIS".
- `namespace` (`string`, optional): Optional namespace — "case_law", "legislation", or "doctrine". Required for sources spanning multiple namespaces; otherwise the namespace with the most rows is used.

Example input: `{"source":"FR/Judilibre"}`

### `legaldatahuntermcp_resolve_reference`

Resolve Reference · Read-only

Resolve a loose legal citation or reference to the exact matching document(s). Given an informal citation like "art. 6 code civil", "BVerfG 1 BvR 123/20", or "Regulation (EU) 2016/679", finds and returns the precise record. Supports ECLI, CELEX, article numbers, case numbers, NOR identifiers, and informal abbreviations.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `reference` (`string`, required): Legal reference string to resolve, e.g. "art. 6 code civil", "ECLI:FR:CCASS:2006:CO00559".
- `hint_country` (`string`, optional): LDH jurisdiction code to scope resolution (ISO 3166-1 alpha-2 or supranational codes like EU, CoE, INTL). Strongly recommended — roughly doubles the resolution rate.
- `hint_type` (`string`, optional): Type hint to further narrow resolution — "legislation" or "case_law".
- `include_full_text` (`boolean`, optional): If false (default), each returned document's text is truncated to the leading 2 KB. Set true to inline the full text in this response. Default: `false`.

Example input: `{"reference":"art. 6 code civil"}`

### `legaldatahuntermcp_search`

Search · Read-only

Search the world's fastest-growing legal database using hybrid semantic and keyword matching. Use this for anything touching the law: statutes, regulations, case law, official doctrine, or multi-jurisdictional and comparative legal questions. Covers tens of millions of primary-source documents across 230+ jurisdictions.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Natural language search query describing the legal topic or question.
- `alpha` (`number`, optional): Balance between semantic and keyword search (1.0 = pure semantic, 0.0 = pure keyword). Default: `0.7`.
- `country` (`array`, optional): Filter by LDH jurisdiction codes (ISO 3166-1 alpha-2 or supranational codes like EU, UN, CoE, INTL, OECD).
- `court_tier` (`integer`, optional): Filter by court tier (1 = supreme, 2 = appellate, 3 = first instance).
- `date_end` (`string`, optional): End date filter in YYYY-MM-DD format.
- `date_start` (`string`, optional): Start date filter in YYYY-MM-DD format.
- `jurisdiction` (`string`, optional): Filter by jurisdiction name such as "civil" or "criminal".
- `language` (`string`, optional): Filter by language code, e.g. "fr" or "de".
- `namespace` (`string`, optional): Collection to search — "case_law", "legislation", or "doctrine". Default: `case_law`.
- `source` (`array`, optional): Filter by source ID(s) from discover_sources, e.g. ["FR/Judilibre", "FR/CNIL"].
- `subdivision` (`string`, optional): Filter by geographic subdivision using ISO 3166-2 codes, e.g. "DE-BY" or "US-CA".
- `top_k` (`integer`, optional): Number of results to return (1–100). Default: `10`.

Example input: `{"query":"<query>"}`

### `legaldatahuntermcp_report_source_issue`

Report Source Issue · Write

Report an issue with a data source to the platform maintainer. Use this to flag problems encountered during research — missing data, broken URLs, indexing errors, or data quality issues. Reports are reviewed by the Legal Data Hunter team. Does not count against your usage quota.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `issue_type` (`string`, required): Type of issue — one of: "unavailable", "indexing", "invalid_url", "data_quality", "other".
- `source` (`string`, required): Source identifier for the data source being reported, e.g. "FR/Judilibre" or "AT/RIS".
- `description` (`string`, optional): Free-text description of the problem encountered. Default: ``.

Example input: `{"issue_type":"<issue_type>","source":"FR/Judilibre"}`

## Related

Other Search connectors ([all 36](/agentkit/connectors/?category=search)):

- [Supadata](/agentkit/connectors/supadata/): Scalekit connector, API key, 21 tools
- [Exa](/agentkit/connectors/exa/): Scalekit connector, API key, 21 tools
- [Brave Search](/agentkit/connectors/brave/): Scalekit connector, API key, 18 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
