About styx-mcp-server
styx-mcp-server connects MCP clients to a self-hosted Styx gateway, routing AI requests across OpenAI, Anthropic, Google, and Mistral. It also provides tools for model selection, project and key management, and usage checks.
Key features
- 01Route requests through Styx
- 02List available models and pricing
- 03Choose a default model
- 04Manage projects and API keys
- 05Check usage and costs
- 06Manage provider keys
Use cases
- 01Send AI requests through one Styx endpoint
- 02Review available models and pricing
- 03Create projects and manage API keys
- 04Inspect usage and cost statistics
MCP support
Exposes Styx request routing and gateway management tools to MCP-compatible clients. Supports standard startup and an SSE transport.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y styx-mcp-serverSTYX_API_KEYSecretStyx API key for routing AI requests through the gateway (required for styx_send_request)STYX_TOKENSecretStyx auth token for project and key management (required for management tools)STYX_API_URLStyx backend API URLSTYX_PROXY_URLStyx proxy URL for AI request routingLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEstyx-mcp-server
MCP server for Styx — the intelligent AI gateway that routes requests across OpenAI, Anthropic, Google, and Mistral from a single endpoint.
Connect Claude Code, Cursor, Windsurf, or any MCP-compatible client to your self-hosted Styx instance.
Quick start
# Add to Claude Code
claude mcp add styx -- npx styx-mcp-server
# Or run directly
npx styx-mcp-server
Requirements
- Node.js 18+
- Python 3.10+ with dependencies:
pip install mcp[cli] httpx pydantic
Configuration
Set environment variables before starting:
| Variable | Default | Description |
|---|---|---|
STYX_API_URL | http://localhost:8000 | Styx backend URL |
STYX_PROXY_URL | http://localhost:8080 | Styx proxy URL |
STYX_API_KEY | — | API key (for styx_send_request) |
STYX_TOKEN | — | Auth token (for project/key management) |
Claude Code config
Add to .claude/mcp.json:
{
"mcpServers": {
"styx": {
"command": "npx",
"args": ["styx-mcp-server"],
"env": {
"STYX_API_URL": "http://localhost:8000",
"STYX_PROXY_URL": "http://localhost:8080",
"STYX_API_KEY": "sk-styx-...",
"STYX_TOKEN": "your-token"
}
}
}
}
Tools
| Tool | Description |
|---|---|
styx_send_request | Route AI requests through the gateway |
styx_list_models | List all available models with pricing |
styx_switch_model | Set a default model |
styx_list_projects | List your projects |
styx_create_project | Create a new project |
styx_list_api_keys | List API keys |
styx_create_api_key | Create an API key |
styx_check_usage | View usage and cost statistics |
styx_manage_providers | Manage BYOK provider keys |
SSE transport
npx styx-mcp-server --sse # starts on port 8090
License
Apache-2.0
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.