MCP Optimizer
Provides reusable CrewAI tools and agents for solving linear programming problems, mixed-integer optimization models, translating natural language prompts into LP JSON format, and diagnosing infeasibility issues through the CrewAI multi-agent framework.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Optimizerminimize cost subject to production constraints using data from production.csv"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Crew Optimizer
Crew Optimizer rebuilds the original optimisation project around the CrewAI ecosystem. It provides reusable CrewAI tools and agents capable of solving linear programs via SciPy's HiGHS backend, exploring mixed-integer models with a lightweight branch-and-bound search (or OR-Tools fallback), translating natural language prompts into LP JSON, and diagnosing infeasibility. You can embed the tools inside your own crews or call them programmatically through the OptimizerCrew convenience wrapper, or serve them over the MCP protocol for clients such as Smithery.
Installation
python -m venv .venv
source .venv/bin/activate
pip install -e .[mip]This installs Crew Optimizer together with optional OR-Tools support for MILP solving. Add pytest, ruff, or other dev tools as needed (pip install pytest).
Related MCP server: HiGHS MCP Server
Quick Usage
from crew_optimizer import OptimizerCrew
crew = OptimizerCrew(verbose=False)
lp_model = {
"name": "diet-toy",
"sense": "min",
"objective": {
"terms": [
{"var": "x", "coef": 3},
{"var": "y", "coef": 2},
],
"constant": 0,
},
"variables": [
{"name": "x", "lb": 0},
{"name": "y", "lb": 0},
],
"constraints": [
{
"name": "c1",
"lhs": {
"terms": [
{"var": "x", "coef": 1},
{"var": "y", "coef": 2},
],
"constant": 0,
},
"cmp": ">=",
"rhs": 8,
},
{
"name": "c2",
"lhs": {
"terms": [
{"var": "x", "coef": 3},
{"var": "y", "coef": 1},
],
"constant": 0,
},
"cmp": ">=",
"rhs": 6,
},
],
}
solution = crew.solve_lp(lp_model)
print(solution)To integrate with a wider multi-agent workflow, call crew.build_crew() to obtain a Crew populated with the LP, MILP, and parser agents. Provide model inputs through CrewAI’s shared context as usual.
MCP / Smithery Hosting
Crew Optimizer ships an MCP server (python -m crew_optimizer.server) that wraps the same solvers. The repository already contains a Smithery manifest (smithery.json) and build config (smithery.yaml).
Push the repository to GitHub.
In Smithery, choose Publish an MCP Server, connect GitHub, and select the repo.
Smithery installs the package (
pip install .) and launchesmcp http src/crew_optimizer/server.py --port 3333using the bundled startup script.The server exposes the following tools:
solve_linear_programsolve_mixed_integer_programparse_natural_languagediagnose_infeasibilitysolve_word_problem_with_data- Solve optimization problems using data from files
For local testing:
mcp http src/crew_optimizer/server.py --port 3333 --cors "*"Testing
Install test dependencies (pip install pytest) and run:
python -m pytestThe suite covers the LP solver, MILP branch-and-bound, and the NL parser.
Solving Word Problems with Data Files
The MCP server includes a solve_word_problem_with_data tool that can parse data files (CSV, JSON, Excel) and use them to solve optimization word problems. This is particularly useful when you have data in files and want to formulate and solve optimization problems based on that data.
Example Usage
# Example: Solve a production planning problem with data from a CSV file
csv_data = """product,cost,capacity,demand
Widget,10,100,50
Gadget,15,80,60
Thing,12,120,40"""
problem = """
Minimize total cost subject to:
- Production of each product cannot exceed capacity
- Production must meet demand
- All production quantities are non-negative
"""
# The tool will parse the CSV, extract the cost, capacity, and demand values,
# and formulate the optimization problem automatically.The tool supports:
CSV/TSV files: Automatically detects and parses comma or tab-separated values
JSON files: Parses JSON arrays or objects
Excel files: Requires
pandasandopenpyxl(install withpip install crew-optimizer[excel])Auto-detection: Automatically detects file format if not specified
The parsed data is incorporated into the problem description, allowing the natural language parser to extract values and formulate constraints and objective functions based on the actual data.
Licence
Distributed under the MIT Licence. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides constraint satisfaction and optimization capabilities to LLMs and AI agents for scheduling, resource allocation, routing, budget optimization, and configuration problems using Google OR-Tools CP-SAT solver.55Apache 2.0
- Alicense-qualityCmaintenanceProvides linear programming (LP), mixed-integer programming (MIP), and quadratic programming (QP) optimization capabilities using the HiGHS solver, enabling AI assistants to solve complex optimization problems like production planning, logistics, and portfolio optimization.1816MIT
- Flicense-qualityDmaintenanceEnables AI applications to solve optimization problems including linear programming, mixed-integer programming, and quadratic programming using the Gurobi solver installed on the local device.1
- AlicenseCqualityDmaintenanceEnables Large Language Models to submit and solve constraint satisfaction and optimization problems using Google OR-Tools through JSON model specification.11MIT
Related MCP Connectors
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Negotiation math engine. Pareto frontier, counteroffer generation, zero LLM tokens.
Precision math engine for AI agents. 203 exact methods. Zero hallucination.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrugankpednekar/mcp-optimizer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server