Back to browse
GitHub Repository

The MCP-Native AI Gateway — Route requests to any AI provider through one universal endpoint. Intelligent auto-routing, 65+ models, self-hosted. Open source.

4 starsTypeScript

Styx, Open-source AI gateway with intelligent auto-routing (MCP-native)

by timmx7·Mar 9, 2026·2 points·0 comments

AI Analysis

●●SolidSlickSolve My Problem

First gateway with native MCP server—connect Claude Code or Cursor in one command.

Strengths
  • MCP-native is genuine differentiation—LiteLLM and OpenRouter don't have this
  • 9-signal classifier for auto-routing is more sophisticated than simple cost-based routing
  • Go router with <10ms overhead plus Python FastAPI dashboard is sensible architecture
Weaknesses
  • AI gateway space is crowded—LiteLLM, OpenRouter, Portkey all well-established
  • 1 star with 41 open PRs suggests either very new or maintenance concerns
Target Audience

Teams needing unified AI provider access with cost optimization

Similar To

LiteLLM · OpenRouter · Portkey

Post Description

Hey HN, We just open-sourced Styx — an AI gateway that sits between your app and AI providers (OpenAI, Anthropic, Google, Mistral). One endpoint, any model, self-hosted. What makes it different from LiteLLM or OpenRouter:

styx:auto — send "model": "styx:auto" and the gateway picks the right model based on prompt complexity. Simple questions go to cheap models ($0.15/1M tokens), complex code goes to frontier models. 9-signal classifier, zero config. MCP-native — first gateway with a built-in MCP server. Connect Claude Code or Cursor in one command: claude mcp add styx -- npx styx-mcp 65+ models with live pricing — prices auto-refresh every 24h from OpenRouter's public API. Self-hosted in 5 min — git clone, run setup.sh (interactive wizard), docker compose up.

Tech stack: Go (router/proxy, <10ms overhead), Python FastAPI (auth, billing), Next.js (dashboard). Apache 2.0. The auto-routing is the killer feature. Instead of hardcoding gpt-4o everywhere, your app sends styx:auto and the gateway classifies each request on 9 signals (prompt length, code presence, reasoning patterns, math, conversation depth, etc.) then routes to the optimal model. You also get styx:fast (always cheapest), styx:balanced, and styx:frontier (always best). Try it: https://github.com/timmx7/styx Would love feedback on the architecture and the auto-routing approach. Happy to answer questions.

Similar Projects

AI/MLMid

Consciousness Gateway – AI routing with consciousness-first alignment

Product Algebra routing plus an explicit 'dharma' pipeline (no-self regularization, entropy/mindfulness metrics, compassion and ethos scores) is a strikingly specific approach — it moves beyond cost/capability heuristics into cross-modal interaction scoring and reputation-driven incentives. There's real engineering here (1s perception loop, SQLite memory, Telegram UX, multi-provider SDK support), but the repo reads young and claim-heavy: I want reproducible benchmark artifacts, links from the code to the cited 439-model experiments, and clearer deployment/security guidance before trusting it for critical workloads.

Bold BetBig Brain
AIconscious
203mo ago
AI/ML●●Solid

Docker AI Stack, self-hosted LLM/STT/TTS/MCP in one compose file

One-command local AI stack bundling Ollama, Whisper, and MCP Gateway.

Ship ItCozy
hwdsl2
1028d ago