BGB (Germany)

io.arxoPublished by arxo.ioOfficial publisherv0.1.9Updated Oct 25, 2026

German Civil Code (BGB) as executable rules: periods, deadlines and more, answered with grounds

The publisher's own server: UN Charter 1945

VerifiedStreamable HTTPWeb executableKnowledge & MemoryData & Analytics

Overview

AI-generated overview

A remote or local MCP server that answers questions about the German Civil Code (BGB) by executing formalised rules, with grounds, sources and proof chains.

What you can do
Search formalised law and browse the catalogue of instruments, predicates and coverage boundaries, then read the rules behind a predicate before supplying facts to a question engine that returns answers or a why-not report of missing facts. Retrieve source excerpts or full text ranges, unfold a proof chain, and assess how robust a conclusion is under an argumentation profile. Reconstruct procedural stages and run a dated case log frame by frame, and compare editions of an instrument between two dates with a semantic diff. Prepare, publish and revoke frozen answer documents, run deterministic LawQL queries over a formalisation, and file divergence reports between formalisation and source.
When to use it
Useful when an assistant must reason about German civil law from a pinned, verifiable canon rather than free text: deadlines and periods, tenancy, succession, transitional law, default interest or revocation, and when answers need traceable grounds, sources and reproducibility.
Requirements
Either the hosted endpoint or a local process; the README describes a local Docker Compose setup and an npm package run with npx. No authentication, environment variables or headers are declared. The README notes the build and CI run offline with pinned dependencies.
Before you install
Publishing creates a public document and returns a separate revocation secret; anyone holding only the public id cannot revoke it, so the secret must be kept. Prepared documents are frozen for 24 hours. Answers are rule-derived legal output, not legal advice, and the README states that pinned publisher texts keep their own reproduction terms separate from the code licence.

Installation

In SourceWeft

  1. Open BGB (Germany) in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.arxo%2Fde-bgb/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "bgb-germany": {
      "type": "http",
      "url": "https://mcp.arxo.io/mcp/de-bgb"
    }
  }
}

README

arxo-bgb.git

[Smithery]

Pinned canon, executable as it stands: source text with provenance, the model built over it and the scenarios that check its answers. The norms here are data — they are executed by law; this repository carries no rule code of its own.

Contents

PackageVersionScenariosDependencies
calc.kinship0.1.0390
de.bgb.core0.1.010
doctrine.ius_privatum0.1.0370
de.bgb.fristen0.1.0861
de.bgb_18960.1.051
de.bgb.allgemeiner_teil0.1.0213
de.bgb.besitz_eigentum0.1.01432
de.bgb.betreuung0.1.01102
de.bgb.dienst_werk0.1.02102
de.bgb.ehe0.1.0573
de.bgb.ius_privatum0.1.013
de.bgb.miete0.1.0312
de.bgb.sonstige_vertraege0.1.04982
de.bgb.uebergang0.1.0152
de.bgb.dingliche_rechte0.1.01233
de.bgb.erbfolge0.1.0404
de.bgb.schuldrecht_at0.1.0514
de.bgb.verwandtschaft0.1.0824
de.bgb.bereicherung_delikt0.1.0715
de.bgb.kauf0.1.0905
de.bgb.verfuegungen0.1.0825

How it is verified

Every package is built by package.py with the pinned toolchain: compilation, §267 scenarios on both evaluators, replay of saved evaluations and a rebuild from the release itself. A failure of any step stops the build.

sh
python3 tools/toolchain.py download --lock toolchain.lock.json --out /tmp/law-toolspython3 /tmp/law-tools/package.py packages/<name> \    --lawc /tmp/law-tools/law-cli --offline --out /tmp/<name>-release

Dependencies

Dependency bytes are pinned under packages/<name>/deps/ and verified against the contentHash recorded in law.lock: the build and the CI are offline.

Asking these packages

Two ways, the same slice of the canon and the same engine; the difference is whose machine evaluates.

  • Hosted: https://mcp.arxo.io/mcp/de-bgb — requests are evaluated on Arxo infrastructure.
  • Local: docker compose -f mcp/compose.yml up — nothing leaves the machine.

mcp/pin.json records what either one must answer from: the content hash of the canon profile, the pinned packages, the ABI version of the engine and the availability of the hosted endpoint. An answer that cannot be traced to that pin is not this repository's answer.

Worked cases

Each collection is a case package of its own: the facts, the questions and the answers, with the pinned canon as its dependency. Ask one from its directory with law ask . — nothing is downloaded.

Rights

