Gurddy
About
A Model Context Protocol (MCP) server providing solutions for Constraint Satisfaction Problems (CSP) and Linear Programming (LP). Built on the gurddy optimization library, it supports solving a variety of classic problems through two MCP transports: stdio (for IDE integration) an
Explore
- Fast Solution: Millisecond response for small-medium problems (N-Queens N≤12, graphs <50 vertices)
- Scalable: Handles large problems (N-Queens N=100+, LP with 1000+ variables)
- Memory Efficient: Backtracking search and constraint propagation minimize memory usage
- Extensible: Custom constraints, objective functions, and problem types
- Concurrency-Safe: HTTP API supports concurrent request processing
- Production Ready: Docker deployment, health checks, error handling
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GurddyCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install or upgrade the gurddy package.
{
"name": "install",
"arguments": {
"package": "gurddy",
"upgrade": false
}
}
pip install gurddy_mcp
pip install gurddy_mcp[dev]
pip install -e .
pip install -r requirements.txt
If you've already installed gurddy-mcp via pip:
json{
"mcpServers": {
"gurddy": {
"command": "gurddy-mcp",
"args": [],
"env": {},
"disabled": false,
"autoApprove": [
"run_example",
"info",
"install",
"solve_n_queens",
"solve_sudoku",
"solve_graph_coloring",
"solve_map_coloring",
"solve_lp",
"solve_production_planning",
"solve_minimax_game",
"solve_minimax_decision"
]
}
}
}
Available MCP tools (13 total):
- info - Get gurddy MCP server information and capabilities
- install - Install or upgrade the gurddy package
- run_example - Run example programs (n_queens, graph_coloring, minimax, logic_puzzles, etc.)
- solve_n_queens - Solve N-Queens problem for any board size
- solve_sudoku - Solve 9×9 Sudoku puzzles using CSP
- solve_graph_coloring - Solve graph coloring with configurable colors
- solve_map_coloring - Solve map coloring problems (e.g., Australia, USA)
- solve_lp - Solve Linear Programming (LP) or Mixed Integer Programming (MIP)
- solve_production_planning - Production optimization with optional sensitivity analysis
- solve_minimax_game - Two-player zero-sum games (find Nash equilibria)
- solve_minimax_decision - Robust optimization (minimize max loss or maximize min gain)
Test the MCP server:
bash
docker run -p 8080:8080 -e PORT=8080 gurddy-mcp
bash
pip install -r requirements.txt
pip install gurddy>=0.1.6 pulp>=2.6.0
python -c "import gurddy, pulp; print('All dependencies installed')"
```
python -c "from mcp_server.examples import n_queens; n_queens.main()"
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | gurddy-mcp
curl -X POST http://127.0.0.1:8080/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
curl -X POST http://127.0.0.1:8080/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"info","arguments":{}}}'
Python Client Example:
See examples/http_mcp_client.py for a complete example of how to interact with the HTTP MCP server.
The server provides the following MCP tools:
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"gurddy": {
"gurddy": {
"command": "uvx",
"args": [
"gurddy-mcp@latest"
],
"env": [],
"disabled": false,
"autoApprove": [
"run_example",
"info",
"install",
"solve_n_queens",
"solve_sudoku",
"solve_graph_coloring",
"solve_map_coloring",
"solve_lp",
"solve_production_planning"
]
}
}
}
}
McpServers
{
"gurddy": {
"command": "uvx",
"args": [
"gurddy-mcp@latest"
],
"env": [],
"disabled": false,
"autoApprove": [
"run_example",
"info",
"install",
"solve_n_queens",
"solve_sudoku",
"solve_graph_coloring",
"solve_map_coloring",
"solve_lp",
"solve_production_planning"
]
}
}
A comprehensive Model Context Protocol (MCP) server for solving Constraint Satisfaction Problems (CSP), Linear Programming (LP), and Minimax optimization problems. Built on the gurddy optimization library, it supports solving various classic problems through two MCP transports: stdio (for IDE integration) and HTTP/SSE (for web clients).
🚀 Quick Start (Stdio): pip install gurddy_mcp then configure in your IDE
🌐 Quick Start (HTTP): docker run -p 8080:8080 gurddy-mcp or see deployment guide
📦 PyPI Package: https://pypi.org/project/gurddy_mcp
Main Features
🎯 CSP Problem Solving
- N-Queens Problem: Place N queens on an N×N chessboard with no attacks - Graph Coloring: Assign colors to vertices so adjacent vertices differ - Map Coloring: Color geographic regions with adjacent regions differing - Sudoku Solver: Solve standard 9×9 Sudoku puzzles - Logic Puzzles: Einstein's Zebra puzzle and custom logic problems - Scheduling: Course scheduling, meeting scheduling, resource allocation - General CSP Solver: Support for custom constraint satisfaction problems📊 LP/Optimization Problems
- Linear Programming: Continuous variable optimization with linear constraints - Mixed Integer Programming: Optimization with integer and continuous variables - Production Planning: Resource-constrained production optimization with sensitivity analysis - Portfolio Optimization: Investment allocation under risk constraints - Transportation Problems: Supply chain and logistics optimization🎮 Minimax/Game Theory
- Zero-Sum Games: Solve two-player games (Rock-Paper-Scissors, Matching Pennies, Battle of Sexes) - Mixed Strategy Nash Equilibria: Find optimal probabilistic strategies - Robust Optimization: Minimize worst-case loss under uncertainty - Maximin Decisions: Maximize worst-case gain (conservative strategies) - Security Games: Defender-attacker resource allocation - Robust Portfolio: Minimize maximum loss across market scenarios - Production Planning: Conservative production decisions (maximize minimum profit) - Advertising Competition: Market share games and competitive strategies🔌 MCP Protocol Support
- Stdio Transport: Local IDE integration (Kiro, Claude Desktop, Cline, etc.) - HTTP/SSE Transport: Web clients and remote access - Unified Interface: Same tools across both transports - JSON-RPC 2.0: Full protocol compliance - Auto-approval: Configure trusted tools for seamless executionInstallation
From PyPI (Recommended)
```bashSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



