← Back to search

io.github.daedalus/mcp-z3-prover

daedalus Scanned 18d ago

MCP server exposing Z3 solver API

B
77 / 100

Versions

0.1.0latest
first seen May 19, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 11

create_bool_var
annotations: none low

Create a Boolean variable with the given name. Args: name: The name of the boolean variable to create. Returns: The variable reference string in the format 'bool:<name>'. Raises: ValueError: If a variable with the given name already exists. Example: >>> create_bool_var("x") 'bool:x'

name str
create_int_var
annotations: none low

Create an Integer variable with the given name. Args: name: The name of the integer variable to create. Returns: The variable reference string in the format 'int:<name>'. Raises: ValueError: If a variable with the given name already exists. Example: >>> create_int_var("n") 'int:n'

name str
create_real_var
annotations: none low

Create a Real (floating-point) variable with the given name. Args: name: The name of the real variable to create. Returns: The variable reference string in the format 'real:<name>'. Raises: ValueError: If a variable with the given name already exists. Example: >>> create_real_var("x") 'real:x'

name str
create_int_constant
annotations: none low

Create an integer constant with the given value. Args: value: The integer value for the constant. Returns: The constant reference string in the format 'int:<value>'. Example: >>> create_int_constant(42) 'int:42'

value int
create_real_constant
annotations: none low

Create a real constant with the given value. Args: value: The real value for the constant. Returns: The constant reference string in the format 'real:<value>'. Example: >>> create_real_constant(3.14) 'real:3.14'

value float
add_constraint
annotations: none low

Add a constraint to the solver. Use variable references like 'bool:x', 'int:y', 'real:z' in expressions. Supports standard Z3 Python API syntax. Args: constraint: A Z3 constraint expression as a string. Returns: A dictionary with status and the constraint that was added. Raises: ValueError: If the constraint cannot be parsed. Example: >>> create_int_var("x") 'int:x' >>> create_int_var("y") 'int:y' >>> add_constraint("int:x + int:y > 10") {'status': 'success', 'constraint': 'int:x + int:y > 10'}

constraint str
solve
annotations: none low

Solve the current problem and return the result. Checks all added constraints for satisfiability and returns a model if the problem is SAT. Args: timeout_ms: Timeout in milliseconds for the solver. Returns: A dictionary containing: - status: 'sat', 'unsat', or 'unknown' - model: (if sat) A dictionary of variable assignments - message: (if unsat/unknown) A description of the result Example: >>> create_int_var("x") 'int:x' >>> create_int_constant(5) 'int:5' >>> add_constraint("int:x > int:5") {'status': 'success', 'constraint': 'int:x > int:5'} >>> solve() {'status': 'sat', 'model': {'x': '6'}}

timeout_ms int
get_model_value
annotations: none low

Get the value of a variable from the model after solving. Args: variable: The variable reference (e.g., 'int:x', 'bool:y'). Returns: The value of the variable as a string. Raises: RuntimeError: If solve() has not been called yet. ValueError: If the variable is not known. Example: >>> create_int_var("x") 'int:x' >>> add_constraint("int:x == 42") {'status': 'success', 'constraint': 'int:x == 42'} >>> solve() {'status': 'sat', 'model': {'x': '42'}} >>> get_model_value("int:x") '42'

variable str
optimize
annotations: none low

Solve with an optimization objective (maximize or minimize). Finds the optimal value for the given objective function subject to all added constraints. Args: objective: The expression to optimize (e.g., 'int:x + int:y'). maximize: If True, maximize the objective; if False, minimize. timeout_ms: Timeout in milliseconds for the optimizer. Returns: A dictionary containing: - status: 'sat', 'unsat', or 'unknown' - optimal_value: (if sat) The optimal value of the objective - model: (if sat) A dictionary of variable assignments - message: (if unsat/unknown) A description of the result Example: >>> create_int_var("x") 'int:x' >>> create_int_var("y") 'int:y' >>> add_constraint("int:x + int:y == 10") {'status': 'success', 'constraint': 'int:x + int:y == 10'} >>> add_constraint("int:x >= 0") {'status': 'success', 'constraint': 'int:x >= 0'} >>> add_constraint("int:y >= 0") {'status': 'success', 'constraint': 'int:y >= 0'} >>> optimize("int:x - int:y", maximize=True) {'status': 'sat', 'optimal_value': '10', 'model': {'x': '10', 'y': '0'}}

maximize bool objective str timeout_ms int
reset_solver
annotations: none low

Reset the solver state. Clears all variables, constants, constraints, and model data. Useful when starting a new problem. Returns: A dictionary with status and a success message. Example: >>> create_int_var("x") 'int:x' >>> add_constraint("int:x > 5") {'status': 'success', 'constraint': 'int:x > 5'} >>> reset_solver() {'status': 'success', 'message': 'Solver reset successfully'} >>> list_variables() {'variables': []}

list_variables
annotations: none low

List all created variables. Returns: A dictionary containing a list of all variable references. Example: >>> create_int_var("x") 'int:x' >>> create_bool_var("flag") 'bool:flag' >>> list_variables() {'variables': ['int:x', 'bool:flag']}

Permissions 0

No permissions indexed yet.

Scan Findings 41

low
Tool 'create_bool_var' has no annotations annotation_checker · 100%
low
Tool 'create_int_var' has no annotations annotation_checker · 100%
low
Tool 'create_real_var' has no annotations annotation_checker · 100%
low
Tool 'create_int_constant' has no annotations annotation_checker · 100%
low
Tool 'create_real_constant' has no annotations annotation_checker · 100%
low
Tool 'add_constraint' has no annotations annotation_checker · 100%
low
Tool 'solve' has no annotations annotation_checker · 100%
low
Tool 'get_model_value' has no annotations annotation_checker · 100%
low
Tool 'optimize' has no annotations annotation_checker · 100%
low
Tool 'reset_solver' has no annotations annotation_checker · 100%
low
Tool 'list_variables' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-5h2m-4q8j-pqpj) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-c2jp-c369-7pvx) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-m8x7-r2rg-vh5g) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-mxxr-jv3v-6pgc) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-rcfx-77hg-w2wv) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-rj5c-58rq-j5g5) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-rww4-4w9c-7733) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (GHSA-vv7q-7jx5-f767) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-1364) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-1365) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-2474) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-2475) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-2476) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@2.0.0 (PYSEC-2026-338) dependency_analyzer · 95%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: create_bool_var manifest_parser · 90%
info
Tool: create_int_var manifest_parser · 90%
info
Tool: create_real_var manifest_parser · 90%
info
Tool: create_int_constant manifest_parser · 90%
info
Tool: create_real_constant manifest_parser · 90%
info
Tool: add_constraint manifest_parser · 90%
info
Tool: solve manifest_parser · 90%
info
Tool: get_model_value manifest_parser · 90%
info
Tool: optimize manifest_parser · 90%
info
Tool: reset_solver manifest_parser · 90%
info
Tool: list_variables manifest_parser · 90%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
info
No dependency files found for SBOM generation sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%