Solve Optimisation Models from Your AI Assistant

AI assistants are good at turning a problem described in words into an optimisation model. They are not good at solving it. Ask one for the best production plan and it will reason its way to an answer that looks plausible — and may well be wrong. A solver does not guess: when it says OPTIMAL, the result is a proven optimum.

The Optimisation Service now has an MCP server, so an assistant can do both: write the model, and have the service solve it. The server is in Anthropic’s connector directory and the official MCP Registry, and it works with any assistant that supports remote MCP servers.

What It Does

The server has three tools:

  • solve — solves a linear, quadratic or mixed-integer model (LP, QP, MILP, MIQP), written as text in the LP format; MPS and ojAlgo’s EBM format are read too. The result gives the solution state, the objective value, and each variable’s value by name.
  • translate — converts a model between the LP, MPS and EBM formats.
  • environment — reports the limits and the available solvers.

A model that is not valid LP gets an error that names the line and says what to write instead, so the assistant can correct it and try again.

Connect

The server is at https://service-api.optimatika.se/optimisation/mcp — Streamable HTTP, no sign-in.

  • Claude (web, desktop and mobile): open Customize → Connectors, search for Optimatika Optimisation Service, and connect it.

  • Claude Code:

    claude mcp add --transport http optimatika https://service-api.optimatika.se/optimisation/mcp

    Or install the ojAlgo plugin, which includes the server together with skills for writing ojAlgo code.

  • Codex:

    codex mcp add optimatika --url https://service-api.optimatika.se/optimisation/mcp
  • Any other assistant that supports remote MCP servers: add the URL above, with no authentication.

An Example

Ask:

A workshop makes chairs (profit 45, 2 machine hours each) and tables (profit 80, 5 machine hours each). There are 400 machine hours, and at most 100 chairs and 40 tables can be sold. How many of each maximise profit?

The assistant writes the model:

Maximize
 profit: 45 chairs + 80 tables
Subject To
 machine_hours: 2 chairs + 5 tables <= 400
Bounds
 0 <= chairs <= 100
 0 <= tables <= 40
General
 chairs tables
End

… calls solve, and gets back:

{"state":"OPTIMAL","optimal":true,"feasible":true,"objective":7700,"variables":{"chairs":100,"tables":40}}

Make 100 chairs and 40 tables, for a profit of 7,700 — and that is not an estimate. The same goes for a knapsack (which items to take within a weight limit), an assignment (who does which job), or a portfolio (the lowest-risk split for a target return, a quadratic model). Ask in plain words; the assistant writes the model.

Limits, and Your Data

The server runs on the public shared instance of the service: free and without an account, for models of up to 1,000 variables or constraints and solves of up to 60 seconds, with ojAlgo’s own solvers. Models and results are held in memory only, and expire within an hour. It is meant for getting started and for tests, not for production — don’t send it anything confidential.

When You Need More

The same service runs as a container in your own cloud, where your models never leave your network. With a licence key it adds a best-of-breed suite of solvers, multi-core solving and much larger models. Using the Optimisation Service walks through deploying it, and the documentation covers the MCP server in detail.