Used to format responses and queries, enabling structured presentation of mathematical problems, optimization constraints, and solution outputs in a readable format.
USolver
A Model Context Protocol server that exposes tools for solving combinatorial, convex, integer programming, and non-linear optimization problems. Exposes interfaces to the following solvers:
ortools
- Combinatorial optimization solvercvxpy
- Convex optimization solverz3
- SMT solver over booleans, integers, reals, and strings
To install run the install.py
script. This will install the MPC server for Claude Desktop and/or Cursor.
Then open Claude or Cursor and you should see the MCP tool usolver
available in the tool list.
Examples
To run the individual solver examples. You can invoke the individual examples. Below are example prompts that you can feed to the language model for these specific problems.
Logic Puzzle
This can be fed into usolver and it will generate a constraint system:
Loading... is the collection of the six unknown coin values, Loading... through Loading..., each of which must be a positive whole number representing cents.
Loading...Loading... is the collection of every possible way you could choose two or more of your six coins.
Loading...Exclude the 50 cent coin from being used in the vending machine.
Loading...Constraint 0: The sum of the values of all six coins is 115 cents.
Loading...Constraint 1: Cannot make change for a dollar.
Loading...Constraint 2: Cannot make change for half a dollar.
Loading...Constraint 3: Cannot make change for a quarter.
Loading...Constraint 4: Cannot make change for a dime.
Loading...Constraint 5: Cannot make change for a nickel
Loading...Constraint 6: Cannot buy the candy bar for 95 cents if half dollar is excluded.
Loading...If you feed this to solver it will synthesize the above constraint system, solve it with Z3, and return the solution.
Z3
A chemical engineering example:
CVXPY
A simple convex optimization problem minimizing the 2-norm of a linear system:
OR-Tools
A classic worker shift scheduling problem:
Chained Examples
A chained example that uses both OR-Tools to optimize for table layout and CVXPY to optimize for staff scheduling.
Docker Usage
Can also run the MCP server directly from the GitHub Container Registry.
Then add the following to your client:
License
Released under the Apache License 2.0. See the LICENSE file for details.
This server cannot be installed
A best-effort universal logic and numerical solver interface using MCP that implements the 'LLM sandwich' model to process queries, call dedicated solvers (ortools, cvxpy, z3), and verbalize results.
Related MCP Servers
- -securityAlicense-qualityMCP-Logic is a server that provides AI systems with automated reasoning capabilities, enabling logical theorem proving and model verification using Prover9/Mace4 through a clean MCP interface.Last updated -20MIT License
- -securityFlicense-qualityA Model Context Protocol (MCP) server that provides mathematical calculations and operations using NumPy, enabling users to perform numerical computations like matrix operations, statistical analysis, and polynomial fitting directly through Claude.Last updated -1Python
- AsecurityFlicenseAqualityA lightweight MCP server that provides a unified interface to various LLM providers including OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama.Last updated -6218Python
- AsecurityAlicenseAqualityA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.Last updated -612512TypeScriptMIT License