MCP Solver
by szeider
The MCP Solver integrates SAT, SMT and Constraint Solving with LLMs through the Model Context Protocol, enabling AI models to interactively create, edit, and solve constraint models. It supports MiniZinc, PySAT, and Z3.
Last updated: N/A
What is MCP Solver?
The MCP Solver is a server that exposes SAT, SMT, and constraint solving capabilities to Large Language Models (LLMs) through the Model Context Protocol (MCP). It allows LLMs to interactively create, edit, and solve constraint models in MiniZinc, SAT models in PySAT, and SMT formulas in Z3 Python.
How to use MCP Solver?
- Install the MCP Solver and its dependencies (Python 3.11+, uv, MiniZinc, PySAT, Z3). Follow the installation instructions in INSTALL.md. 2. Choose a solving backend (MiniZinc, PySAT, or Z3) and install the corresponding dependencies. 3. Start the MCP server for the chosen backend (e.g.,
mcp-solver-mzn
for MiniZinc). 4. Use an MCP client (like the included ReAct-based client) to interact with the server and send commands to create, edit, and solve models.
Key features of MCP Solver
Integration of SAT, SMT, and Constraint Solving with LLMs
Support for MiniZinc, PySAT, and Z3 solving backends
Interactive model creation, editing, and solving
MCP client for development, experimentation, and diagnostics
Use cases of MCP Solver
Solving constraint satisfaction problems
Solving satisfiability modulo theories problems
Integrating constraint programming with AI models
Developing and testing LLM-based constraint solving applications
FAQ from MCP Solver
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
MCP is a protocol that enables communication between Large Language Models and constraint programming systems.
What solving backends are supported?
What solving backends are supported?
The MCP Solver supports MiniZinc, PySAT, and Z3.
What are the system requirements?
What are the system requirements?
The system requires Python 3.11+, the uv
package manager, and solver-specific dependencies (MiniZinc, Z3, or PySAT).
How do I install the MCP Solver?
How do I install the MCP Solver?
Follow the installation instructions in the INSTALL.md file.
How do I run the MCP client?
How do I run the MCP client?
Install the client dependencies with uv pip install -e ".[client]"
and then use the uv run run-test
command with the appropriate solver backend (mzn, pysat, or z3).