CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

SAGE — Solver-Augmented Grounding Engine

pragnakar/project_sage
STDIOregistry active
Summary

Connects Claude to production optimization solvers (HiGHS, OSQP, OR-Tools) via local MCP. Exposes tools to solve LP, MIP, quadratic portfolio problems, and workforce scheduling from JSON or Excel. The check_feasibility tool computes irreducible infeasible sets and ranks constraint relaxations when no solution exists, which is often more valuable than approximate answers. Returns dual values, reduced costs, and shadow prices for sensitivity analysis. Also includes read_data_file for ingesting spreadsheets and generate_template for scaffolding problem structure. Runs synchronously but supports iterative solvers that can checkpoint and resume. Useful when you need mathematically certified solutions instead of LLM approximations for resource allocation, scheduling, or portfolio construction.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

SAGE — Solver-Augmented Grounding Engine

SAGE grounds AI in mathematical truth. It is a local MCP server that gives Claude Desktop — and any MCP-compatible agent — the ability to formulate, solve, and certify mathematical optimization problems using production-grade open-source solvers.

Status: v0.1.3 — Alpha · Author: Peter Pragnakar Atreides


Why SAGE Exists

Large Language Models are probabilistic text generators. When you ask an LLM to allocate a budget, design a schedule, optimize a route, or balance a portfolio, it generates text that resembles a solution. No simplex method runs underneath. No branch-and-bound search. No constraint check. The model cannot prove optimality, certify feasibility, or — critically — declare with certainty that no feasible solution exists.

One of the most valuable outcomes in decision-making is a mathematically certified statement of infeasibility. It tells decision-makers their goals conflict, their assumptions are inconsistent, or their constraints must be renegotiated. LLMs have no native mechanism to produce this. SAGE provides it.

SAGE introduces a hybrid intelligence architecture: LLMs handle language and ambiguity; solvers handle optimality and feasibility. Each component does what it is best suited for.

The Runtime Advantage

LLMs operate as single-pass inference systems — token generation stops when the response is done. Optimization solvers work differently: they are inherently iterative and stateful, designed to run for minutes, hours, or days while continuously improving. At any point they can return the best solution found so far, a bound on the optimal objective, and a certificate of optimality or infeasibility.

This "anytime" property enables SAGE to:

  • Decompose large problems using Benders decomposition, column generation, or Lagrangian relaxation
  • Run long-horizon solves asynchronously while the LLM remains conversationally responsive
  • Checkpoint, pause, and resume optimization without losing progress

The result: AI shifts from immediate but approximate to sustained and mathematically grounded.


What it does

CapabilityDetail
Problem typesLP, MIP, Portfolio Optimization (QP), Workforce Scheduling
SolversHiGHS (LP/MIP), OSQP (QP)
File I/ORead/write Excel (.xlsx) and CSV
InfeasibilityIIS detection + ranked relaxation suggestions
SensitivityDual values, reduced costs, allowable ranges
ExplanationPlain-language narration of every result

Quick Start

1. Install

# From PyPI (once published)
pip install sage-solver-mcp

# From source (development)
git clone https://github.com/pragnakar/Project_Sage
cd sage
pip install -e sage-solver-core/
pip install -e sage-solver-mcp/

2. Configure Claude Desktop

Find your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the SAGE server:

{
  "mcpServers": {
    "sage": {
      "command": "uvx",
      "args": ["sage-solver-mcp"]
    }
  }
}

What is uvx? It is a command from the uv Python toolchain that runs a PyPI package ephemerally — no manual pip install required. If you have uv installed (brew install uv on macOS), uvx sage-solver-mcp fetches and runs SAGE automatically. If Claude Desktop cannot find uvx on your PATH, use the full path: "/opt/homebrew/bin/uvx" (macOS) or the output of which uvx.

Restart Claude Desktop and you will see the SAGE tools in the toolbar.

3. Try it

Ask Claude:

"Solve this LP: maximize 3x + 5y subject to x + 2y ≤ 12, x ≤ 8, y ≤ 5, x,y ≥ 0"

Or with a file:

"Read examples/portfolio_5_assets.xlsx and solve it as a portfolio optimization"


MCP Tools

