# styx-mcp-server

This MCP server wires your client to a self-hosted Styx gateway, which spreads requests across Anthropic, Anthropic, Google and Mistral.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: timmx7
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/timmx7/styx/tree/HEAD/styx-mcp-server
- Updated: 2026-06-08
- HTML: https://affpapa.org/en/nevibecode/mcp/styx-mcp-server

## What it does

Nine tools come with it. `styx_send_request` pushes a prompt through the gateway, `styx_list_models` returns the models with their pricing, and `styx_switch_model` pins a default. The rest cover account work: listing and creating projects, listing and creating API keys, checking usage and cost, and managing BYOK provider keys through `styx_manage_providers`.

You need Node.js 18+ and Python 3.10+ with `mcp[cli]`, `httpx` and `pydantic` installed. Point the server at your backend with `STYX_API_URL` (default `http://localhost:8000`) and at the proxy with `STYX_PROXY_URL` (default `http://localhost:8080`). `STYX_API_KEY` is what `styx_send_request` authenticates with; `STYX_TOKEN` covers project and key management. Set both before you start, otherwise half the tools stay dark.

SSE is available too: `npx styx-mcp-server --sse` listens on port 8090. Apache-2.0.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `STYX_API_KEY`, `STYX_TOKEN`, `STYX_API_URL`, `STYX_PROXY_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env STYX_API_KEY=<STYX_API_KEY> --env STYX_TOKEN=<STYX_TOKEN> --env STYX_API_URL=<STYX_API_URL> --env STYX_PROXY_URL=<STYX_PROXY_URL> --transport stdio styx-mcp-server -- npx -y styx-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add styx-mcp-server --env STYX_API_KEY=<STYX_API_KEY> --env STYX_TOKEN=<STYX_TOKEN> --env STYX_API_URL=<STYX_API_URL> --env STYX_PROXY_URL=<STYX_PROXY_URL> -- npx -y styx-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "styx-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "styx-mcp-server"
            ],
            "env": {
                "STYX_API_KEY": "<STYX_API_KEY>",
                "STYX_TOKEN": "<STYX_TOKEN>",
                "STYX_API_URL": "<STYX_API_URL>",
                "STYX_PROXY_URL": "<STYX_PROXY_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "styx-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "styx-mcp-server"
            ],
            "env": {
                "STYX_API_KEY": "<STYX_API_KEY>",
                "STYX_TOKEN": "<STYX_TOKEN>",
                "STYX_API_URL": "<STYX_API_URL>",
                "STYX_PROXY_URL": "<STYX_PROXY_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e STYX_API_KEY=<STYX_API_KEY> -e STYX_TOKEN=<STYX_TOKEN> -e STYX_API_URL=<STYX_API_URL> -e STYX_PROXY_URL=<STYX_PROXY_URL> styx-mcp-server npx -y styx-mcp-server
```
Replace <…> with your own values

## When to use it
- send a prompt through the Styx gateway without switching clients
- check which models are available and what they cost
- pin a default model for later requests
- create a project and issue an API key for it
- review usage and spending across requests

## Example prompts
- List the models with pricing using styx_list_models
- Route this prompt through the gateway and give me the answer
- Create a project and issue an API key for it

## Similar
- [lemonade-router-builder](https://affpapa.org/en/nevibecode/skills/lemonade-router-builder.md) — skill · 809 installs
- [omni-providers](https://affpapa.org/en/nevibecode/skills/omni-providers.md) — skill · 1100 installs
- [gpt2api-openai-gateway](https://affpapa.org/en/nevibecode/skills/gpt2api-openai-gateway.md) — skill · 378 installs
- [llm-gateway](https://affpapa.org/en/nevibecode/skills/llm-gateway.md) — skill · 333 installs
- [node-connect](https://affpapa.org/en/nevibecode/skills/node-connect.md) — skill · 793 installs
- [Agent MCP Gateway](https://affpapa.org/en/nevibecode/mcp/agent-mcp-gateway.md) — MCP server · ★ 41

From the same set: [timmx7/styx](https://affpapa.org/en/nevibecode/by/timmx7/styx.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
