MCP Optimizer
Enables 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.
README
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).
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_infeasibility
For local testing:
mcp http src/crew_optimizer/server.py --port 3333 --cors "*"
Testing
Install test dependencies (pip install pytest) and run:
python -m pytest
The suite covers the LP solver, MILP branch-and-bound, and the NL parser.
Licence
Distributed under the MIT Licence. See LICENSE for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.