LexGraph MCP documentation

Current public reference for connecting LexGraph to MCP-compatible AI assistants.

Current public reference for connecting LexGraph to MCP-compatible AI assistants.

MCP schema 3.1.0 · updated September 28, 2026

Connection and authentication

LexGraph provides a stateless Streamable HTTP endpoint. Requests and responses use JSON; the production endpoint does not stream SSE progress notifications.

MCP URL: https://api.lexgraph.de/mcp

Transport
MCP Streamable HTTP
Authentication
OAuth 2.0 or MCP key
OAuth scope
mcp
Response mode
one JSON response per request

OAuth 2.0 (recommended)

OAuth-capable clients connect through Dynamic Client Registration and Authorization Code with PKCE. The client handles registration, token exchange and refresh automatically.

  1. Add the MCP URL as a custom remote MCP server in your client.
  2. Choose OAuth 2.0 with Dynamic Client Registration if your client asks.
  3. Sign in to LexGraph and approve the connection.
  4. After the redirect, the client loads the current LexGraph tool list.

MCP key (for header authentication)

Clients without OAuth can use a personal MCP key. Create it in your LexGraph profile and send Authorization: Bearer <MCP_KEY>. The complete key is shown once; rotation revokes the previous key but does not reset quota.

Available tools

lexgraph_search_legal_graph
Creates a finished legal memorandum server-side, with LexGraph permalinks and a binding verbatim response contract.
lexgraph_search_legal_graph_enriched
Creates the same memorandum and additionally returns the entities actually cited as machine-readable context for later questions.
lexgraph_search_legal_data
Uses the same Engine research paths without generating an answer. For an unambiguously identified court decision, its description contains the available full-text sections.
lexgraph_get_capabilities
Returns the schema version, server-selected search paths, plan-dependent data sources, filter values, limits, and idempotency contract.
lexgraph_get_mcp_usage
Returns the current plan and quota snapshot without consuming quota.

All five tools are read-only, non-destructive and limited to public LexGraph data. Diagnostics and development controls remain in the local admin preview. Unknown arguments are rejected.

Parameters and responses

lexgraph_search_legal_graph

ParameterDefaultMeaning and values
queryrequiredRequired complete contents of the original user message, copied character-for-character. Do not shorten, rewrite, translate, or decompose it client-side; maximum 20,000 characters or the lower account limit.
request_idnullOptional stable retry ID of 8–128 characters: letters, digits, period, underscore, colon and hyphen.
filtersnullOptional filters object matching the API, only for restrictions explicitly requested by the user. Omitted, null, or empty filters leave the search unfiltered.

lexgraph_search_legal_graph_enriched

ParameterDefaultMeaning and values
queryrequiredRequired complete contents of the original user message, copied character-for-character. Do not shorten, rewrite, translate, or decompose it client-side; maximum 20,000 characters or the lower account limit.
request_idnullOptional stable retry ID of 8–128 characters: letters, digits, period, underscore, colon and hyphen.
filtersnullOptional filters object matching the API, only for restrictions explicitly requested by the user. Omitted, null, or empty filters leave the search unfiltered.

lexgraph_search_legal_data

ParameterDefaultMeaning and values
queryrequiredRequired complete contents of the original user message, copied character-for-character. Do not shorten, rewrite, translate, or decompose it client-side; maximum 20,000 characters or the lower account limit.
request_idnullOptional stable retry ID of 8–128 characters: letters, digits, period, underscore, colon and hyphen.
filtersnullOptional filters object matching the API, only for restrictions explicitly requested by the user. Omitted, null, or empty filters leave the search unfiltered.

lexgraph_get_capabilities

No parameters. Returns schema_version, the paths lexgraph_legal_agent, lexgraph_cases, and lexgraph_entity, plan-dependent data sources, search.filters with filter values and limitations, fixed Engine limits, and the request_id/idempotency contract. This tool does not consume research quota.

lexgraph_get_mcp_usage

No parameters. Returns the plan and limit, remaining, used and reset_at for the research quota. This call does not consume quota.

