Solver

Solver

Solves constraint satisfaction and optimization problems .

140
Stars
19
Forks
0
Releases

Overview

The MCP Solver is a Model Context Protocol (MCP) server that exposes constraint solving, SAT, SMT, and ASP capabilities to Large Language Models. It integrates five backends—MiniZinc, PySAT (including MaxSAT), Z3, and Clingo—to enable interactive modeling and solving via the MCP. The server supports multiple problem paradigms: MiniZinc constraint models, SAT/CNF, MaxSAT optimization, SMT formulas, and Answer Set Programs. Users interact through a compact command surface to build and manipulate models, including clear_model, add_item, delete_item, replace_item, get_model, and solve_model. For MiniZinc, solutions can be retrieved via get_solution. The MCP Test Client provides a development, experimentation, and diagnostic workflow, requiring an API key for LLM providers and supporting Anthropic, OpenAI, Gemini, OpenRouter, or local models. Backend-specific installation and configuration details are provided, with quick-start guidance using the uv package manager. The README also points to a research paper describing the architecture as a bridge between language models and symbolic solvers through the Model Context Protocol.

Details

Owner
szeider
Language
Python
License
MIT License
Updated
2025-12-07

Features

clear_model

Remove all items from the model

add_item

Add new item at a specific index

delete_item

Delete item at index

replace_item

Replace item at index

get_model

Get current model content with numbered items

solve_model

Solve the model (with timeout parameter)

MCP Test Client

MCP client for development, experimentation, and diagnostics; based on ReAct; requires an API key; supports Anthropic, OpenAI, Gemini, OpenRouter, or local models

Audience

DevelopersExperiment with MCP server interactions and test problem solving workflows.
ResearchersStudy integration of language models with symbolic solvers and benchmarks.

Tags

MCPconstraint solvingSATSMTASPMiniZincPySATMaxSATZ3ClingoLLM integrationMCP-compatible