🧰 MCP Tools (69 governed agent tools)

McpClient is the typed Python surface over the server's 69 MCP tools — the same tools Claude / Cursor / Cline get when you point them at RelataDB.

mcp = McpClient.from_client(client)
 
mcp.initialize()    # handshake
tools = mcp.list_tools()
# tools = [{"name": "query_knowledge", ...}, {"name": "recall", ...}, ...]
# len(tools) == 69

Connect Claude directly:

claude mcp add relata http://localhost:9090/mcp \
  --header "Authorization: Bearer perftoken"

Knowledge & query

mcp.query_knowledge("SELECT name, risk FROM Person WHERE risk = 'HIGH'",
                    purpose="analytics")
 
mcp.search_knowledge("embezzlement offshore", purpose="analytics", top_k=5)
 
mcp.explain_policy("SELECT * FROM Person", purpose="analytics")
# Shows the ACL / org-isolation policy that would apply, without executing.
 
mcp.suggest_extensions()
# Lists extension packs and their data availability.

Entity discovery

mcp.list_entity_types()
mcp.get_entities("Person", filters={"risk": "HIGH"}, limit=10)
mcp.search_entities("alice", entity_types=["Person"])
mcp.get_domain_summary("financial")
# {"counts": {"Person": 4, "Transaction": 4, ...}, "freshness": {...}}

Case & investigation

mcp.get_entity_profile("alice", purpose="analytics")
mcp.get_timeline("alice", purpose="analytics",
                 since_ns=1736899200000000000)   # since 2025-01-15
mcp.find_connections("alice", purpose="analytics", limit=50)
mcp.get_relationships(subject="alice", predicate="AUTHORIZED",
                      purpose="analytics")
mcp.investigate_entity("Person", "alice")
mcp.find_threats("ProcessEvent")
mcp.add_case_note("case-2026-001",
                  "Alice authorized 4 transfers to Pacific Trust 7742.",
                  author="investigator-1")
mcp.get_case_summary("case-2026-001", purpose="analytics")

Identity

mcp.lookup_identity("+14155550100", purpose="analytics")
mcp.resolve_entity_identity("alice", purpose="analytics")

Memory (the 10 cognitive verbs, reachable via MCP too)

mid = mcp.remember("Alice authorized $2.3M wire on Jan 15.", purpose="agent-notes")
mcp.remember_batch([{"content": "ShellCo received $850K."},
                    {"content": "Carla is the whistleblower."}],
                   purpose="agent-notes")
mcp.recall("whistleblower", purpose="agent-notes", top_k=3)
mcp.recognize(mid, purpose="agent-notes")
mcp.justify(mid, purpose="agent-notes")
mcp.consolidate(mid, "UPDATED: confirmed by 2 sources.", purpose="agent-notes")
mcp.forget(mid, retain_days=90, purpose="agent-notes")
mcp.remember_procedure("fraud-agent", "SAR_FILING",
                       "1. Screen. 2. Document. 3. File SAR within 30 days.",
                       purpose="agent-notes")
mcp.recall_procedure("fraud-agent", name="SAR_FILING", purpose="agent-notes")
mcp.associate(mid, mid2, relation="same_case", purpose="agent-notes")
mcp.resolve(mid, purpose="agent-notes")
mcp.summarise(ids=[mid, mid2], purpose="agent-notes")
mcp.episodes_in("shadow-ledger", purpose="agent-notes")

Natural language → SQL

mcp.nl_query("show all high risk persons", purpose="analytics")
# {"dialect": "sql", "sql": "SELECT * FROM Person WHERE risk = 'HIGH'",
#  "rows": [...]}
 
mcp.nl_query("who is alice connected to",
             purpose="analytics", max_sub_questions=2)
# {"dialect": "cypher", "decomposed": True,
#  "sub_results": [{"dialect": "sql", ...}, {"dialect": "cypher", ...}]}

Detection rules & jobs

mcp.import_sigma("""
title: Suspicious Large Wire Transfer
status: experimental
logsource:
  product: relata
  service: Transaction
detection:
  selection:
    amount: 1000000
  condition: selection
level: high
""", purpose="security")
# {"rule_id": "019fe24e-e333-...", "name": "Suspicious Large Wire Transfer",
#  "status": "active"}
 
mcp.list_rules()
mcp.create_rule("high_value_wire",
                "SELECT * FROM Transaction WHERE amount > 1000000",
                severity="high", purpose="security")
mcp.list_jobs()
mcp.schedule_job("high_value_wire")
mcp.job_status()

Workflows

mcp.list_workflows()
mcp.run_workflow("sar_filing_workflow")
mcp.workflow_status("<run_id>")

Graph via MCP

mcp.detect_communities("Person", purpose="analytics")
mcp.rank_key_nodes("Person", metric="pagerank", purpose="analytics")
mcp.hub_authority("Person", purpose="analytics")
mcp.find_scc("Person", purpose="analytics")
mcp.predict_links("Person", from_id="alice", purpose="analytics")
mcp.paths_between("alice", "tx3", max_hops=4, purpose="analytics")
mcp.list_link_types()

Financial-crime via MCP

mcp.trace_crypto("0x742d...", max_hops=5, purpose="analytics")
mcp.beneficial_ownership("alice", max_depth=6, purpose="analytics")
mcp.reconstruct_wire("Pacific Trust 7742", tolerance_pct=5.0)
mcp.trace_hawala("alice", max_hops=5)
mcp.screen_sanctions("Alice Chen", purpose="compliance_review")
mcp.geofence(30.27, -97.74, radius_m=1000, purpose="analytics")

RAG & multimodal

mcp.rag_store_answer("Who authorized the transfers?", "Alice Chen.",
                     source_ids=["tx1", "tx4"], purpose="rag")
mcp.rag_store_elements([{"type": "fact", "text": "ShellCo is a front."}],
                       purpose="rag")
mcp.ingest_document(chunks_jsonl=chunks, manifest_json=manifest,
                    purpose="rag")
mcp.hybrid_search("CaseDoc", "embezzlement", top_k=5, purpose="analytics")
mcp.similar_multimodal("MediaEmbedding", "img_42",
                       modality="image", purpose="investigation")
mcp.search_video_frames("frame_1", top_k=20, purpose="security_incident")
mcp.ingest_media("MediaImage", bytes_b64="...", modality="image")

Ops

mcp.server_health()
mcp.job_status()
mcp.metrics()
mcp.aggregate_stats("Transaction", agg="SUM", column="amount")
mcp.get_audit_trail(principal_filter="investigator-1", limit=100)
The remaining MCP tools (gist)
ToolWhat it does
find_in_social_corpus(object_type, text_query=, user=)search ingested social-media corpus
face_match(probe_id, threshold=)GATED (ADR-155) — match a probe face
erase_subject(subject, reason=)GDPR Art. 17 crypto-shred erasure
metrics() / server_health() / job_status()ops observability

Next: Media & Biometrics — face search, near-duplicate images, PDQ hashes, and DNS-tunnel detection.