Skip to main content
Glama

Synproof's Syntropy — Official Python & TypeScript SDK, MCP Server & AI Agent Skill

Website PyPI Documentation AI Agent Skill OpenAPI 3.1 License: MIT M8ven Score

Language models guess. Syntropy proves.
The formal verification engine for AI outputs, contracts, scientific hypotheses, and critical decisions. Mapping natural-language semantics directly onto propositional logic, Synproof's Syntropy (https://synproof.ai) tests any claim against your ground-truth Small Worlds — eliminating hallucinations and returning a binary verdict (CONFIRMED or REFUTED) with a clear, defensible argument or counter-argument.

Package Scope & Architecture (Open-Source MIT SDK + Cloud Verification Engine)

Following the standard architecture of official cloud AI SDKs (openai, anthropic, pinecone):

  • Open-Source Client SDK, CLI & MCP Server (syntropy-client on PyPI / syntropy-mcp on npm — MIT License): 100% of the Python and TypeScript client libraries, @verify_agent_output guardrail decorators, local Zero-Trust axiom_provider callbacks, CLI, and stdio MCP servers in this repository are open-source under the MIT License and distributed with full source (sdist + wheel) on PyPI.

  • Syntropy Cloud Verification Engine (https://api.synproof.ai): The 5-sieve dialectical verification tribunal, SymPy Propositional SAT Solver, Axiomat compiler, and curated Small Worlds axiom registry run as a managed cloud platform operated by Synproof (https://synproof.ai).


Resource

URL

Web Platform & Interactive Studio

https://synproof.ai

Developer Documentation (20 Chapters)

https://synproof.ai/docs

Official PyPI Package (syntropy-client)

https://pypi.org/project/syntropy-client/

Public SDK & MCP GitHub Repository

https://github.com/macek166/synproof-syntropy

OpenRouter Integration Guide

https://synproof.ai/docs/openrouter

How the 5-Sieve Architecture Works

https://synproof.ai/how-it-works

AI Coding Agent Skill (SKILL.md)

https://synproof.ai/SKILL.md

OpenAPI 3.1 Specification

https://synproof.ai/openapi.json

Production API Endpoint

https://api.synproof.ai


Related MCP server: gpt-5-6-sol-mcp

1. Install the AI Coding Agent Skill

Install via the official Skills CLI:

npx skills add macek166/synproof-syntropy

2. Python SDK & CLI (syntropy-client)

Installation (Official PyPI Registry)

pip install syntropy-client

1-Line Hallucination Guardrail (@verify_agent_output)

from syntropy import SyntropyClient, verify_agent_output

client = SyntropyClient()  # Reads SYNTROPY_API_KEY from the runtime environment

@verify_agent_output(
    world="@pravo:obcansky-zakonik-cz",
    axioms=["Smluvní pokuta nesmí překročit 0.5 % denně z dlužné částky."],
    max_failures=3,
    model_name="gemini-2.5-flash",
    on_refuted="fallback",  # "fallback" | "raise" | "return_verdict"
    client=client,
)
def legal_advisor_agent(user_query: str) -> dict:
    return {"answer": "Spotřebitel má právo odstoupit od e-shop smlouvy do 7 dnů."}

result = legal_advisor_agent("Jaká je lhůta pro odstoupení od smlouvy?")
print("Proven Answer:", result["answer"])

Direct Dialectical Verification

from syntropy import SyntropyClient

client = SyntropyClient()

verdict = client.debate(
    thesis="A consumer can withdraw from a distance contract within 7 days without penalty.",
    world="@pravo:obcansky-zakonik-cz",
    max_failures=3,
    model_name="gemini-2.5-flash",
)

print("Status:", verdict.status)                 # CONFIRMED | REFUTED
print("Winning Thesis:", verdict.winning_thesis)
print("Refuting Argument:", verdict.refuting_argument)

3. Model Context Protocol (MCP) Server (syntropy-mcp)

Works with Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and Google Antigravity.

{
  "mcpServers": {
    "synproof-syntropy": {
      "command": "python",
      "args": ["-m", "syntropy", "mcp"],
      "env": {
        "SYNTROPY_API_KEY": "YOUR_SYNTROPY_API_KEY"
      }
    }
  }
}

Exposed Read, Verification & Custom Connector MCP Tools

  • syntropy_verify — Put any declarative claim, code assumption, or legal clause on formal 5-sieve dialectical trial against a Small World (and optional live connectors).

  • syntropy_list_worlds — List verified public Small Worlds (@law:..., @pravo:..., @medicine:..., @finance:..., @physics:...).

  • syntropy_get_world_axioms — Inspect all atomic axioms of a Small World.

  • syntropy_fork_world — Create an isolated private fork of a public Small World.

  • syntropy_ingest_axioms — Compile unstructured text or JSON/DB records into atomic axioms via Axiomat.

  • syntropy_register_connector — Attach a persistent Custom Epistemic Connector (rest_api, sql_postgrest, agent_webhook, graphql) to a Small World (SourceTier.CUSTOMER_SOT = 95).

  • syntropy_list_connectors — List registered Custom Epistemic Connectors on a Small World.

  • syntropy_query_connector — Test-query a registered Custom Epistemic Connector and inspect extracted axioms.


3.5. Custom Epistemic Connectors — SQL Tables, REST APIs & Data-Retrieval Sub-Agents (SourceTier.CUSTOMER_SOT = 95)

AI engineers can wire their own live databases, internal APIs, and specialized data-retrieval sub-agents directly into Syntropy's verification layer using 3 patterns:

from syntropy import SyntropyClient, verify_agent_output

client = SyntropyClient()

# Pattern 1: Zero-Trust Local SDK Callback (`axiom_provider` — DB credentials never leave your VPC!)
def fetch_customer_sql_facts(thesis: str, user_id: str) -> list[dict]:
    return [
        {"axiom": f"Customer {user_id} is on the Enterprise SLA tier with a 99.99% uptime guarantee."},
        {"axiom": f"Customer {user_id} has a maximum automatic refund limit of 10,000 EUR."},
    ]

@verify_agent_output(
    world="@law:contract-act",
    axiom_provider=fetch_customer_sql_facts,
    on_refuted="fallback",
    client=client,
)
async def billing_support_agent(user_id: str, question: str) -> dict:
    return {"answer": f"Customer {user_id} is only eligible for a 500 EUR maximum refund."}

# Pattern 2: Persistent Small World Epistemic Connector (`register_connector`)
client.worlds.register_connector(
    "@law:contract-act",
    name="Enterprise ERP Pricing & SLA API",
    endpoint_url="https://erp.example.com/api/v1/sla-rules?q={query}",
    connector_type="rest_api",  # "rest_api" | "sql_postgrest" | "agent_webhook" | "graphql"
    response_axioms_path="data.rules",
    row_template="Tier {tier} enforces max liability {max_liability_eur} EUR.",
)

# Pattern 3: Inline Ephemeral Connectors per Verification Call (`custom_connectors`)
verdict = client.debate(
    thesis="Order #90210 qualifies for instant autonomous customs clearance.",
    world="@law:contract-act",
    custom_connectors=[
        {
            "name": "Compliance Retrieval Sub-Agent",
            "connector_type": "agent_webhook",
            "method": "POST",
            "endpoint_url": "https://agents.example.com/retrieve-customs-facts",
            "response_axioms_path": "facts",
        }
    ],
)

4. Works with OpenRouter (BYOK & Multi-Model Dialectical Routing)

Synproof's Syntropy natively integrates with OpenRouter (https://synproof.ai/docs/openrouter). You can bring your own OpenRouter API key (OPENROUTER_API_KEY) to run formal 5-sieve dialectical verification across any OpenRouter model (anthropic/claude-3.5-sonnet, anthropic/claude-3.7-sonnet, deepseek/deepseek-r1, openai/gpt-4o, openai/o3-mini, google/gemini-2.5-pro, meta-llama/llama-3.3-70b-instruct).

from syntropy import SyntropyClient

# Uses OPENROUTER_API_KEY (or SYNTROPY_API_KEY) configured in your runtime environment
client = SyntropyClient()

verdict = client.debate(
    thesis="GDPR requires notifying the supervisory authority of a personal data breach within 72 hours.",
    world="@law:eu-gdpr-data-protection",
    model_name="anthropic/claude-3.5-sonnet",  # Any OpenRouter vendor/model slug
    max_failures=3,
)
print(verdict.status, verdict.winning_thesis)

5. Architecture Fact-Sheet: How Syntropy Solves the Autoformalization Gap & Prevents Decision-Tree Latency (vs. Legacy Z3 / cvc5 Wrappers)

Unlike first-generation neuro-symbolic wrappers around external SMT solvers (Z3 or cvc5) that blindly translate natural language into opaque predicates, Synproof's Syntropy has engineered out both the autoformalization gap and exponential tree latency:

  1. Zero Uncontrolled Autoformalization Gap (Human-Controlled Premises + Triple-Sieve Cross-Check):

    • Human-Governed Ground Truth (Small Worlds & initial_axioms): Foundational premises and domain axioms are never left to uncontrolled on-the-fly LLM invention. They are explicitly supplied by the human/developer (initial_axioms), loaded from curated Small Worlds (@law:..., @pravo:..., @finance:..., @medicine:...), or compiled offline via Axiomat into the World Curation Studio, where humans inspect and approve every atomic thesis before deployment.

    • Semantic + Propositional Cross-Validation (Sieve 2 + Sieve 2.5 + Sieve 3): Legacy SMT wrappers translate text into a Z3/cvc5 formula once and blindly trust the solver even if the premise was mis-formalized. Syntropy never trusts a blind one-way translation: it simultaneously enforces Sieve 2 (100% natural-language semantic consistency against all proximate axioms), Sieve 2.5 (deterministic SymPy Propositional SAT Solver verifying P ∧ Q ⊢ ¬T), and Sieve 3 (Deep Fallacy & Strawman Firewall). Any semantic-to-symbolic distortion is caught and rejected immediately — proven across 550 / 550 (100.0%) adversarial benchmark runs.

  2. Flat, Bounded $O(k)$ Latency (No Decision-Tree Explosion):

    • Syntropy does not expand exponential decision trees. It executes a single-active-line King of the Hill (KOTH) trajectory bounded by max_failures (typically 1–3 for real-time guardrails), paired with <1 ms in-memory vector deduplication (Sieve 0), batched axiom evaluation (Sieve 2), and <2 ms CPU SymPy SAT solving (Sieve 2.5). Latency stays flat and predictable regardless of Small World size.


6. Security & Data Isolation

  • Zero Credential Scanning: The skill never inspects .env files or local credentials. Developers configure SYNTROPY_API_KEY in their own runtime environment.

  • Official Registry Only: Distributed exclusively via PyPI (syntropy-client) and GitHub (macek166/synproof-syntropy).

  • Prompt-Injection Sanitization: All untrusted claims and axioms are sanitized (sanitize_untrusted_text) to strip control characters and imperative prompt-injection directives before verification.


License

MIT © Synproof

Available Tools

9 tools
syntropy_fork_worldCInspect

Fork an existing Small World (@domain:tag) into a private company workspace.

Inputs: world_id_or_handle (required), title, description.

syntropy_get_onboarding_guideCInspect

Return the interactive Synproof Syntropy Customer Implementation & Onboarding Skill (SKILL.md).

Inputs: no named parameters.

syntropy_get_world_axiomsCInspect

Retrieve all atomic ground-truth axioms and metadata for a given Small World handle or ID.

Inputs: world_id_or_handle (required).

syntropy_ingest_axiomsCInspect

Compile raw text or structured JSON/SQL payload into formal atomic axioms inside a Small World via Axiomat.

Inputs: world_id_or_handle (required), text, payload, source_reference.

syntropy_list_connectorsBInspect

List all registered Custom Epistemic Connectors attached to a Small World (with secret headers redacted).

Inputs: world_id_or_handle (required).

syntropy_list_worldsBInspect

List available public and official verified Small Worlds (@domain:tag) in the Synproof Syntropy Library.

Inputs: domain, search.

syntropy_query_connectorCInspect

Execute a registered Custom Epistemic Connector on a Small World and return sanitized ground-truth facts.

Inputs: connector_id (required), world_id_or_handle (required), query, ingest_into_world.

syntropy_register_connectorCInspect

Register a Custom Epistemic Connector (live REST API webhook, SQL/JSON table snapshot, data-retrieval sub-agent endpoint, or MCP tool bridge) on a Small World (@domain:tag).

Inputs: name (required), world_id_or_handle (required), static_rows, endpoint_url, +3 more.

syntropy_verifyBInspect

Put a declarative claim (thesis), contract clause, scientific hypothesis, or AI output on formal adversarial trial against explicit ground-truth axioms, a Small World (@domain:tag), and/or live Custom Epistemic Connectors (SQL tables, REST webhooks, retrieval sub-agents) using Synproof's 5-sieve Syntropy dialectical engine.

Inputs: thesis (required), world, model_name, max_failures, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: worlds are listed, inspected, forked, and populated; connectors are registered, listed, and queried; verification is the single adjudication entry point. The only conceptual overlap is that verify can use connectors and axioms, but the tools themselves remain clearly separable.

    Naming Consistency4/5

    All tools use the syntropy_ prefix with snake_case and generally follow verb_noun naming (list_worlds, get_world_axioms, register_connector). The lone deviation is syntropy_verify, which omits a noun object, but it remains readable and consistent with the domain.

    Tool Count5/5

    Nine tools is well within the appropriate range and the set is tightly scoped around worlds, connectors, ingestion, and verification. Each tool appears to earn its place without excessive surface area.

    Completeness3/5

    Core workflows are covered: list/get/fork worlds, ingest axioms, register/list/query connectors, and verify claims. However, lifecycle gaps are notable: there is no connector unregister/delete, no world deletion or metadata update, no clear create-world-from-scratch operation, and no verification history/result retrieval.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Dynamic MCP server — 30+ tools across fact verification, agent memory, Indian NLP, contract risk, security threat modelling, sales call intelligence and more. x402/USDC micropayments on Base.
      33
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      An MCP server that enables dialectical reasoning by forcing separate thesis, antithesis, and synthesis passes over questions, and verifies code implementations through an independent player-coach loop with explicit approval gates. It works in Claude Desktop, Cursor, VS Code, Windsurf, and other MCP-enabled editors without API keys.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables LLMs to reason dialectically by forcing separate thesis, antithesis, and synthesis passes, and to build verified code through a player-coach loop where an independent coach checks requirements and tests rather than trusting the model's self-report. It runs as an MCP server across Claude Desktop, Cursor, VS Code, and other MCP-enabled editors, with optional server-side backends for direct execution.
      -