deterministic-logic
Provides deterministic logic evaluation tools including boolean expressions, truth tables, SAT solving, JSON logic rules, decision tables, and state machine analysis.
README
Deterministic Logic Evaluation MCP Toolkit (deterministic-logic-mcp)
A Model Context Protocol (MCP) server providing high-performance, deterministic logic evaluation tools for AI assistants and automated systems.
Features & Logic Engines
- Propositional Logic & AST Evaluator: Parse and evaluate boolean expressions with full variable mapping. Supports
&&,||,!,^(XOR),=>(IMPLIES),<=>(IFF), and custom operator notation. - Truth Table Generator: Compute complete $2^N$ truth tables, check tautologies, contradictions, and satisfiability.
- DPLL SAT Solver: Convert formulas to Conjunctive Normal Form (CNF) and find satisfying variable assignments or prove UNSAT.
- JSON Logic Rule Engine: Deterministic evaluation of structured rules (boolean, arithmetic, comparison, array filters/maps, conditional branching) against JSON datasets.
- Decision Table Engine: Grid-based rule evaluation with support for wildcards,
first_match,all_matches, andstrict_single_match(determinism verification). - State Machine Analyzer & Verifier: Check Finite State Machines (FSMs) for determinism, deadlocks, unreachable states, and state reachability path extraction.
🛠️ MCP Tools Reference
| Tool Name | Description | Key Arguments |
|---|---|---|
evaluate_boolean |
Evaluates a boolean logic expression with variable values | expression, env |
generate_truth_table |
Generates full truth table & computes Tautology / Contradiction | expression, maxVariables |
solve_sat |
DPLL SAT solver returning satisfying variable assignment or UNSAT | expression |
evaluate_json_logic |
Evaluates JSON logic rules against context JSON data | rule, data |
evaluate_decision_table |
Evaluates matrix decision table rules with determinism checks | rows, inputs, mode |
analyze_state_machine |
Checks FSM for determinism, deadlocks, and unreachable states | initialState, transitions, terminalStates |
verify_state_reachability |
Finds shortest execution path to target state in FSM | initialState, transitions, targetState |
simulate_state_machine |
Simulates an input sequence through an FSM step-by-step | initialState, transitions, inputSequence |
🚀 Quickstart & Setup
Building Locally
npm install
npm run build
npm test
Configuring in MCP Clients (e.g. Claude Desktop, Cursor, AGY)
Add the following to your mcpServers configuration file (e.g. claude_desktop_config.json):
{
"mcpServers": {
"deterministic-logic": {
"command": "node",
"args": ["/home/mrovkill/Projects/deterministic-logic/dist/index.js"]
}
}
}
Or run directly via npx / tsx:
{
"mcpServers": {
"deterministic-logic": {
"command": "npx",
"args": ["tsx", "/home/mrovkill/Projects/deterministic-logic/src/index.ts"]
}
}
}
💡 Example Tool Usage
1. Truth Table Generation
Input: expression = "A => (B => A)"
Output: isTautology = true, isSatisfiable = true, truthTable rows showing all evaluated combinations.
2. DPLL SAT Solving
Input: expression = "(A || B) && (!A || B) && (!B)"
Output: satisfiable = false (UNSAT).
3. JSON Logic Rule Execution
Input:
{
"rule": {
"and": [
{ ">": [{ "var": "user.age" }, 18] },
{ "in": [{ "var": "user.role" }, ["admin", "editor"]] }
]
},
"data": { "user": { "age": 25, "role": "admin" } }
}
Output: result = true.
📄 License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.