Code and model: see LICENSE. The pinned texts of the publishers keep their own terms of reproduction, listed per package in NOTICE; those terms are not covered by the code licence.

Maintainer: Rifat Dzhumagulov ([email protected]). Address: [email protected]:arxohq/arxo-bgb.git.

Source: README.md at commit 201d801

Tools

20

law_passport

Release passport

Passport of an exact release: purpose, interface, boundaries, checks and performance. The reports section holds the history of measurements, failures included. Entries are paged by JSON Pointer; next continues the answer.

ParametersnamerequiredlimitoffsetversionrequiredsectionscontentHashrequired

law_answer_capabilities

Lens capabilities

A machine-readable matrix of the Lens producers that are actually installed, of replay/projection checks, profiles, limits and the contract tests that confirm them. declared_only means a schema with no executable witness.

Takes no parameters.

law_capture_answer

Capture a result for a Lens

Run a registered producer and obtain producerControl/0.2 for a later verifiable preparation of a Lens. The producer is chosen only from the shipped registry.

Parametersrequestrequiredproducerrequired

law_prepare_answer

Prepare a public write-up

At the explicit request of the user, repeat between 1 and 12 earlier law_ask or law_process_run calls (the course of a case, DECISION-0160), compare their replayControl strictly, and prepare a non-public frozen document for 24 hours. The client never supplies the machine answer: the server obtains it only by executing afresh. A divergence in any input, in the law, in a resource, in the server code, in the engine library or in the result rejects the document as a whole.

ParameterslanguagequestionrequiredassistantcalculationsproducerRunsdocumentVersion

law_publish_answer

Publish a write-up

Publish a prepared document. Repeating it with the same preparationId idempotently returns the same URL and the same separate revocation secret.

ParameterspreparationIdrequired

law_revoke_answer

Revoke a write-up

Revoke a published document using its separate secret. The public id alone grants no control; revocation closes the HTML page, the API and the download.

ParameterspublicIdrequiredrevokeSecretrequired

law_packages

Catalogue of law

The catalogue of formalised law: instruments, predicates with signatures, the boundaries of coverage. This is where the NAMES of predicates come from — they must never be guessed. But do NOT start from the catalogue when looking for the right instrument: the overview is large, and the title of an instrument rarely matches the words of a question ("Newton's laws of motion" contains no word "physics"). A question in your own words goes to law_search first, which returns addresses; the catalogue is for the exact signature of what you found. With no arguments — the overview: one line per instrument (key, title, legal order, counters of rules, facts, signatures, norms, constants); a whole instrument — package="kz-gpk"; a search over the signatures, labels and constants of every instrument — query="substring". All three modes are PAGED: limit and offset, with the remainder named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call). The unit of a page is named by pageUnit: the overview and query page over INSTRUMENTS (20 and 20 by default), package=… pages over the SIGNATURES of one instrument (20 by default, 300 at most) — large codes carry thousands. package=… together with catalog=… pages a separate list of the instrument: "questions" — the CATALOGUE OF QUESTIONS (DECISION-0190): which enquiries are provided for (a question in words, a form, a predicate or norms) and what the instrument does NOT answer, with the type of reason; a card is a template of an enquiry, not an answer, and not every instrument has one; "norms" — the NORMS of the instrument (modality §107 and label), "constants" — the CONSTANTS (names of declarations). "task-guides" — TASK GUIDES (DECISION-0414): the order of applying a canon to a document — what to gather, which cards to ask and how to read the answers; a guide answers nothing. catalog="task-guides" is allowed without package too — every guide of the profile; guide=… — the d

Parametersguidelimitqueryoffsetcatalogpackage

law_ask

Ask the law

Put a question to formalised law. When the answer is "not established" it carries whyNot — the engine's why_not report §185: the candidate rules and the state of every conjunct (satisfied / not satisfied / undetermined); the missing facts are visible there and need not be guessed. BEFORE THE FIRST call obtain the predicate names through law_search (a question in your own words → addresses) or law_packages (the signatures of a known instrument) — an invented name will be rejected. If the tool returned an error or "not established", THAT IS THE ANSWER: pass it to the user and do not substitute general knowledge about the law of some other country. But "I found no suitable instrument" is NOT an answer until law_search has been asked: silence of the catalogue is a property of searching by title, not a conclusion about the corpus. kind='truth' — whether a fact is established (the answer follows §62: established / refuted / contradiction / not established); kind='collect' — enumerate the records; kind='deadline' — compute a time limit on the official calendar; kind='positions' — which DUTIES arose from the facts and what their statuses are (active / fulfilled / violated, §134–§138); kind='why_not' — the why_not report §185 on the same goal, whatever the status of the answer. The answer carries the rules applied, the warnings and the provenance with hashes; truth/collect also carry a signature block (parameter types, the closure of types, constants; DECISION-0139) for presentation. The server does not guess: where a norm is not formalised, the answer is "not established" or an error.

