- Home
- MCP servers
- Optimization
Optimization
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"eesb99-optimization-mcp": {
"command": "python",
"args": [
"/path/to/optimization-mcp/server.py"
]
}
}
}You have a production-ready MCP server that provides advanced optimization capabilities and Monte Carlo integration for decision-support workflows. Connect it to Claude Code or other MCP clients to allocate resources, optimize portfolios, schedule tasks, and explore trade-offs across multiple objectives with fast, validated solvers.
How to use
You can use the Optimization MCP to solve production-grade optimization problems across multiple domains. Start by installing the MCP locally, start the server, then connect your MCP client (such as Claude Code) to run powerful optimization routines like budget allocation, portfolio optimization, and project scheduling. You can also combine MC scenarios to validate robustness and to explore Pareto frontiers for multi-objective decisions.
In practice, you will pick an optimization tool that fits your problem (allocation, portfolio, schedule, network flow, Pareto analysis, or robust optimization) and feed it with your resources, item requirements, and objective definitions. You can optionally include Monte Carlo integration patterns to use percentile/expected values or full scenario ensembles for robust results.
How to install
Prerequisites: you need Python and Git installed on your system.
git clone https://github.com/eesb99/optimization-mcp
cd optimization-mcp
pip install -r requirements.txt
Test that the basic optimization flow works by running a small Python test you place under your project. This validates the core optimization function and shows you the expected outputs, such as the status and allocated items.
# test_basic.py
from src.api.allocation import optimize_allocation
result = optimize_allocation(
objective={
"sense": "maximize",
"items": [
{"name": "project_a", "value": 100},
{"name": "project_b", "value": 150}
]
},
resources={"budget": {"total": 10000}},
item_requirements=[
{"name": "project_a", "budget": 6000},
{"name": "project_b", "budget": 5000}
]
)
print(f"Status: {result['status']}")
print(f"Optimal value: {result['objective_value']}")
print(f"Allocation: {result['allocation']}")
# Run: python test_basic.py
Then configure your client to point at the MCP server and start interacting with it. The quickest path is to add the MCP server endpoint to your client configuration so you can call the solver directly from your workflow.
{
"mcpServers": {
"optimization_mcp": {
"command": "python",
"args": ["/path/to/optimization-mcp/server.py"]
}
}
}
Additional notes
Restart your client after adding the MCP server so it picks up the new server configuration. You can then issue natural-language prompts or API calls to perform allocations, schedule tasks, or optimize portfolios with Monte Carlo validation tools.
Available tools
optimize_allocation
Resource allocation under constraints using LP/MILP solvers; supports single and multi-objective formats with Monte Carlo integration options.
optimize_robust
Find robust allocations that perform well across Monte Carlo scenarios, returning robustness metrics and distribution information.
optimize_portfolio
Portfolio optimization using quadratic programming to balance return and risk with options for Sharpe, min-variance, and max-return objectives.
optimize_schedule
Task scheduling with dependencies and time/resource constraints; supports makespan minimization and value maximization.
optimize_execute
Flexible, problem-definition-driven optimization that auto-selects solvers or can be forced to a specific solver for custom formulations.
optimize_network_flow
Network flow optimization (min-cost flow, max-flow, assignment) using NetworkX with fast solving for large-scale networks.
optimize_pareto
Pareto frontier generation for multi-objective problems; returns multiple non-dominated solutions and knee-point recommendations.