Servidor MCP

CausalLayer MCP

io.github.smq9sn5jck-coder/causallayer
Legal y cumplimiento Público y accesible MCP 2025-11-25

Qué hace este MCP

Extracts and evaluates AI incidents, deterministically attributes liability, applies jurisdiction overlays and remediation scenarios, and verifies signed, anchored certificates.

evaluate_prospective_response
Deterministic prospective-evaluation gate (FK-METHOD-2026-006). Pass a ProposedAction BEFORE the agent delivers a response; receive one of three verdicts: 'allow', 'require_revision' (with specific factor-keyed directives), or 'block'. Uses the same four-factor engine that issues post-hoc certificates, so a single incident chains: prospective_pre_image -> response -> certificate -> anchor. This is a policy gate on structured action metadata, NOT a content safety classifier on raw prose. Thresholds are per-jurisdiction (EU strictest, US most permissive); read via GET /api/v2/gate/thresholds. Overrides are allowed but REQUIRE a governance rationale so the audit trail is complete. Cost: 1 credit. Pure deterministic.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['action'], 'properties': {'action': {'type': 'object', 'required': ['action_id', 'action_type', 'acting_agent_id', 'acting_agent_type', 'severity_estimate'], 'properties': {'eu_flags': {'type': 'object', 'properties': {'high_risk_ai': {'type': 'boolean'}, 'pld_compensable_damage': {'type': 'boolean'}, 'human_oversight_unassigned_or_unqualified': {'type': 'boolean'}}, 'description': "Optional EU AI Act flags; only used when jurisdiction === 'EU'."}, 'action_id': {'type': 'string', 'description': 'Stable id for this action; echoed back.'}, 'action_type': {'enum': ['llm_response', 'tool_call', 'code_execution', 'external_api_call', 'human_handoff', 'data_modification', 'financial_transaction', 'medical_advice', 'legal_advice', 'financial_advice', 'content_moderation', 'autonomous_decision', 'other'], 'type': 'string', 'description': 'The action category. Carries inherent regulatory weight.'}, 'jurisdiction': {'enum': ['AU', 'EU', 'US', 'UK', 'CA'], 'type': 'string', 'description': 'Jurisdiction overlay; defaults to AU.'}, 'cascade_depth': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0, 'description': 'How many upstream agents this action is downstream of. 0 = root; 3 = LLM->agent->tool->this. Applies cascade attenuation.'}, 'context_flags': {'type': 'object', 'properties': {'regulated_domain': {'type': 'boolean'}, 'irreversible_if_executed': {'type': 'boolean'}, 'human_in_the_loop_present': {'type': 'boolean'}, 'affects_vulnerable_population': {'type': 'boolean'}}, 'description': 'Context flags that inform the regulatoryAlignment and controllability sub-scores.'}, 'acting_agent_id': {'type': 'string', 'description': 'Free-form id of the agent issuing the action.'}, 'acting_agent_type': {'enum': ['ai_system', 'vendor', 'deployer', 'operator', 'human_user', 'third_party'], 'type': 'string', 'description': 'Liability-bias category of the acting agent.'}, 'severity_estimate': {'enum': ['low', 'medium', 'high', 'critical'], 'type': 'string', 'description': 'The estimated severity if the action goes wrong.'}, 'upstream_incident_id': {'type': 'string', 'description': 'Optional chain to an existing incident trace.'}}, 'description': 'The structured ProposedAction to evaluate.'}, 'overrides': {'type': 'object', 'required': ['rationale'], 'properties': {'rationale': {'type': 'string', 'description': "REQUIRED when overrides are provided. Cite the governance basis (e.g. 'ISO/IEC 42001 SoA §3.2 approval')."}, 'allow_below': {'type': 'number', 'maximum': 1, 'minimum': 0}, 'block_at_or_above': {'type': 'number', 'maximum': 1, 'minimum': 0}}, 'description': 'Optional per-call threshold override. Rationale REQUIRED for audit.'}}}
extract_incident
Claude-powered structured extractor. Parses unstructured text (news articles, court filings, emails, PDFs, incident reports, logs) into the typed JSON schema required by submit_incident. Returns a ready-to-submit incident object with extracted agents, events, severity, jurisdiction, and financial impact. NOTE: This is a pre-processing convenience tool — the deterministic scoring engine itself remains LLM-free. Cost: 10 credits.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['text'], 'properties': {'text': {'type': 'string', 'maxLength': 50000, 'minLength': 20, 'description': 'Unstructured text to extract from. Can be a news article, court filing, incident report, email, PDF text, log output, or any description of an AI incident.'}, 'context_hint': {'type': 'string', 'description': "Optional hint about the source type (e.g., 'court filing', 'news article', 'internal incident report') to improve extraction accuracy."}, 'jurisdiction_hint': {'type': 'string', 'description': "Optional ISO country code hint if the jurisdiction is known (e.g., 'AU', 'US', 'EU')."}}}
get_anchor_status
Return the index of all CausalLayer Tessera anchor batches, or one batch's full JSON (signed Merkle root, leaves, OpenTimestamps proof reference). FREE.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'version': {'type': 'string', 'description': "Optional anchor version, e.g. '2026-05-16-v1.6.4-simulation-calibration'."}}}
query_issuer_registry
Return the CausalLayer issuer registry, or one issuer record. The registry lists all trusted public-key fingerprints, key algorithms, validity windows, and the anchor-log repo for each active issuer. FREE — no API key required.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'issuer_id': {'type': 'string', 'description': "Optional issuer id, e.g. 'causallayer-prod-2026-q2'. If omitted, returns the full registry."}}}
query_jurisdiction_overlay
Multi-jurisdiction overlay (FK-METHOD-2026-004). Given a canonical attributable apportionment (party-id -> share), the union of all jurisdiction role tags on each actor, and the union of jurisdiction-specific flags, return side-by-side post-overlay shares for AU, EU, US, UK, CA (or a chosen subset) with the specific rules that fired in each, citation URLs, and a parties × jurisdictions matrix. v1 ships full implementations for AU and EU; US/UK/CA are research stubs marked `is_stub: true`. Use GET /api/v2/jurisdiction/catalog to discover support and stub status. Cost: 1 credit. Pure deterministic.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['attributable', 'actors', 'flags'], 'properties': {'flags': {'type': 'object', 'properties': {'high_risk_ai': {'type': 'boolean'}, 'vaiss_adherent': {'type': 'boolean'}, 'vendor_no_docs': {'type': 'boolean'}, 'acl_major_failure': {'type': 'boolean'}, 'ai_is_opaque_black_box': {'type': 'boolean'}, 'pld_compensable_damage': {'type': 'boolean'}, 'deployer_destroyed_logs': {'type': 'boolean'}, 'cps230_thirdparty_breach': {'type': 'boolean'}, 'cps230_operational_breach': {'type': 'boolean'}, 'is_apra_regulated_service': {'type': 'boolean'}, 'deployer_ignored_risk_signal': {'type': 'boolean'}, 'substantial_modification_present': {'type': 'boolean'}, 'defendant_failed_disclosure_order': {'type': 'boolean'}, 'provider_breach_was_unforeseeable': {'type': 'boolean'}, 'substantial_modification_severity': {'type': 'number', 'maximum': 1, 'minimum': 0}, 'deployer_employer_no_worker_notice': {'type': 'boolean'}, 'deployer_input_data_unrepresentative': {'type': 'boolean'}, 'deployer_public_authority_unregistered': {'type': 'boolean'}, 'deployer_used_contrary_to_instructions': {'type': 'boolean'}, 'provider_failed_to_supply_instructions': {'type': 'boolean'}, 'human_oversight_unassigned_or_unqualified': {'type': 'boolean'}, 'deployer_failed_serious_incident_notification': {'type': 'boolean'}, 'human_oversight_nominally_assigned_not_present': {'type': 'boolean'}}, 'description': 'Union of jurisdiction-specific flags. AI Act / PLD flags drive the EU overlay; ACL / CPS 230 / VAISS flags drive the AU overlay.'}, 'actors': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'type'], 'properties': {'id': {'type': 'string'}, 'type': {'enum': ['ai_system', 'vendor', 'deployer', 'human_operator', 'user', 'third_party'], 'type': 'string'}, 'eu_resident': {'type': 'boolean'}, 'acl_supplier': {'type': 'boolean'}, 'unrecoverable': {'type': 'boolean'}, 'apra_regulated': {'type': 'boolean'}, 'eu_chain_member': {'type': 'array', 'items': {'enum': ['manufacturer', 'authorised_representative', 'importer', 'fulfilment_service_provider', 'distributor', 'online_platform_self_supplier', 'substantial_modifier'], 'type': 'string'}}}}, 'description': 'All actors with the union of jurisdiction-specific role tags. EU and AU tags coexist on the same actor record.'}, 'attributable': {'type': 'object', 'description': 'Canonical pre-overlay apportionment as { party_id: share }. Sum should approximate 1.0; the function renormalises within tolerance.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'number', 'maximum': 1, 'minimum': 0}}, 'jurisdictions': {'type': 'array', 'items': {'enum': ['AU', 'EU', 'US', 'UK', 'CA'], 'type': 'string'}, 'description': 'Optional subset to compute. Defaults to all five.'}, 'primaryJurisdiction': {'type': 'string', 'description': "Engine-level jurisdiction string (e.g. 'EU', 'DE', 'AU'). Used by the EU gate to decide engagement."}}}
simulate_remediation
Counterfactual remediation simulator. Given a certificate's verdict + fourFactorScoring + agents and a list of remediation IDs from the FK-METHOD-2026-003 catalog, return the apportioned shares each remediation would have produced (in isolation) and the composite shares if they all stack. Every remediation cites a specific statute or standard. GET /api/v2/remediation/catalog for the list of IDs. Cost: 1 credit (same price as verify_certificate). Pure deterministic; same inputs produce a byte-identical result.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['verdict', 'fourFactorScoring', 'agents', 'remediations'], 'properties': {'agents': {'type': 'array', 'items': {'type': 'object', 'required': ['id'], 'properties': {'id': {'type': 'string'}, 'type': {'type': 'string'}}}, 'description': 'Agent registry (id + type) so the simulator can map remediation targetType to specific party ids.'}, 'verdict': {'type': 'object', 'required': ['primaryParty', 'primaryShare', 'secondary'], 'properties': {'secondary': {'type': 'array', 'items': {'type': 'object', 'required': ['party', 'share'], 'properties': {'party': {'type': 'string'}, 'share': {'type': 'number', 'maximum': 1, 'minimum': 0}}}}, 'primaryParty': {'type': 'string'}, 'primaryShare': {'type': 'number', 'maximum': 1, 'minimum': 0}}, 'description': 'The verdict block from the CausalCertificate.'}, 'remediations': {'type': 'array', 'items': {'type': 'object', 'required': ['id'], 'properties': {'id': {'type': 'string'}, 'appliedToParty': {'type': 'string'}}}, 'minItems': 1, 'description': 'List of remediation IDs from the catalog (e.g. vendor_adversarial_eval_suite, deployer_human_in_loop). Each may optionally pin appliedToParty to a specific agent id.'}, 'fourFactorScoring': {'type': 'object', 'required': ['primaryAgent', 'causalProximity', 'behaviouralDeviation', 'controllability', 'regulatoryAlignment', 'weights'], 'properties': {'weights': {'type': 'object', 'required': ['causalProximity', 'behaviouralDeviation', 'controllability', 'regulatoryAlignment'], 'properties': {'causalProximity': {'type': 'number'}, 'controllability': {'type': 'number'}, 'regulatoryAlignment': {'type': 'number'}, 'behaviouralDeviation': {'type': 'number'}}}, 'primaryAgent': {'type': 'string'}, 'causalProximity': {'type': 'number', 'maximum': 1, 'minimum': 0}, 'controllability': {'type': 'number', 'maximum': 1, 'minimum': 0}, 'regulatoryAlignment': {'type': 'number', 'maximum': 1, 'minimum': 0}, 'behaviouralDeviation': {'type': 'number', 'maximum': 1, 'minimum': 0}}, 'description': 'The fourFactorScoring block from the CausalCertificate.'}}}
submit_incident
Submit an AI incident for deterministic causal liability attribution. Returns a signed CausalCertificate, per-agent liability allocation, evidence-chain completeness, regulatory mapping, and (where keys are configured) a Bitcoin-anchored proof. Cost: 50 credits. Three guardrails apply: PII scan, deterministic-only acknowledgement, and minimum evidence.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['title', 'agents', 'events', 'deterministic_only'], 'properties': {'title': {'type': 'string', 'minLength': 3}, 'agents': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'name', 'type'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'name': {'type': 'string', 'minLength': 1}, 'type': {'enum': ['ai_system', 'human_operator', 'vendor', 'deployer', 'user', 'third_party'], 'type': 'string'}, 'model_id': {'type': 'string'}, 'vendor_name': {'type': 'string'}, 'operator_role': {'enum': ['provider', 'deployer', 'user', 'vendor', 'regulator', 'auditor'], 'type': 'string'}}}, 'minItems': 1}, 'events': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'type', 'timestamp', 'description'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'type': {'type': 'string', 'minLength': 1}, 'span_id': {'type': 'string', 'pattern': '^[0-9a-f]{16}$'}, 'actor_id': {'type': 'string'}, 'trace_id': {'type': 'string', 'pattern': '^[0-9a-f]{32}$'}, 'timestamp': {'type': 'string', 'minLength': 1}, 'description': {'type': 'string', 'minLength': 1}, 'trace_source': {'enum': ['opentelemetry', 'jaeger', 'zipkin', 'datadog', 'newrelic', 'other'], 'type': 'string'}}}, 'minItems': 1}, 'category': {'type': 'string'}, 'currency': {'type': 'string', 'maxLength': 3, 'minLength': 3}, 'severity': {'enum': ['low', 'medium', 'high', 'critical'], 'type': 'string'}, 'description': {'type': 'string'}, 'jurisdiction': {'type': 'string'}, 'pii_acknowledged': {'type': 'boolean', 'default': False, 'description': 'G1: Set to true ONLY if caller has confirmed PII handling is permitted by their data agreement. False payloads with detected PII will be rejected.'}, 'deterministic_only': {'type': 'boolean', 'const': True, 'description': 'G2: Must be true. Acknowledges CausalLayer is deterministic and not LLM-based.'}, 'financial_impact_cents': {'anyOf': [{'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, {'type': 'null'}]}}}
submit_otel_trace
Convert an OpenTelemetry OTLP JSON trace into a FaultKey incident and return the same deterministic CausalCertificate as submit_incident. Each span becomes an event; service.name groups spans into agents; W3C trace_id and span_id propagate as evidence pointers on the causal graph edges. Cost: 50 credits (same as submit_incident). Three guardrails apply: PII scan, deterministic-only acknowledgement, and minimum evidence (auto-satisfied when the trace has at least 1 span).
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['title', 'otlp', 'deterministic_only'], 'properties': {'otlp': {'type': 'object', 'description': 'OTLP JSON payload with resourceSpans[]. See https://opentelemetry.io/docs/specs/otlp/#json-protobuf-encoding', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'title': {'type': 'string', 'minLength': 3}, 'category': {'type': 'string'}, 'currency': {'type': 'string', 'maxLength': 3, 'minLength': 3}, 'jurisdiction': {'type': 'string'}, 'pii_acknowledged': {'type': 'boolean', 'default': False, 'description': 'G1: Set to true ONLY if PII handling is permitted by your data agreement. OTLP traces frequently leak user/session ids in attributes.'}, 'deterministic_only': {'type': 'boolean', 'const': True, 'description': 'G2: Must be true. Acknowledges CausalLayer is deterministic.'}, 'financial_impact_cents': {'anyOf': [{'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, {'type': 'null'}]}}}
verify_certificate
Independently verify a CausalCertificate end-to-end (signature, Merkle integrity, issuer status against the registry). Cost: 1 credit. In production env, certificates from non-active issuers are rejected.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['certificate'], 'properties': {'certificate': {'type': 'object', 'description': 'CausalCertificateV1 object as returned by submit_incident.certificate', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}}
verify_certificate_recompute
Independently re-derive a CausalCertificate from its canonical input and compare byte-for-byte against the claimed certificate. This is the strongest verification path: it requires no trust in the issuer or signing key. Cost: 1 credit (same price as verify_certificate). Returns PASS only if every checked field (certificateId, request_hash, merkleRoot, verdict, causalGraph, fourFactorScoring, deviationTaxonomy, euRuleOverlay, cascadeAttenuation, damages, underwriting) matches identically.
Esquema de entrada
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['certificate', 'canonicalInput'], 'properties': {'certificate': {'type': 'object', 'description': 'The CausalCertificate object claimed by the issuer.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'canonicalInput': {'type': 'object', 'description': 'The original incident body that produced the certificate â\x80\x94 the same JSON originally posted to submit_incident or submit_otel_trace.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}}
Añadido
extract_incident
17 de September de 2026 a las 12:52
Añadido
query_issuer_registry
17 de September de 2026 a las 12:52
Añadido
get_anchor_status
17 de September de 2026 a las 12:52
Añadido
evaluate_prospective_response
17 de September de 2026 a las 12:52
Añadido
query_jurisdiction_overlay
17 de September de 2026 a las 12:52
Añadido
simulate_remediation
17 de September de 2026 a las 12:52
Añadido
submit_otel_trace
17 de September de 2026 a las 12:52
Añadido
verify_certificate_recompute
17 de September de 2026 a las 12:52
Añadido
verify_certificate
17 de September de 2026 a las 12:52
Añadido
submit_incident
17 de September de 2026 a las 12:52