The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Treg.to listing page.

OpenRouter, but for agent tools instead of models. Point an agent at one base URL with one token and it can do the job: 2,896 catalogued endpoints across 60 providers — SEO and backlinks, social and trends, people and company enrichment, ads, scraping — priced per call, from a cent, with no provider signup. Plus your own team's keys, skills and CLIs, callable by every teammate's agent without the credential ever leaving the server.
Ask for the task, not the tool. You do not need to know which vendor sells backlink data, or to hold an account with them. Search for what you want to do, read the price, call it.
Built for the Superdesign team, live at treg.to — anyone can self-host.
The tools an agent needs for real work sit behind subscriptions nobody buys for a single run — Semrush $139/mo, Moz $99/mo, Crunchbase $99/mo, Apollo $59/seat — behind signup walls, or behind no public API at all (invite-only, partner-only, app-review-only). treg carries those accounts and bills fractions of a cent per call.
SKILL.md. Your own key always wins over treg's, and those calls are never
metered.The vocabulary for the second half:
base_url + credential bindings (each binding injects one
secret into the request; a request can carry several, e.g. an OAuth bearer and a
developer-token header).stripe, gh, vercel, ...) run with the credential injected.SKILL.md) + its secrets + its tool(s), registered together.The one rule: the proxy relays, never models the upstream, and injects auth server-side — so it survives upstream API changes and callers never hold keys.
Visit treg.to (hosted on Render) — the dashboard, sign-in, and every URL below live there.
Same flow as the dashboard's Getting started guide:
Your token identifies you on every call (X-Treg-Token header) and is the same for all tools.
Discover what your team has shared: treg tool ls · check credential health: treg health.
Installs with no token and no configuration. The skill loads as treg:treg and, on its first run,
walks your agent through the rest — the CLI, sign-in, then treg mcp install — so you end up with
the command line and treg's tools. Other agents: npx skills add superdesigndev/treg -s treg
(the -s matters — without it you also get this repo's internal dev skills).
See docs/CLAUDE-PLUGIN.md. MiniMax Code / MiniMax Agent users: the same
skill ships via the MiniMax Plugin Marketplace (docs/MINIMAX-PLUGIN.md).
The Claude Connectors Directory surface is https://treg.to/mcp/v2/. It exposes only curated
catalog endpoints and separates read calls from write calls so Claude receives accurate safety
signals. The existing /mcp/ surface remains available for catalog endpoints, team-owned tools,
and imported skills. See the MCP and OAuth architecture
for the boundary and implementation, and the
submission runbook for release gates.
The catalog is grouped by what endpoints do: keyword and rank tracking, backlinks and authority, AI visibility, trending and discovery, publishing to socials, people and company enrichment, ads management and creative, measurement.
How a catalogued call is served — the credential ladder, in order:
Your own credential always beats treg's, so connecting a key you already pay for makes those calls
free of the balance rather than duplicating them. An endpoint treg has no published price for is
refused, not served free — you are told to connect your own key instead. Where several providers
serve one capability, treg catalog search shows them side by side with prices; choosing is
yours — treg does not silently pick or fail over between providers for you. (When treg's own
account for a provider is out it may serve the same endpoint through a treg-owned relay account,
disclosed on the response; a team can opt out.) The exception you opt into: treg.<capability> routed endpoints, where treg picks the provider for you and names it.
Out of balance is an HTTP 402 carrying balance_micro, estimated_cost_micro and a topup_url,
so an agent can act on it without reading prose.
The zero-thought path — point treg at a project and it figures out what's shareable:
treg upload scans the .env (matching keys against ~80 known providers), every skill
subdirectory, and installed catalog CLIs. Three kinds of things go into the registry — here's how
to share and use each:
Share — one upstream URL callable with a stored key, or bulk from a .env:
Use — the agent-native way: build the real upstream request and prefix it with the proxy.
treg resolves the tool by host, injects the credential, and relays everything else faithfully
(your X-Treg-Token is stripped before the upstream sees it):
Or the CLI shorthand — and treg calls for the audit log:
Share — automatic: treg upload detects installed catalog CLIs (stripe, gh, vercel, …)
and registers them; a recipe-only catalog CLI skill (e.g. stripe-cli) auto-becomes runnable too.
Use — treg run executes the vendor CLI with the org's credential injected, so you never
hold the key or log in:
--local (default) runs on your machine; --server runs on the registry and streams output back.
For a whole session, treg shell start opens a subshell where every registered CLI injects
automatically — just use stripe, gh, … normally; exit reverts. treg runs is the audit log.
Share — a skill is a whole capability (SKILL.md recipe + its secrets + its tool(s)),
registered together so the whole team runs the same skill, maintained in one place:
Use — pull any shared skill into your agent; its API calls go through treg with your token, so the key stays on the server, never in the skill:
Full options for every command: USAGE.md.
Everything is scoped to an org: a token = a (user, org) membership, and every secret, tool,
and skill belongs to the active org. Roles: owner / admin / member / viewer.
Feedback: treg feedback submit friction "The pagination example is unclear."
Share problems or suggestions without private information. See feedback instructions.
USAGE.md — the full treg CLI reference.
/llms.txt — the agent-onboarding file: call
protocol, discovery, auth, CLI, skills. One fetch teaches an agent the whole registry.
The dashboard at treg.to — full CRUD, a guided tutorial (Help → Tutorial), and copyable setup instructions for your agents.
The API — everything the CLI does is plain HTTP; interactive OpenAPI docs live at /docs.
The proxy endpoint is /call/{...}; all endpoints take the X-Treg-Token header.
One command (needs tmux + uv; it syncs the venv itself):
That runs the server in tmux with hot-reload, its own sqlite DB (treg-dev.db), and email OTP dev
mode (sign-in codes shown on the page — no mail sender needed). Day-to-day:
Or run the server directly, without tmux:
Installing to run a server (not from source): the base package is the CLI only. To run a registry, install the server extra —
pip install "tools-registry[server]"— which adds FastAPI, the database drivers, and encryption.pip install tools-registryalone gives just thetregcommand for talking to an existing registry.
The team instance is hosted on Render (web service + Postgres) at treg.to.
Environment variables (prefix TREG_, read from .env):
| Var | Default | Purpose |
|---|---|---|
TREG_DATABASE_URL | sqlite+aiosqlite:///./treg.db | DB URL (SQLite for dev, Postgres in prod) |
TREG_SECRET_KEY | (empty) | Fernet key for secrets-at-rest; empty → an ephemeral key is minted (secrets won't survive a restart) |
TREG_PUBLIC_URL | https://treg.to | treg's public base, used to build the OAuth callback URI |
TREG_SESSION_SECRET | (empty) | signs the dashboard session cookie; falls back to TREG_SECRET_KEY. Set a real value in prod |
TREG_GITHUB_CLIENT_ID / _SECRET | (empty) | GitHub OAuth sign-in (callback <public_url>/auth/github/callback); empty hides the button |
TREG_GOOGLE_CLIENT_ID / _SECRET | (empty) | Google OAuth sign-in (redirect <public_url>/auth/google/callback); empty hides the button |
TREG_INSTAGRAM_CLIENT_ID / _SECRET | (empty) | Instagram App ID and secret for direct Instagram Login (redirect <public_url>/oauth/callback) |
TREG_META_CLIENT_ID / _SECRET | (empty) | Meta app credentials for Facebook Pages, Meta Ads, and optional Instagram page-tools |
TREG_OAUTH_REVIEW_PENDING | instagram-login,page-messages | Registry review keys awaiting production access. Remove page-messages after Page messaging approval; set empty after direct Instagram approval. |
TREG_RESEND_API_KEY / TREG_EMAIL_FROM | (empty) | transactional email via Resend (OTP codes + invites); From must be a Resend-verified sender |
TREG_BLOCKED_EMAIL_DOMAINS | (empty) | comma-separated email domains refused at every sign-up/sign-in door and at team creation (subdomains included, case-insensitive). Empty blocks nothing — no list ships in the code |
TREG_ADMIN_TOKEN | (empty) | cross-tenant super-admin bearer; authorizes every /admin/* endpoint. Empty disables the env path (only is_superadmin users reach /admin). Keep it long + secret. |
TREG_EMAIL_DEV_MODE | false | when true, /auth/email/start returns the OTP in its response (no mail sender needed) — dev/local only, never in prod. |
No .env is needed for local dev — every setting has a working default (ephemeral key, sqlite).
⚠️ Back these up before moving or redeploying: the Fernet key (
TREG_SECRET_KEY) and the database (Postgres in prod;treg.dbfor a local sqlite run). Lose the Fernet key and every stored secret becomes unrecoverable.
Request flow for /call: resolve tool (by URL host + longest base_url prefix, or by name) →
decrypt its secret(s) → apply each binding's injector → stream to the upstream → fire-and-forget
audit record. The proxy does no business logic and never buffers the body.
Module map (src/treg/):
| Module | Role |
|---|---|
proxy.py | relay() — the whole product in one function: a faithful streaming proxy |
injectors.py | the auth-shape seam: env, cli_auth, secret_file, oauth place a secret into a header/query |
oauth.py | token freshness (single-flight refresh) + the connect flow (consent URL, code exchange) |
health.py | credential health: refresh oauth, probe tools, webhook the owner of anything broken |
convert.py | scaffold a skill directory into a registerable bundle manifest |
api.py | the API — the only brain; CLI + skill are thin clients over it |
cli.py | the treg CLI |
models.py | SQLModel tables: Org, User, Membership, Invite, Secret, Tool, Bundle, PendingOAuth, CallRecord |
crypto.py config.py db.py audit.py | Fernet encryption + tokens · settings · async DB · deferred audit writer |
The 4 auth shapes (per binding injector): env (plain string / API key) · secret_file (a
JSON token file, pull a field) · oauth (a JSON OAuth token, auto-refreshed if refreshable) ·
cli_auth (material lifted from a CLI's keychain).
Faithful-relay contract: the proxy alters only three things, everything else is verbatim:
x-treg-token, x-treg-org,
ngrok-skip-browser-warning, x-forwarded-*, via, …) and treg's session cookie — all stripped,
never leak upstream,OAuth, three ways to get the first token: manual upload (drop in a token.json) ·
auto-refresh (if the token carries refresh_token + client creds, treg keeps it fresh, you never
re-upload) · hosted connect flow (treg oauth connect → browser consent → treg captures the
token itself).
Health checks: give a tool an optional probe ({method, path, expect_status}); a periodic run
(on demand or via cron) validates every credential, refreshes OAuth, and webhooks the owner of any
that break.
Deep design lives in docs/context/ (per-subsystem fragments).
Coverage: proxy walking-skeleton, all injector shapes, per-user auth + CRUD + audit, skill composer,
URL-passthrough + faithful relay, OAuth refresh + connect flow, health checks, treg run/shell,
upload/scan, orgs + invites, the dashboard API, CLI.
Per-subsystem design docs are fragments in docs/context/, each citing its src/treg/*
sources. Working in this repo with an AI agent? The /tools-registry-context skill loads the
right fragment for what you're touching and keeps the docs in sync — run
/tools-registry-context sync before pushing.
Roadmap: MCP support · finer permission tiers · at-rest key-management hardening · possible Loopni merge.
Apache 2.0 with additional terms (LICENSE): use it freely — including commercially,
inside your own organization (self-hosting your own registry is encouraged). The restriction: don't
redistribute the code to third parties as a competing hosted/managed registry service without written
permission (jason@superdesign.dev). Using the hosted treg.to API inside your own product —
with pass-through billing via X-Treg-Meta and usage/by-tag — is allowed without permission;
that's calling our API, not redistributing our software.