glen-mcp-opt
Supports using Ceph-backed S3 object storage as the data source endpoint for DuckDB SQL queries, configurable for in-cluster or external S3-compatible access.
Allows optimization model sets and parameters to be populated from DuckDB SQL queries over S3 Parquet data, keeping data rows out of the LLM context.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
glen-mcp-opt
An MCP server that lets an LLM turn optimization questions into models and solve them. The LLM writes the model as JSON; the server validates it, classifies it (LP, ILP, MILP, ...), solves it with HiGHS, and returns results in a form the LLM can explain. Built for GLEN; works with any MCP client.
Tools
Tool | Purpose |
| Spec format, expression syntax, SQL data sources, modeling patterns, how to explain results |
| Validate a model: errors to fix, or class, size, solver support, and a readable summary |
| Solve: status, objective, variable values, binding constraints, duals (LP), gap (on timeout), conflicting constraints (infeasible) |
| Available solvers and the model classes they handle |
Example spec (choose projects within a budget):
{
"sets": { "A": ["a1", "a2", "a3"] },
"params": {
"cost": { "index": "A", "values": { "a1": 3, "a2": 5, "a3": 2 } },
"benefit": { "index": "A", "values": { "a1": 4, "a2": 7, "a3": 2 } },
"budget": 6
},
"variables": { "x": { "index": "A", "type": "binary" } },
"objective": { "sense": "max", "expr": "sum(benefit[a] * x[a] for a in A)" },
"constraints": { "budget": "sum(cost[a] * x[a] for a in A) <= budget" }
}Expressions are parsed against a whitelist; no code is executed. Sets and params can come from a DuckDB query over S3 Parquet ({"source": "sql", "query": ...}), so data rows never pass through the LLM. Full reference: src/glen_opt/guide.md.
Related MCP server: MCP Optimizer
Run
python -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/glen-mcp-opt # http://localhost:8000/mcp
.venv/bin/pytestTry it from Claude Code:
claude mcp add --transport http glen-opt http://localhost:8000/mcpOutside the NRP cluster, set S3_DEFAULT_ENDPOINT=s3-west.nrp-nautilus.io for SQL sources.
Variable | Default | |
|
| |
|
| In-cluster NRP Ceph |
|
| Seconds per solve |
|
| Model size limits |
|
| Rows per SQL source |
Use with GLEN
Add the server after duckdb-mcp in the app's layers-input.json:
"mcp_servers": [
{ "url": "https://duckdb-mcp.nrp-nautilus.io/mcp" },
{ "url": "https://glen-opt.nrp-nautilus.io/mcp", "optional": true }
]Deploy
Pushes to main build ghcr.io/schmidtdse/glen-mcp-opt:main.
kubectl apply -f k8s/Evaluate
eval/problems.json holds plain-language questions with known optimal values. The runner sends each to an LLM through open-llm-proxy, executes its tool calls against this server, and scores the result:
PROXY_KEY=... .venv/bin/python eval/run_eval.py --models kimi qwen3License
BSD-3-Clause
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Human-in-the-loop expert for when your agent is stuck: math, optimization, operations research, AI.
Solve production, blending, transport and scheduling problems with LP and MIP.
Optimize crew and workforce schedules, resource allocation, and routing with linear and mixed-inte…
Related MCP Servers
- AlicenseBqualityFmaintenanceA 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.764Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables solving linear programming (LP) and mixed-integer linear programming (MILP) optimization problems through natural language, with built-in simplex and branch-and-cut solvers plus infeasibility diagnostics. Includes optional OR-Tools fallback for larger problems and supports parsing optimization problems from natural language descriptions.MIT
- AlicenseNot gradedqualityBmaintenanceExposes optimization solver tools to AI agents via the Model Context Protocol, enabling natural language problem solving.2Apache 2.0
- AlicenseBqualityDmaintenanceTransforms unstructured natural language operational problems into rigorously formulated, validated, and solved Mixed-Integer Linear Programming (MILP) models via an autonomous multi-agent graph, bringing closed-loop Operations Research capabilities to LLM assistants and MCP clients.11MIT