ToolDescription
solve_optimizationSolve LP / MIP / portfolio / scheduling from JSON
read_data_fileRead an Excel or CSV file and return a preview
solve_from_fileRead + solve + write results in one step
explain_solutionNarrate the most recent solve result
check_feasibilityCheck feasibility; if infeasible, compute IIS
generate_templateCreate a blank Excel template for a problem type
suggest_relaxationsRank constraint relaxations for the last infeasible result

Usage Examples

Each example shows the user prompt, which tool is called, a representative input payload, and the output SAGE returns.


Example 1 — Solve a staffing LP

User prompt: I need to figure out how many full-time and part-time employees to schedule to minimize cost. Full-time costs $200/day and covers 8 hours, part-time costs $100/day and covers 4 hours. I need at least 40 hours covered each day and at most 6 full-time staff.

Tool: solve_optimization

{
  "problem_type": "lp",
  "name": "staffing",
  "variables": [
    {"name": "ft", "lb": 0, "ub": 6},
    {"name": "pt", "lb": 0}
  ],
  "constraints": [
    {"name": "coverage", "expression": {"ft": 8, "pt": 4}, "sense": ">=", "rhs": 40}
  ],
  "objective": {"sense": "minimize", "coefficients": {"ft": 200, "pt": 100}}
}

Output: Optimal: ft=2, pt=6, cost=$1,000/day. The coverage constraint is binding. Sensitivity: each additional required hour costs $25.


Example 2 — Diagnose an infeasible schedule

User prompt: My shift schedule says workers need at least 3 people on Monday AND no more than 2 people total — is that solvable?

Tool: check_feasibility

{
  "problem_type": "lp",
  "name": "schedule_check",
  "variables": [{"name": "workers", "lb": 0}],
  "constraints": [
    {"name": "min_staff", "expression": {"workers": 1}, "sense": ">=", "rhs": 3},
    {"name": "max_staff", "expression": {"workers": 1}, "sense": "<=", "rhs": 2}
  ],
  "objective": {"sense": "minimize", "coefficients": {"workers": 0}}
}

Output: INFEASIBLE. Conflicting constraints: min_staff (≥3) and max_staff (≤2) are mutually exclusive. Suggestion: relax max_staff to ≥3 (+50%) or reduce min_staff to ≤2 (−33%).


Example 3 — Portfolio optimization from Excel

User prompt: I have a portfolio spreadsheet with expected returns and a covariance matrix. Optimize it for a target return of 8% while minimizing risk.

Tools: read_data_file → solve_from_file

read_data_file output: Detected sheets: assets (5 rows, columns: ticker, expected_return), covariance (5×5 matrix). Preview looks correct.

solve_from_file output: Optimal allocation — AAPL: 32%, MSFT: 28%, GOOGL: 18%, BND: 22%, CASH: 0%. Portfolio variance: 0.0042 (σ=6.5%). Results written to portfolio_optimized.xlsx.


Example 4 — Generate a template, solve, then explain in detail

User prompt: Can you create a scheduling template I can fill in? Then after I solve it, give me a detailed explanation.

Step 1 — Tool: generate_template with problem_type: "scheduling"

Output: Template written to scheduling_template.xlsx with sheets: workers (name, availability, cost), shifts (name, start, end, required_count), instructions.

Step 2 — Tool: explain_solution with detail_level: "detailed"

Output: "The optimal schedule assigns Alice and Bob to the morning shift (cost: $480) and Carlos to the evening shift (cost: $220). The evening minimum-staffing constraint has a shadow price of $45 — each additional required worker increases cost by $45. The morning capacity constraint has 1 unit of slack."


Example 5 — Integer programming with relaxation suggestions

User prompt: I want to buy whole units of 3 products to maximize profit, but I can only spend $500 and store 20 cubic feet. Product A: $80, 3 ft³, $120 profit. Product B: $50, 5 ft³, $70 profit. Product C: $120, 2 ft³, $200 profit.

Tool: solve_optimization (MIP with integer variables A, B, C; budget ≤ 500; storage ≤ 20; maximize 120A + 70B + 200C)

Tool: suggest_relaxations (called automatically on infeasible sub-problem)

