home / mcp / gurobi mcp server
On-device Gurobi solver accessible to AI apps via MCP for LP, MILP, QP, QCP and related problems.
Configuration
View docs{
"mcpServers": {
"kkonuru-gurobimcp": {
"command": "/Path/to/gurobiMCP/.venv/bin/python",
"args": [
"/Path/to/gurobiMCP/main.py"
]
}
}
}You can connect AI applications to the Gurobi optimization engine on your device using MCP. This server lets LLMs formulate and solve optimization problems locally with Gurobi, enabling fast, on-device computation for LP, MILP, QP, QCP and related problem types.
You interact with the Gurobi MCP through an MCP client by invoking the on-device solver as a remote data source and computation tool. When you send optimization requests from your AI workflow, the MCP server receives the problem definition, solves it with Gurobi on your machine, and returns the solution and any relevant status information. Typical usage patterns include formulating LPs or MILPs from an LLM-generated model, validating feasibility, and obtaining optimal objective values or variable assignments to feed back into your application or prompts.
Prerequisites: you need Python and access to Claude Desktop (or a compatible MCP client) installed on your machine.
1. Install Claude Desktop if you haven’t already.
2. Clone the MCP project or download and extract the project archive.
3. Create a Python virtual environment, activate it, and install the dependencies from the requirements file.
git clone https://github.com/KKonuru/GurobiMCP.git
cd GurobiMCP
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtAfter preparing the environment, configure Claude Desktop to connect to the local MCP server. You will point Claude to the Python interpreter inside your virtual environment and to the main script that runs the MCP server.
{
"mcpServers": {
"gp-solver": {
"command": "/Path/to/gurobiMCP/.venv/bin/python",
"args": [
"/Path/to/gurobiMCP/main.py"
]
}
}
}Restart Claude Desktop after you save the configuration. The Gurobi MCP should appear as an available tool after you open the second icon on the left. You will then be able to select it as a data source or tool for your prompts.
The MCP server runs on your device and uses the Gurobi software installed locally. You can address optimization problems in real time from your AI workflows and receive immediate results without sending data to remote servers.