Decisify
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Decisify What's the optimal mix of products to maximize profit?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Decisify
Autonomous Mathematical Optimization & Multi-Agent Graphs via Model Context Protocol (MCP)
Key Features • Architecture • Quickstart • Running Server • Client Setup • Tool Catalog • Contributing
🌟 Key Features
🔄 Autonomous Closed-Loop Feedback Cycles: Specialized reviewer agents rigorously audit mathematical formulations, PySCIPOpt code syntax, and runtime solver status (optimal, infeasible, unbounded), automatically cycling back to upstream agents for self-correction.
🧩 Dual Operating Paradigm:
Modular MCP Tools: Call standalone micro-agents for individual tasks (e.g., query clarification, mathematical formulation, sandbox code execution).
Autonomous End-to-End Workflow: Execute the entire multi-agent graph deterministically from a single high-level prompt.
📐 Structured Pydantic Intermediate Representations: Outputs are strictly validated using Pydantic schemas (
FormulationIR,ExecutableModelCode), eliminating fragile regex and markdown parsing errors.🛡️ Subprocess Sandbox Execution: PySCIPOpt models execute in isolated, timeout-protected subprocess environments to ensure host safety and stability.
🐳 Zero-Configuration Docker Deployment: Pre-built Docker container bundled with Debian Slim, SCIP solver, and FastMCP transport support (
stdio,sse,streamable-http).🌐 Native MCP Compatibility: Seamlessly integrates with Claude Desktop, Cursor, VS Code (Cline/Roo-Code), LibreChat, and the official Model Context Protocol Inspector.
Related MCP server: USolver
🏗️ Multi-Agent Architecture & Topology
Decisify organizes Operations Research modeling into a directed, cyclic multi-agent graph with specialized generator and reviewer personas. When an error or inconsistency is detected, the graph dynamically backtracks to the appropriate reasoning stage.
graph TD
User([User / MCP Client]) --> MCP[Decisify FastMCP Server]
subgraph "FastMCP Interface Layer"
MCP --> Decomp[decompose_optimization_query]
MCP --> Tools[Modular Agent Tools]
MCP --> Sandbox[execute_pyscipopt_sandbox]
MCP --> Workflow[run_end_to_end_workflow]
end
subgraph "Autonomous Multi-Agent Graph (Strands Engine)"
ReqClar[Requirements Clarifier Agent] --> ReqRev[Requirements Reviewer Agent]
ReqRev -- "Needs Clarification" --> ReqClar
ReqRev -- "Requirements Validated" --> MathProp[Math Model Proposer Agent]
MathProp --> MathRev[Math Model Reviewer Agent]
MathRev -- "Formulation Errors" --> MathProp
MathRev -- "Math Model Approved" --> CodeGen[PySCIPOpt Model Coder Agent]
CodeGen --> CodeRev[Model Code Reviewer Agent]
CodeRev -- "Syntax / Logic Issue" --> MathProp
CodeRev -- "Code Approved" --> CodeExec[Sandbox Code Executor Agent]
CodeExec --> ExecRev[Execution Reviewer Agent]
ExecRev -- "Runtime / Infeasible Error" --> CodeGen
ExecRev -- "Optimal Solution Found" --> Output([Validated Solution & Report])
end
Workflow --> ReqClar
Tools -.-> ReqClar
Tools -.-> MathProp
Tools -.-> CodeGen
Tools -.-> CodeExecSelf-Correction & Routing Logic
Requirements Phase:
Requirements Clarifierstructures fuzzy user requests into decision variables, sets, parameters, and constraints.Requirements Reviewerverifies completeness.Formulation Phase:
Math Model Proposerwrites formal algebraic specifications (LaTeX/Formulation IR).Math Model Reviewerchecks constraint consistency and objective sense.Implementation Phase:
PySCIPOpt Model Codergenerates structured Python code with typed variables (C,I,B) and solver constraints.Model Code Reviewerinspects code quality and SCIP API compatibility.Execution & Diagnostics Phase:
Sandbox Code Executorexecutes the model in a subprocess sandbox with timeout limits.Execution Reviewerevaluates solver status and diagnoses infeasibilities or unbound solutions.
🚀 Quickstart
Prerequisites
Python 3.12 or higher
An OpenAI-compatible API key (OpenAI, OpenRouter, Azure AI Foundry, or local vLLM/Ollama)
Installation
Using uv (Recommended)
# Clone the repository
git clone https://github.com/your-org/decisify.git
cd decisify
# Create and activate virtual environment
uv venv
source .venv/bin/activate
# Install dependencies
uv pip install -e ".[dev]"Using standard pip
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Environment Configuration
Configure your LLM provider credentials in a .env file or export them directly:
# For OpenAI / OpenRouter
export OPENAI_API_KEY="your-api-key"
export BASE_URL="https://openrouter.ai/api/v1" # Optional override
# For Azure AI Foundry / Azure OpenAI
export BASE_URL="https://<your-resource-name>.openai.azure.com/openai/v1"
export OPENAI_API_KEY="your-azure-key"🖥️ Running the MCP Server
Decisify supports stdio, SSE (Server-Sent Events), and Streamable HTTP transports.
1. Local CLI Execution
# Run over stdio (default)
fastmcp run server.py:mcp
# Run as SSE server on port 8000
fastmcp run server.py:mcp --transport sse --host 0.0.0.0 --port 8000
# Run as Streamable HTTP server on port 8000
fastmcp run server.py:mcp --transport streamable-http --host 0.0.0.0 --port 80002. Docker Container Execution
Pre-configured Docker container with built-in SCIP libraries and FastMCP:
# Build the image
docker build -t decisify:latest .
# Run with stdio transport
docker run -i --rm -e OPENAI_API_KEY="$OPENAI_API_KEY" decisify:latest
# Run with Streamable HTTP transport (Port 8000)
docker run -i --rm \
-p 8000:8000 \
-e OPENAI_API_KEY="$OPENAI_API_KEY" \
decisify:latest \
--transport streamable-http \
--host 0.0.0.0 \
--port 8000
# Run with SSE transport (Port 8000)
docker run -i --rm \
-p 8000:8000 \
-e OPENAI_API_KEY="$OPENAI_API_KEY" \
decisify:latest \
--transport sse \
--host 0.0.0.0 \
--port 8000🔌 Connecting to MCP Clients
Claude Desktop
Add Decisify to your claude_desktop_config.json:
Via Local uv
{
"mcpServers": {
"decisify": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"/absolute/path/to/decisify/server.py:mcp"
],
"env": {
"OPENAI_API_KEY": "your-api-key",
"BASE_URL": "https://openrouter.ai/api/v1"
}
}
}
}Via Docker
{
"mcpServers": {
"decisify": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "OPENAI_API_KEY",
"decisify:latest"
]
}
}
}Cursor & VS Code (Cline / Roo-Code)
Configure via your IDE's mcp.json or MCP settings panel:
For SSE / Streamable HTTP:
{
"mcpServers": {
"decisify": {
"type": "sse",
"url": "http://localhost:8000/sse"
}
}
}For stdio:
{
"mcpServers": {
"decisify": {
"command": "fastmcp",
"args": ["run", "/absolute/path/to/decisify/server.py:mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key"
}
}
}
}LibreChat
Add to your librechat.yaml:
mcpServers:
decisify:
type: sse
url: "http://localhost:8000/sse"MCP Inspector (Interactive Web UI)
Debug and inspect tools, resources, and prompts:
npx @modelcontextprotocol/inspectorOpen the inspector in your browser.
Select Transport:
SSE(orStreamable HTTP).Connect to
http://localhost:8000/sse(orhttp://localhost:8000/mcp).
📦 MCP Catalog: Tools, Resources & Prompts
🛠️ Modular Tools
Tool Name | Type | Description |
| Decomposer Agent | Breaks open-ended optimization queries into modular tool steps. |
| Generator Agent | Extracts structured sets, parameters, variables, bounds, and constraints. |
| Reviewer Agent | Validates requirements completeness and structural integrity. |
| Generator Agent | Generates formal algebraic MILP equations and Formulation IR. |
| Reviewer Agent | Checks formulation validity, constraint dimensions, and linearity. |
| Generator Agent | Generates typed PySCIPOpt Python code complying with |
| Reviewer Agent | Audits PySCIPOpt code for syntax, variable types, and solver methods. |
| Generator Agent | Executes PySCIPOpt model code via the isolated execution sandbox. |
| Reviewer Agent | Evaluates solver outputs, objective values, feasibility, and bounds. |
| Execution Runner | Isolated subprocess runner executing PySCIPOpt code with timeout protection. |
| Autonomous Graph | Runs the complete cyclic multi-agent graph with self-correction loops. |
📚 MCP Resources
URI | MIME Type | Description |
|
| Full reference catalog of tools, agents, schemas, and usage examples. |
|
| Mermaid diagram of the multi-agent graph with cyclic review loops. |
|
| JSON Schema for |
|
| JSON Schema for |
💬 Built-in Prompt Templates
Prompt Template | Arguments | Purpose |
|
| Guides user through structured requirements extraction for an optimization query. |
|
| Guides the formulation of sets, parameters, variables, and constraints. |
|
| Directs the generation of clean, structured PySCIPOpt Python code. |
|
| Performs a dual-stage mathematical and code correctness audit. |
|
| Diagnoses runtime errors, solver infeasibility, or unbounded objective values. |
🧪 Development & Testing
Decisify features a comprehensive test suite covering schema serialization, agent tool registration, controller condition transitions, and isolated sandbox execution.
# Run complete test suite with verbose output
pytest -v
# Run tests with coverage
pytest --cov=src --cov-report=term-missingProject Structure
decisify/
├── src/
│ ├── agents.py # 9 Strands modular agent definitions & prompts
│ ├── controllers.py # Cyclic graph builder & conditional routing logic
│ ├── llms.py # LLM client configuration & environment mappings
│ ├── models.py # Pydantic schemas (FormulationIR, ExecutableModelCode)
│ ├── server.py # FastMCP server registration (tools, resources, prompts)
│ └── tools.py # Subprocess sandbox code execution runner
├── tests/
│ ├── test_agents.py # Agent definition and tool binding tests
│ ├── test_controllers.py # Graph topology, condition evaluation & routing tests
│ ├── test_models.py # Pydantic schema validation & serialization tests
│ ├── test_server.py # FastMCP tools, resources & prompt template tests
│ └── test_tools.py # Sandbox execution & code extraction tests
├── Dockerfile # Container definition with SCIP and FastMCP
├── pyproject.toml # Build configuration, dependencies & metadata
├── server.py # Server export entrypoint
├── CONTRIBUTING.md # Contribution guidelines
└── LICENSE # MIT License🤝 Contributing
Contributions are warmly welcomed! Please read our CONTRIBUTING.md for details on code style, pytest guidelines, adding new agents, and submitting pull requests.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
11 toolsclarify_requirementsB
Analyzes raw user optimization problem descriptions to identify missing requirements, implicit constraints, sets, parameters, decision variables, bounds, and objectives. Produces a structured, unambiguous specification.
Inputs: problem_description (required). Returns: result
decompose_optimization_queryA
Analyzes optimization queries or problems. If the problem is high-level or open-ended, breaks it down into a step-by-step plan using individual modular tools (clarify_requirements, review_requirements, formulate_math_model, review_math_model, generate_model_code, review_model_code, execute_model_code, review_execution_result). NEVER recommends using the overall end-to-end workflow tool. If the request is already specific, recommends only the single required tool.
Inputs: query (required), context. Returns: result
execute_model_codeB
Executes PySCIPOpt optimization code inside an isolated sandbox subprocess, returning execution metrics, solver logs, stdout, and error status.
Inputs: code (required), timeout_seconds. Returns: object
execute_pyscipopt_sandboxB
Direct sandbox execution tool for running Python / PySCIPOpt scripts in an isolated subprocess. Returns success flag, exit_code, stdout, stderr, and execution_time_seconds.
Inputs: code (required), timeout_seconds. Returns: object
formulate_math_modelA
Develops a rigorous mathematical optimization formulation (sets, parameters, variables, objective function, constraints) in LP/MILP/MINLP format from a problem specification. Optionally incorporates reviewer feedback.
Inputs: specification (required), feedback. Returns: result
generate_model_codeB
Translates an approved mathematical formulation into structured, executable PySCIPOpt Python code. Returns structured metadata (model_name, description, code, dependencies, assumptions, objective_sense).
Inputs: formulation (required), feedback. Returns: object
review_execution_resultB
Evaluates solver execution logs, solution optimality, status, and feasibility. Returns 'REVIEW_STATUS: PASSED' or 'REVIEW_STATUS: FAILED' with diagnostic analysis.
Inputs: execution_log (required). Returns: result
review_math_modelA
Audits a mathematical optimization formulation for index consistency, variable domains, bounds, objective alignment, and constraint correctness. Returns 'REVIEW_STATUS: PASSED' or 'REVIEW_STATUS: FAILED'.
Inputs: formulation (required). Returns: result
review_model_codeB
Reviews PySCIPOpt Python code against the mathematical formulation and PySCIPOpt API standards. Returns 'REVIEW_STATUS: PASSED' or 'REVIEW_STATUS: FAILED' with bugs and corrections.
Inputs: code (required), formulation. Returns: result
review_requirementsA
Reviews a clarified problem specification for completeness, consistency, and feasibility. Returns 'REVIEW_STATUS: PASSED' or 'REVIEW_STATUS: FAILED' with specific critique.
Inputs: specification (required). Returns: result
run_end_to_end_workflowA
Executes the full autonomous multi-agent optimization workflow graph with automated feedback loops (Clarification -> Math Modeling -> Code Generation -> Sandbox Execution). CRITICAL WARNING: This tool should ONLY be used when the user EXPLICITLY requests full autonomous end-to-end workflow execution. Otherwise, use individual modular tools.
Inputs: problem_description (required), execution_timeout, max_node_executions. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target distinct artifacts in the optimization workflow, but execute_model_code and execute_pyscipopt_sandbox both run PySCIPOpt code in a sandbox without clearly distinguishing their intended use. decompose_optimization_query also overlaps in an advisory role with clarify_requirements, creating some misselection risk.
All tool names use consistent snake_case with a clear verb_noun pattern (review_*, execute_*, formulate_*, etc.). The naming is predictable and readable throughout.
Eleven tools is a reasonable size for a multi-stage optimization modeling workflow covering clarification, formulation, code generation, execution, and review. However, the two execution tools are likely redundant, making the set slightly larger than necessary.
The tool surface covers the end-to-end lifecycle from requirements clarification through math modeling, code generation, execution, and review at each stage. Minor gaps exist, such as tools for solution interpretation/reporting or model persistence, but core workflows are well supported.
Maintenance
Related MCP Connectors
LLM Orchestration Agent (Mcp)
MCP-Native LLM Orchestration Agent
LLM Orchestration MCP Agent
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP-ORTools integrates Google's OR-Tools constraint programming solver with Large Language Models through the MCP, enabling AI models to: Submit and validate constraint models Set model parameters Solve constraint satisfaction and optimization problems Retrieve and analyze solution22MIT
- AlicenseBqualityFmaintenanceA best-effort universal logic and numerical solver interface using MCP that implements the 'LLM sandwich' model to process queries, call dedicated solvers (ortools, cvxpy, z3), and verbalize results.764Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables 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.MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop and MCP-compatible agents to formulate, solve, and certify mathematical optimization problems using production-grade open-source solvers, providing mathematically grounded decisions.MIT