Get the FREE Ultimate OpenClaw Setup Guide →

mcp-optimizer

Mathematical Optimization MCP Server with PuLP and OR-Tools support

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dmitryanchikov-mcp-optimizer uvx mcp-optimizer \
  --env TRANSPORT_MODE="Optional. Use 'stdio' (default) or 'sse' to select transport."

How to use

MCP-Optimizer is a Python-based MCP server that provides mathematical optimization capabilities using PuLP and OR-Tools. It supports two transport modes: STDIO for direct MCP client integration (Claude Desktop, Cursor, etc.) and SSE for remote web clients. The server can be run via uvx, Docker, or a Python/Pip installation, giving flexibility across platforms. Once running, you can connect through an MCP-compatible client and send standard MCP messages to initialize, query capabilities, and perform optimization tasks. The SSE endpoint is typically exposed at /sse when using the SSE transport.

How to install

Prerequisites:

  • Python 3.11+ (for native Python usage) or a working uvx environment
  • Docker (optional, for containerized runs)
  • Optional: a Python package manager (pip) or uvx tooling

Option A — Docker (recommended for stability):

# Run the MCP-Optimizer container with STDIO transport by default
docker run --rm -i ghcr.io/dmitryanchikov/mcp-optimizer:latest

# Run with SSE transport exposed on port 8000
docker run -d -p 8000:8000 -e TRANSPORT_MODE=sse ghcr.io/dmitryanchikov/mcp-optimizer:latest

# Check SSE endpoint
curl -i http://localhost:8000/sse

Option B — Python with Pip (standard installation):

# Create and activate a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or .venv\Scripts\activate  # Windows

# Install the package
pip install mcp-optimizer

# Run in STDIO mode (default) or specify transport
mcp-optimizer --transport stdio

Option C — uvx (universal runner):

# Install uvx if not already installed
# Then run the MCP-Optimizer via uvx
uvx mcp-optimizer

# Run with SSE transport explicitly
uvx mcp-optimizer --transport sse

Additional notes:

  • If you intend to use OR-Tools on macOS, you may need to install OR-Tools via Homebrew and use pip install "mcp-optimizer[stable]" for full support.
  • You can tailor the transport through environment variables or CLI options as shown above.

Additional notes

Tips and common issues:

  • The SSE endpoint is typically http://localhost:8000/sse when using the SSE transport.
  • For macOS users, the uvx pathway may have limited functionality; prefer Docker or pip installation for full PuLP and OR-Tools support.
  • If you encounter transport or dependency issues, ensure your environment variable TRANSPORT_MODE is set to a supported value (stdio or sse) and that the chosen method has the appropriate dependencies installed.
  • When using Claude Desktop or Cursor integrations, you can generate configuration blocks that point to the appropriate command and transport, as demonstrated in the README examples.

Related MCP Servers

Sponsor this space

Reach thousands of developers