Output: Optimal integer solution: A=2, B=0, C=3, profit=$840. If the budget constraint is binding, suggest_relaxations ranks options: relax budget by $20 (+4%) to $520, or drop 1 unit of C and add 1 unit of A for $760 profit within the original $500 limit.


Example Files

FileProblemResult
examples/portfolio_5_assets.xlsxPortfolio QP — 5 assets (equity + bonds)Optimal allocation
examples/nurse_scheduling.xlsxScheduling MIP — 8 nurses, 3 shifts, 7 daysInfeasible: IIS computed
examples/transport_routing.xlsxTransport LP — 3 warehouses → 5 storesOptimal routes, $2,472 cost
examples/blending_problem.xlsxBlending LP — 6 ingredients, nutrient constraintsOptimal blend, $23.47/100kg

Architecture

Project_Sage/
├── sage-solver-core/          # Pure optimization engine — solver, models, fileio, explainer
│   └── sage_solver_core/
│       ├── models.py   # Pydantic models (LPModel, MIPModel, PortfolioModel, SchedulingModel)
│       ├── solver.py   # HiGHS + OSQP solver adapters
│       ├── builder.py  # JSON → SolverInput builders
│       ├── fileio.py   # Excel/CSV read/write, template generation
│       └── explainer.py# Natural language solution narration + IIS explanation
├── sage-solver-mcp/           # Local MCP server (this package — v0.1)
├── sage-solver-cloud/  # Cloud API (future — v0.2)
└── examples/           # Ready-to-use example files

Data flow:

Claude Desktop → stdio JSON-RPC → sage-solver-mcp → sage-solver-core → HiGHS/OSQP
                                                               ↓
                                                    SolverResult + IIS + Sensitivity

Supported Problem Types

Linear Program (LP)

Variables with continuous bounds, linear objective, linear constraints (<=, >=, =).

Mixed-Integer Program (MIP)

Same as LP but variables can be continuous, integer, or binary.

Portfolio Optimization (QP)

Markowitz mean-variance: minimize risk (quadratic) for a target return, with optional sector and weight constraints.

Workforce Scheduling

Assign workers to shifts over a planning horizon. Constraints: min/max workers per shift, rest periods, skill requirements.


Roadmap

PhaseFocus
v0.1 (now)LP, MIP, Portfolio QP, Scheduling — 7 MCP tools, local stdio server
v0.2sage-solver-cloud FastAPI — remote deployment, async long-running solves
v0.3Simulation — Monte Carlo, discrete-event, stochastic programming
v1.0Decision Intelligence Platform — industry templates, solver marketplace

The long-term ambition is a planetary-scale optimization fabric: interconnected, federated models that co-optimize transportation, energy, supply chains, and infrastructure across institutions — turning SAGE from a single-user tool into shared decision infrastructure.


Development

See CONTRIBUTING.md for dev setup, test instructions, and branch conventions.

393 tests · 0 failures · sage-solver-core 0.1.3 · sage-solver-mcp 0.1.3


License

MIT — Copyright (c) 2026 Peter Pragnakar Atreides

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Categories
AI & LLM Tools
Registryactive
Packagesage-solver-mcp
TransportSTDIO
UpdatedMar 6, 2026
View on GitHub

Related AI & LLM Tools MCP Servers

View all →
SkillFM LLM Cost Optimizer

io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage

LLM cost optimizer for OpenAI, Anthropic, token usage, BYOK, and SkillFM Beacon audits.
Llm Orchestration Agent

io.github.mikerawsonnz/llm-orchestration-agent

Run a prompt through a LangChain (system + human) chain over Gemini on Vertex AI; optional LangSmith
Authenticated Llm Agent

io.github.mikerawsonnz/authenticated-llm-agent

JWT-gated LLM gateway: authenticate (bcrypt/JWT), then run a LangChain-on-Vertex Gemini completion.
Copilot Memory MCP

labforgedev/copilot-memory-mcp

Persistent semantic memory for AI agents using local ChromaDB vector search. No cloud required.
1
Agent Prompt Injection Firewall Mcp

csoai-org/agent-prompt-injection-firewall-mcp

The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Authenticated Multi Llm Agent

io.github.mikerawsonnz/authenticated-multi-llm-agent

Google-OAuth-gated LLM gateway: verify a Google ID token, then run a Gemini (Vertex AI) completion f