Parametersargscalcdayskindunitafterfactsproofcutofffocusedpackageversion+9 more

law_screen

Population screening

Build a necessary condition — a superset — for the preliminary selection of rows from an external source (DECISION-0120). This is NOT a legal answer and NOT SQL: the result is a typed tree and a manifest of the extensions up to TRUE. Every row that passes must then be computed in full by the engine, with a proof graph, on the same snapshot of the data. The binding is passed as a pinnable object; sourceSchemaContentHash is the actual hash of the source schema and is compared loudly with the pin. Case facts that carry provenance (origin, document, quote, extractor) are supplied to law_ask, not here. The confidence figure is read by the package EvidencePolicy, not by this tool and not by the engine.

ParametersgoalrequiredbindingrequiredpackagerequiredlegalTimesourceSchemaContentHashrequired

law_rules

Rules of inference

The rules of formalised law put into words: exactly how a predicate is derived (premises, source articles). Call this BEFORE supplying facts to law_ask — the rules say which facts are needed instead of leaving them to be guessed. For large instruments package=… returns a table of contents; the full text comes from predicate=…. The listing by package is paged: limit (20 by default, 500 at most) and offset; the remainder is named in the text (`showing a–b of N; k more`) and in structuredContent (total, truncated, next — a ready-made continuation call).

Parameterslanglimitoffsetpackagepredicate

law_explain

Unfold the proof

Unfold the proof of a law_ask answer into a chain "rule ← premises → conclusion". The compact input: question (the original law_ask arguments, truth/collect), resultHash and codeHash from the provenance of the answer. The server repeats the computation and compares the hashes; if anything changed it refuses explicitly. Alternatively pass the evaluation from law_ask(proof=true). answerResource=fullAnswer.uri explains a stored compact snapshot without recomputing and without the client loading pages; by default only the proofRef chain. nodeId selects one node and all of its premises (up to 24 KB, otherwise an explicit refusal). proofHash refers to the whole graph; scope marks the part selected.

ParametersnodeIdcodeHashquestionevaluationresultHashanswerResource

law_case_ask

Case package: ask

Die Operation ask §168.4 (DECISION-0165, DECISION-0399): eine registrierte Sache eines Fallpakets über ihren verankerten Abhängigkeiten ausführen und das kanonische Auswertungsdokument mit Beweis und Manifest zurückgeben. Die Frage ist JSON nach query.schema.json (query), eine evaluate-Zeichenkette (evaluate + queryId), eine gespeicherte queryId ohne query oder card + args. Eine Verweigerung der Vorbereitung ist ein Fehler mit LDC-*-Code, nie eine leere Antwort.

ParametersargscardcasequerypackagerequiredqueryIdevaluate

law_sources

Official text

Sources: by default short excerpts (view=summary), 5 texts per page, with the address of the full text in fragments[].full. Either package or fragment is required (a StableId from law_search/law_rules). view=full returns exact parts of the text: textRange sets a range of Unicode characters, fragments[].next is the continuation with a contentHash. The hash refers to the WHOLE source, not to the excerpt or the part. textOffset/textLimit require fragment; a continuation requires contentHash. Lists are paged with offset/limit; the answer budget may shrink a page.

ParametersviewlimitoffsetstatuspackagefragmentlanguagetextLimittextOffsetcontentHash

law_argue

Robustness of a conclusion

How robust a conclusion is: the map of the dispute under the argumentation profile §274 (DECISION-0039). The answer falls into four classes: SKEPTICALLY_ACCEPTED — the conclusion is invulnerable (it survives in the grounded extension); CREDULOUSLY_ACCEPTED — merely defensible (there is a position for it and a position against); REJECTED — it survives nowhere; NO_ARGUMENT — there are no arguments at all. It builds ALL arguments out of the facts and the rules of the instrument (chains that did not fire in ordinary inference included), the rebut/undermine/undercut attacks and the defeats by priority. Predicate names come from law_packages. On large instruments a refusal by cap is possible — narrow facts or raise limits.maxArguments.

ParametersargsfactslimitspackagelegalTimepredicaterequired

law_process

The instrument as a procedure

