Using the MCP server¶
This page focuses on what that looks like in practice. For installing and configuring the MCP server itself, see the MCP Server documentation.
Any MCP-compatible LLM coding assistant—such as Claude Code, Gemini, or ChatGPT—can call Modeler as a tool, whether you’re working from a terminal, an IDE, or a desktop chat app.
The examples below show what that looks like in Claude Code, including its IDE extension for Visual Studio Code, as well as Claude Desktop and ChatGPT Desktop. The same applies to JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, and others) or any other MCP client.
In the terminal¶
Here’s an example of calling Modeler from Claude Code in a terminal: describe the business problem you’re trying to solve, and Modeler searches the knowledge base and asks clarifying questions to build a complete specification before generating any code.
~/work/facility-project $ claude > A company currently ships its product from 5 plants to 4 warehouses. It is considering closing one or more plants to reduce cost. ⏺ gurobi:modeler (MCP) ⎿ Searched knowledge base for facility location examples ⏺ Great, this is a classic facility location / plant closing problem. I found relevant examples in the knowledge base to guide the modelling. Let me ask a few questions to build a complete specification. Question 1: What is the primary business objective? 1. Minimize total cost (shipping costs + fixed operating costs of open plants) 2. Minimize shipping costs only 3. Minimize fixed costs only 4. Another objective Learn More: • Facility Examples ★★☆ • facility_cs.cs ★★☆
In VS Code¶
Here’s the same example using the Claude Code IDE extension for Visual Studio Code, so you can keep the conversation open in a side panel while you edit the model file it’s talking about.
# facility_spec.md ## 1. Overview Ships from 5 plants to 4 warehouses; considering closing plants to cut cost. ## 2. Objective (pending — Question 1 above)
⎿ Searched knowledge base for facility location examples
Question 1: what's the primary objective?
1. Total cost (shipping + fixed costs)
2. Shipping cost only
3. Fixed cost only
4. Another objective
In Claude Desktop¶
Here’s the same example using Claude Desktop: ask in plain language, and Modeler asks clarifying questions right inside the conversation to build a complete specification before generating any code.
In ChatGPT Desktop¶
Here’s the same example using ChatGPT Desktop: ChatGPT decides when to call Modeler, and Modeler asks clarifying questions inline to build a complete specification before generating any code.