Search response

  • LexGraph Memorandum returns answer followed by response_contract with mode=verbatim, output instruction, citation standard, and SHA-256 checksum.
  • LexGraph Memorandum Enriched adds searchable_entities. This is background context only and must not be appended to the visible answer.
  • LexGraph Legal Data returns trace_id, original_query, search_mode, count, entities, quota_charged, and usage, but no answer.
  • For an unambiguous direct lookup of a court decision, the primary entity description contains available sections such as headnotes, operative provisions, facts, and decision grounds.
  • Statute entities may contain book, slug, and prefix_category; resolvable sources contain citation-ready Markdown permalinks.
  • Internal reranking scores, diagnostics, and local development controls are not returned publicly.

Optional filters

All three research tools accept the same filters object as the API. The assistant sets it only for explicitly requested restrictions, does not infer additional filters from context, and keeps query unchanged.

ParameterMeaning and values
rechtsgebieteList of strings, e.g. ["Arbeitsrecht"]. Recommended values are advisory, not a closed enum.
regionenList containing Bund, EU, or German federal-state names. Uses the same spelling normalization and validation as the API.
gerichteList of standardized court codes, e.g. ["BAG", "BGH"]. Other strings are accepted, as in the API.
zeitraumObject with optional von and/or bis in YYYY-MM-DD format. Both boundaries are inclusive; von must not be later than bis.
  • All four fields are optional. Values within a list use OR; different applicable fields use AND.
  • Court decisions support all four fields, statutes support legal area and region, and concepts support legal area only. Court and date filters do not exclude statutes or concepts.
  • EU statutes and European decisions are currently excluded when filters are active. State-law coverage matches the API.
  • Filters apply to every search path, including direct lookups and additional sources. Empty results do not automatically relax the filters.
  • Unknown fields, invalid regions, and invalid date ranges are rejected before retrieval or quota consumption.
  • lexgraph_get_capabilities publishes supported regions, recommended legal areas and court codes, and current limitations under search.filters.
View all API filter values and current coverage

Search modes, collections and plans

ModeUse caseSelection
lexgraph_legal_agentDefault path with internal question decomposition, Engine retrieval, entity lookup, and reranking.selected server-side
lexgraph_casesAutomatic specialist path for pure case-law research.selected server-side
lexgraph_entityAutomatic direct lookup for an unambiguously resolvable statute or decision.selected server-side
PlanShared Engine & MCP quotaCollections (standard modes)Memorandum
Free25 total / 10 trial daysconcepts, laws, court_cases, nachweiseYes
Basic50 / monthlaws, court_casesYes
Advanced100 / monthconcepts, laws, court_casesYes
Professional200 / monthconcepts, laws, court_casesYes
EnterpriseCustomconcepts, laws, court_casesYes

Collections unavailable on the plan are filtered server-side. If none remain, the call fails.

Additional technical account limits

  • 30 requests per minute
  • 1,000 requests per day
  • 2,000,000 request characters per month
  • maximum 20,000 characters per request
  • research breadth and candidate count are selected server-side

Example calls

Inspect the current account capabilities

{}

Memorandum with a safe retry ID

{
  "query": "Which German labour-law decisions by the BAG since 2020 are relevant?",
  "request_id": "search-20260928-001",
  "filters": {
    "rechtsgebiete": [
      "Arbeitsrecht"
    ],
    "gerichte": [
      "BAG"
    ],
    "zeitraum": {
      "von": "2020-01-01"
    }
  }
}

Quotas and safe retries

  • Research in the LexGraph Engine and successful MCP searches share the same account quota.
  • The Free trial includes statutes, court decisions, commentaries, references and Agentic Search (Memorandum), with a total of 25 research requests shared by Engine and MCP. New accounts receive ten days after account creation; existing accounts receive ten days after the trial rollout. No payment details are required. After the trial expires or the quota is used up, further AI research requires a paid plan. The trial ends automatically and does not automatically turn into a paid subscription. Manual search in the publicly accessible legal database remains free.
  • A successful search consumes one research call from the shared research quota plus normal request and character usage. Failed searches are not charged. See reset_at for the next renewal.
  • Plan entitlements and quota are enforced server-side on every call; capabilities and usage expose read-only status snapshots.
  • request_id is optional for search. Reusing it with identical parameters within eight days is not charged twice; reuse with different parameters, including active filters, is rejected. List order and normalized region spellings do not change the retry comparison.
  • Quota is tied to the user account. Rotating an MCP key does not reset it.

Errors and error codes

  • HTTP 401: authentication is missing, invalid or expired.
  • HTTP 403: the required scope or account access is missing.
  • JSON-RPC -32601: unknown or removed tool.
  • JSON-RPC -32602: invalid parameters, unknown fields or unsupported values.
  • Tool error: quota exceeded, plan disallows a mode/collection, request_id conflict or internal retrieval failure. Tool errors are not necessarily HTTP errors.