Which stages the procedure established by an instrument consists of, and whether it carries a structural defect (O-5, DECISION-0052). The stages, the transitions and the condition of every transition are reconstructed from the formalisation rather than retold: what leads from where to where, and under what condition. The check of the graph: unreachable stages, dead transitions, a transition that enters no stage at all. Without package — the list of instruments whose procedure is formalised. A stage with no exit is named but is NOT counted as a defect: whether it is terminal by design cannot be seen from the formalisation.

Parameterspackage

law_process_run

The course of a case

How a particular case will run, step by step (O-5, DECISION-0052): a log of {date, attempt?, facts?} is executed frame by frame, and the law of each frame is the law of ITS date. The answer says: which stages have been entered; which attempted transition produced NO legal effect (§164 — "the act was performed but did not take place"); which duties are violated and which time limits are running; what is available next and WHAT EXACTLY is missing for the rest. The names of transitions come from law_process. Stages entered means "was it ever entered", not "where it is now": the core 0.1 does not compute points of the current state.

ParametersstepsrequiredpackagerequiredinstancerequiredlegalTimeprobeTimeprocedure

law_editions

Axis of editions

The axis of editions (O-2): what changed in an instrument between two dates of the law — the state of the editions, the dating of the norms and the semantic diff §215 between the D1 projections. The verdict NOT_DATED means "there was nothing to date it by", not "nothing changed". The outcome of a particular question on a date comes from law_ask with legalTime.

ParametersdateArequireddateBrequiredpackagerequired

law_query

LawQL query

Eine deterministische LawQL-Abfrage über das CLIR einer Formalisierung: eine Frage an das Modell des Aktes selbst, nicht an einen Fall. Relationen: nodes(id,kind,package,package_name,path), edges(from,to,role), anchors(node,anchor,act,locator,path), labels(node,lang,text,status), fields(node,field,value,value_kind), rules(id,strength,head_predicate,head_polarity,head_variables,body_variables,body_predicates), norms(id,modality,goal_kind,condition_predicates), positions(norm,kind,bearer_type), windows(norm,kind,deadline), imports(package,imported,semantic_hash), links(from,to,kind: imports|alias|subtype|produces|reads|anchored), literals(node,context,predicate,polarity), variables(node,context,name,type), interpretations(id,predicate,role). Funktionen: anchor, labels, short, contains, overlaps, starts_with, ends_with, position, derivation; exists/not exists über eine gebundene Variable; nur Gleichheit und Mitgliedschaft, keine Arithmetik und keine Ordnungsvergleiche. Bereich: corpus nach package.name (zum Beispiel kz.corpus.labour_code, kein Dateiname) oder ein Glob; ohne corpus der gesamte Profilausschnitt; ein Bereich außerhalb des Profils ist leer (CORPUS_EMPTY). Beispiele: `from r in rules where r.head_predicate == "urn:…#eligible" select r.id as producer, r.strength as strength, anchor(r.id) as anchors` — wer erzeugt; `from l in literals where l.predicate == "urn:…#eligible" select l.node as reader, l.context as context` — wer liest; `query eligible over "pkg" { for x: Person; where applicant(x); select eligible(x); }` — Inferenz durch den Kern. Dies ist Orchestrierung über CLIR und Kern; neue juristische Semantik wird hier nicht implementiert. Statt Text eine Frage aus dem Katalog mit arguments: producers, readers, anchors-of, imports-of, links-of, type-step (die Parameter predicate/node/type sind URNs, pkg ein package.name oder ein Glob). Die strukturelle Antwort ist eine queryPage: resultHash des vollständigen queryResult, snapshot (Hash der Paketliste des Be

ParameterscasefulllimitquerycorpusenginequestionrowLimitsnapshotargumentsrowOffset

law_report

Report a divergence in the formalisation

A REPORT of a divergence between the formalisation and the source: the answer contradicts the pinned text, a norm of the source is not expressed by a rule, a §218 label diverges from the text, an address cannot be found. A report is a hypothesis for triage by a formaliser: it does NOT change the law, it never reaches the answers of the other tools, and "not derived" does not become "derived" because of it. An address is required and is checked against the catalogue: package, fragment (a StableId from law_sources) and/or predicate; callId is the X-Law-Call-Id of the answer you disagree with. The entry goes into the server log.

ParameterscallIdpackagerequiredcategoryrequiredexpectedrequiredfragmentobservedrequiredpredicate

Version history

2
  1. v0.1.9LatestOct 15, 2026
  2. v0.1.8Oct 14, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Arxo integrations