Why Ultiproxy?
The problem: You pay for GitHub Copilot ($10/mo), ChatGPT Plus/Codex ($20/mo), Claude Pro ($20/mo), Google Antigravity, xAI Grok, DeepSeek, and Z.ai. That's $100+/month in flat-rate AI subscriptions.
Potencialize seu agente
Instalação do publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
Ainda não há uma versão empacotada no registro. Siga o README do repositório.
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDo publicador
The problem: You pay for GitHub Copilot ($10/mo), ChatGPT Plus/Codex ($20/mo), Claude Pro ($20/mo), Google Antigravity, xAI Grok, DeepSeek, and Z.ai. That's $100+/month in flat-rate AI subscriptions.
Agent-first universal LLM subscription proxy. One OpenAI/Anthropic-compatible endpoint for Copilot, Antigravity, Codex, Grok, Freebuff, Z.ai, Augure, DeepSeek, OpenRouter, vLLM & more. Quota-aware routing, per-API-key accounting, MCP server.
Yet every time you spin up an autonomous coding agent--OpenCode, Hermes, Claude Code, Cursor, or Aider--you are forced to supply raw, pay-as-you-go API keys that burn money per token. Meanwhile, your monthly subscriptions sit idle 85% of the day.
The solution: Ultiproxy pools all your subscriptions into ONE local endpoint at :9050 that natively speaks both OpenAI (POST /v1/chat/completions) and Anthropic (POST /v1/messages) -- and exposes its entire control plane over MCP, so an agent can wire it up itself.
ultiproxy serve is the whole installation step. Nothing to author, nothing to edit, nothing to reload: lanes, aliases and timeouts are added at runtime over MCP and persist in the daemon's data dir (providers.json, aliases.json, timeouts.json).http://localhost:9050/mcp -- add_provider, set_model_alias, set_provider_timeout, get_quota_status, initiate_oauth_login, ... An agent can bootstrap the whole gateway on its own. There is no separate admin CLI to install or remember: the daemon binary only serves, and MCP is the sole control plane.get_quota_status tool, /api/quota, and quota.txt. Operators and agents decide routing; the proxy never reroutes on quota by itself.sk-up-agent-a, sk-up-ci-worker) with granular tracking of prompt tokens, completion tokens, cached tokens, requests and cost.reasoning_content in o1/DeepSeek-R1), tool calls, and multi-image vision inputs.Ultiproxy starts with zero configuration: nothing to author, nothing to reload, and nothing that has to be in place before the first request. You boot the daemon, then you (or your agent) configure everything else over MCP while it runs.
# Precompiled binary into ~/.local/bin (no root required):
curl -fsSL https://raw.githubusercontent.com/smhanov/ultiproxy/main/dist/install.sh | sh
# ...or build from source (this repo only):
git clone https://github.com/smhanov/ultiproxy
cd ultiproxy
go build -o ultiproxy ./cmd/ultiproxy
The installer also installs a hardened systemd user unit on Linux. Review it first with bash dist/install.sh --dry-run if you prefer.
Building from source needs only this repository and Go 1.25 or newer
(go.mod declares go 1.25.0). The provider library
github.com/smhanov/llmhub is consumed as a normal published Go module
pinned in go.mod -- no extra checkouts required:
git clone https://github.com/smhanov/ultiproxy
cd ultiproxy
go build -o ultiproxy ./cmd/ultiproxy
# Directly:
ultiproxy serve
# Or as a hardened systemd user service (what the installer sets up on Linux):
systemctl --user enable --now ultiproxy
# Or bound to all interfaces for remote agents, still with no configuration:
ULTIPROXY_ADDR=0.0.0.0:9050 ultiproxy serve
Verify it is alive:
curl http://localhost:9050/healthz # {"status":"ok"}
By default the daemon listens on 127.0.0.1:9050 and accepts every request, which is the right posture for a localhost-only install. Declaring client keys turns on authentication and gives you per-key attribution; upstream credentials are never exposed to clients either way. Two spellings are accepted on every route (including /api/quota and the stats endpoints): Authorization: Bearer <key> for OpenAI-style clients and x-api-key: <key> for Anthropic SDKs and Claude Code.
Streamable HTTP at http://localhost:9050/mcp (legacy SSE at http://localhost:9050/mcp/sse):
{
"mcpServers": {
"ultiproxy": {
"url": "http://localhost:9050/mcp",
"headers": { "Authorization": "Bearer sk-up-local-agent-key" }
}
}
}
Raw JSON-RPC works too, which is handy for scripts:
curl -s http://localhost:9050/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Subscription lanes log in over OAuth; API lanes take a key:
curl -s http://localhost:9050/mcp -H 'Content-Type: application/json' -d '{
"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"add_provider","arguments":{
"name":"deepseek","base_url":"https://api.deepseek.com/v1","api_key":"sk-..."
}}}'
curl -s http://localhost:9050/mcp -H 'Content-Type: application/json' -d '{
"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{"name":"add_provider","arguments":{"name":"antigravity","kind":"antigravity"}}}'
For OAuth lanes, drive the flow instead of pasting keys:
# 1) get the sign-in URL (and user_code for device flows such as xai)
{"name":"initiate_oauth_login","arguments":{"provider":"antigravity"}}
# 2a) auth-code flow: copy the code=... value out of the browser callback URL
{"name":"submit_oauth_code","arguments":{"provider":"antigravity","code":"4/0A..."}}
# 2b) device flow: poll until it answers "completed"
{"name":"check_oauth_login","arguments":{"provider":"xai"}}
An OAuth lane must be added with auth_via_oauth_manager so its stored credential (refresh token included) actually drives the lane. Static api_key lanes never refresh, which is how a lane dies overnight:
curl -s http://localhost:9050/mcp -H 'Content-Type: application/json' -d '{
"jsonrpc":"2.0","id":5,"method":"tools/call",
"params":{"name":"add_provider","arguments":{
"name":"xai","kind":"openaicompat","base_url":"https://api.x.ai","api_key":"",
"quirks":{"auth_via_oauth_manager":true}
}}}
'
Re-adding a lane this way reuses the credential file already in the daemon's data dir (<data_dir>/credentials/<lane>/); only a dead refresh token needs another initiate_oauth_login.
curl -s http://localhost:9050/mcp -H 'Content-Type: application/json' -d '{
"jsonrpc":"2.0","id":4,"method":"tools/call",
"params":{"name":"set_model_alias","arguments":{
"alias":"qwenpoint-3.8",
"provider":"vllm",
"upstream":"Qwen/Qwen3.8-Instruct-AWQ",
"context_limit":131072,
"max_output":8192,
"pricing_tag":"local-gpu"
}}}'
Aliases, lanes and timeouts all survive a restart: the daemon re-reads its data dir and rebuilds the registry, so nothing has to be re-applied.
http://localhost:9050/v1http://localhost:9050Everything below is available on tools/list at http://localhost:9050/mcp, with full self-describing docstrings -- an agent never needs this README to operate the proxy.
Add to ~/.config/opencode/opencode.json:
{
"providers": {
"ultiproxy": {
"name": "Ultiproxy Universal Gateway",
"type": "openai",
"baseURL": "http://localhost:9050/v1",
"apiKey": "sk-up-local-agent-key",
"models": [
"copilot/gpt-4o",
"anthropic/claude-3-5-sonnet",
"deepseek/deepseek-r1",
"vllm/qwenpoint-3.8"
]
}
}
}
Give Hermes the OpenAI-compatible base URL and a model id that exists on the proxy:
{
"llm": {
"provider": "custom",
"base_url": "http://localhost:9050/v1",
"api_key": "sk-up-local-agent-key",
"model": "anthropic/claude-3-5-sonnet",
"max_tokens": 8192,
"temperature": 0.2,
"extra_headers": { "X-Client-Id": "hermes-agent-primary" }
}
}
Run Claude Code against your pooled subscriptions using the native Anthropic endpoint:
export ANTHROPIC_BASE_URL="http://localhost:9050"
export ANTHROPIC_AUTH_TOKEN="sk-up-local-agent-key"
# Launch Claude Code
claude
Settings -> Models -> add an OpenAI-compatible provider:
http://localhost:9050/v1sk-up-local-agent-keyimport OpenAI from "openai";
const openai = new OpenAI({
baseURL: "http://localhost:9050/v1",
apiKey: "sk-up-local-agent-key",
});
const response = await openai.chat.completions.create({
model: "copilot/gpt-4o",
messages: [{ role: "user", content: "Implement quota-aware load balancer in Go." }],
stream: true,
});
curl -s http://localhost:9050/v1/chat/completions \
-H "Authorization: Bearer sk-up-local-agent-key" \
-H "Content-Type: application/json" \
-d '{"model":"copilot/gpt-4o","messages":[{"role":"user","content":"Ping"}]}'
Ultiproxy fronts 11 cloud subscription providers and local self-hosted runtimes. Lanes are added at runtime over MCP -- OAuth subscription lanes through initiate_oauth_login, keyed API lanes through add_provider:
Any other OpenAI-compatible upstream (OpenRouter-style gateways, llama.cpp, TGI, another proxy) is one add_provider call away.
sk-up-...). Upstream subscription credentials and OAuth refresh tokens stay inside the daemon's credential store and never reach a client or a network trace.127.0.0.1:9050; ULTIPROXY_ADDR is the only switch needed to expose it to remote agents.get_client_usage and GET /api/stats/summary.providers.json, aliases.json, timeouts.json) and restored on the next start -- no restart ritual, no drift between what you asked for and what runs.dist/ultiproxy.service) enforces strict process boundaries (ProtectSystem=strict, NoNewPrivileges=true, isolated StateDirectory=ultiproxy).bad-credentials), the lane invalidates it, mints a fresh one and retries exactly once, before the first byte of a response or stream; a second consecutive rejection is returned to the client honestly. Refresh log lines carry the lane name and the new expiry, never a token.unknown_model, never a silent detour to another vendor; tools against a lane without tool support is a 409 model_does_not_support_tools. Failover happens only before the first byte.bind: address already in use on startup. The daemon exits non-zero when its listen address is taken and prints a hint naming ULTIPROXY_ADDR. The usual collision is the default port: 127.0.0.1:9050 is also Tor's SOCKS port, so on a machine running Tor (or a second ultiproxy) bind something else instead — e.g. ULTIPROXY_ADDR=127.0.0.1:9051 ultiproxy serve. The default stays 127.0.0.1:9050 everywhere else in these docs. A client pointed at a port owned by another service gets that service's answer (Tor replies with an HTML "This is a SOCKS proxy" page), so if responses look alien, check what actually owns the port before debugging the proxy.
Pull requests are welcome! Ensure you adhere to the project standards:
docs/openapi.yaml and llms.txt.pkg/mcp/tools.go are the agent-facing documentation -- keep them complete and self-contained.go build ./..., go test ./..., go vet ./...).MIT (c) 2026 Ultiproxy Contributors.
Agent-first universal LLM subscription proxy. One OpenAI/Anthropic-compatible endpoint for Copilot, Antigravity, Codex, Grok, Freebuff, Z.ai, Augure, DeepSeek, OpenRouter, vLLM & more. Quota-aware rou
Visão geral
Agent-first universal LLM subscription proxy. One OpenAI/Anthropic-compatible endpoint for Copilot, Antigravity, Codex, Grok, Freebuff, Z.ai, Augure, DeepSeek, OpenRouter, vLLM & more. Quota-aware routing, per-API-key accounting, MCP server.
Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
Ultiproxy roda localmente via stdio.
Última verificação: 2026-10-28. Agent-first universal LLM subscription proxy. One OpenAI/Anthropic-compatible endpoint for Copilot, Antigravity, Codex, Grok, Freebuff, Z.ai, Augure, DeepSeek, OpenRouter, vLLM & more. Quota-aware routing, per-API-key accounting, MCP server.