Privacy and data use

MCP query anonymization is currently disabled. The validated query is passed to the configured retrieval and model providers. LexGraph also processes supplied filters and other research parameters. The account ID is used for access control, usage analytics, and quota accounting. MCP tools do not upload documents, access private user documents, or modify the knowledge graph. MCP HTTP profiling records technical metadata, not research queries or authentication tokens; separate research logs may contain queries and results.

Known limitations

  • Memorandum and Memorandum Enriched return a finished answer; only Legal Data leaves drafting to the connected assistant.
  • Coverage depends on material currently available in LexGraph and may be incomplete.
  • Search mode, sources, decomposition, candidate count, and reranking are exclusively server-selected in version 3.1.0 and are not public tool arguments.
  • Only an unambiguous direct decision lookup through Legal Data can include available full-text sections in description; a general case-law search does not guarantee a complete decision text.
  • searchable_entities from the Enriched tool is machine-readable context only and must not be emitted alongside the finished answer.
  • Progress is reported internally only after 45 seconds; the production JSON endpoint does not stream it to HTTP clients.
  • Results are research aids and do not replace professional legal assessment.

Changelog

3.1.0 · 28 September 2026

  • Added the optional filters object to Memorandum, Memorandum Enriched, and Legal Data, with the same values and validation as the API.
  • Filters are set only for explicitly requested restrictions and apply to every search path.
  • Active filters are normalized for the request_id comparison. Retries without filters remain compatible.
  • Capabilities describe filter values and limitations. Refresh the MCP client tool list after updating; existing calls without filters remain valid.

3.0.0 · 21 August 2026

  • The public MCP now calls the same implementation functions as the internal Answer Preview, so preview and publication share one execution path.
  • The public contract now contains five read-only tools: Memorandum, Memorandum Enriched, Legal Data, Capabilities, and Usage.
  • Version 3.0.0 accepted only query and optional request_id for the three research tools; version 3.1.0 adds filters. Clients copy the original user message verbatim; the server selects mode, sources, decomposition, limits, and reranking.
  • Memorandum returns answer plus a cryptographically verifiable response_contract and requires verbatim output. Enriched adds only cited searchable_entities; Legal Data returns entities without a finished answer.
  • Automatic routing uses lexgraph_legal_agent, lexgraph_cases, or lexgraph_entity. The previous client-selected modes and search parameters are not part of the public v3 schema.
  • Statute results may contain book, slug, and prefix_category; permalinks and citation metadata remain part of serialized entities.
  • Raw diagnostics and development controls stay in the protected local preview, while its default paths run the same functions as /mcp.

2.3.1 · 19 August 2026

  • The default MCP search limit changed from 40 to 30 results.

2.3.0 · 19 August 2026

  • The search mode selection was reduced to embeddings, graph_search, and agentic_search.
  • Graph Search now handles standard routing and retrieval fallbacks.

2.2.2 · 18 August 2026

  • The default MCP search limit increased from 20 to 40 results.

2.2.1 · 18 August 2026

  • embeddings is now the default MCP search mode; graph_search remains available explicitly.

2.2.0 · 14 August 2026

  • lexgraph_get_capabilities now returns the complete current legal-area and standardized-court recommendations under search.filters.recommended_values.
  • Recommendations remain open to future or database-specific values and are not enforced as closed input enums.

2.1.0 · 14 August 2026

  • Added the optional filters object for legal area, region, court, and date range.
  • Documented source-aware AND/OR semantics and state statutes retrieved through configured Arango Views.
  • Temporarily excluded EU statutes and European decisions when filters are active.

2.0.1 · 1 August 2026

  • Added lexgraph_get_capabilities and the 2.0.1 schema contract.
  • Made limit=20 an explicit schema default; use a lower value only when the user asks for fewer results.
  • Documented plan-specific collections, agentic availability and shared research quotas.
  • Added request_id, quota_charged, effective parameters and response contracts.

2.0.0 · 1 August 2026

  • Introduced four search modes, quality-control behavior and strict parameter schemas.
  • Documented optional relationships.
  • Removed legacy answer and reference-extraction tools.

Support

For technical questions and incident reports, contact MCP support at office@lexgraph.de.