USolver

v1.0.0Data Science & MLstable

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.

mcp
Share:
65
Stars
0
Downloads
0
Weekly
0/5

What is USolver?

USolver is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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.

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.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A best-effort universal logic and numerical solver interface

Use Cases

Solve logic and numerical problems with dedicated solvers.
Use ortools, cvxpy, and Z3 via LLM interface.
Verbalize solver results in natural language.
sdiehl

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx usolver

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use USolver

USolver is a Python-based MCP server that implements a universal solver interface using the 'LLM sandwich' model, where natural language problem descriptions are translated into mathematical constraints, passed to dedicated solver backends (Google OR-Tools for combinatorial optimization, CVXPy for convex optimization, and Z3 for SMT/logical constraint satisfaction), and the results are verbalized back in plain language. It is designed for engineers, operations researchers, and data scientists who want to describe optimization problems — staff scheduling, pipeline design, resource allocation — in conversational language rather than solver-specific syntax, with the LLM handling the translation layer in both directions.

Prerequisites

  • Python 3.9+ installed on your system
  • uv package manager (recommended) or pip
  • The solver Python packages: google-or-tools, cvxpy, and z3-solver
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Note: this repository is archived and no longer maintained; it remains functional for educational and research use
1

Clone the archived repository

Clone the USolver repository from GitHub. Although archived, the code is still functional.

git clone https://github.com/sdiehl/usolver.git
cd usolver
2

Install dependencies

Install the Python dependencies using uv (recommended) or pip. The core solver backends are OR-Tools, CVXPy, and Z3.

# Using uv (recommended):
uv sync

# Or using pip:
pip install google-or-tools cvxpy z3-solver
3

Run the install script

Use the provided install.py script to set up the environment and verify solver backends are available.

python install.py
4

Configure your MCP client

Add USolver to your Claude Desktop or Claude Code configuration, pointing to the Python entrypoint.

{
  "mcpServers": {
    "usolver": {
      "command": "python",
      "args": ["/path/to/usolver/main.py"]
    }
  }
}
5

Test with a simple optimization problem

Ask your AI assistant a constraint satisfaction or optimization problem to verify the solver backends are working correctly.

USolver Examples

Client configuration

Claude Desktop config for USolver using Python.

{
  "mcpServers": {
    "usolver": {
      "command": "python",
      "args": ["/path/to/usolver/main.py"]
    }
  }
}

Prompts to try

Example natural language optimization problems you can give to USolver.

- "Schedule 4 nurses across 3 shifts (morning 6-14, afternoon 14-22, night 22-6) so each nurse works 5 days and shifts are evenly distributed"
- "Design a water transport pipeline with max flow rate 500 L/min, pressure between 2 and 8 bar, and pipe diameter between 50 and 200mm — minimize cost"
- "Find integer values of x and y such that 3x + 2y = 18, x > 0, y > 0, and x + y is minimized"
- "Is it possible to color a map with 3 colors such that no two adjacent regions share a color? Regions: A-B, B-C, C-A, A-D"

Troubleshooting USolver

ImportError for ortools, cvxpy, or z3

Install the missing solver package: 'pip install google-or-tools' for OR-Tools, 'pip install cvxpy' for CVXPy, and 'pip install z3-solver' for Z3. Ensure you are using the same Python environment that the MCP server runs in.

The solver returns 'infeasible' or no solution for a problem

The problem constraints may be contradictory. Try relaxing one or more constraints in your natural language description. USolver uses a best-effort approach — rephrase the problem with looser bounds if the solver cannot find a feasible solution.

Repository archived warning and concerns about maintenance

The repository was archived in May 2026 and is no longer receiving updates. It remains functional for the documented use cases. For production deployments, consider forking the repository or migrating to an actively maintained solver MCP integration.

Frequently Asked Questions about USolver

What is USolver?

USolver is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install USolver?

Follow the installation instructions on the USolver GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with USolver?

USolver works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is USolver free to use?

Yes, USolver is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "usolver": { "command": "npx", "args": ["-y", "usolver"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use USolver?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides