Configuration

This is the consolidated lookup table for configuring the client side of Unyform โ€” the env vars, flags, and files you set on your own machine. Nothing here is a secret you hand to Unyform: your provider keys stay yours (BYOK), and the gateway settings that govern a request live in the dashboard, summarized at the bottom.

The four surfaces, and what each one configures:

SurfaceYou setCovered in
Gateway routingA base-URL env var so your tool's inference flows through UnyformPoint Claude Code
MCP server / CLIUNYFORM_* vars + project/credential filesUse the MCP server
CC pluginOne install command; an auth file holds the restUse the Claude Code plugin
The gateway itselfDashboard toggles (providers, policies, โ€ฆ)Create a gateway

Gateway routing (point a tool at the gateway)

Routing is one base-URL variable. Your tool keeps talking its provider's native protocol; Unyform exposes the same protocol at your gateway URL.

VariableSet it toNotes
ANTHROPIC_BASE_URLhttps://gateway.unyform.ai/gw/<gateway-id>Claude Code and the Anthropic SDK
OPENAI_BASE_URLhttps://gateway.unyform.ai/gw/<gateway-id>OpenAI SDK; gateway serves /v1/chat/completions
ANTHROPIC_API_KEYyour own key โ€” unchangedForwarded upstream verbatim, never stored (BYOK)
OPENAI_API_KEYyour own key โ€” unchangedSame โ€” your credential, your bill

Note

You keep setting your provider key exactly as before. The gateway forwards your ANTHROPIC_API_KEY / OPENAI_API_KEY (or OAuth credentials) to the upstream provider and never persists them. The only thing that changes is the base URL.

The <gateway-id> in the URL is configuration, not a secret โ€” it identifies your org's gateway. Set the base URL per shell with export, or per project in .claude/settings.json under "env".

MCP server & CLI

The unyform-mcp server and the unyform CLI read the same three settings, resolved flag โ†’ environment โ†’ project config, in that order:

SettingFlagEnvironmentFalls back to
Org--org-idUNYFORM_ORG_IDorg_id in .unyform/config.yml
API URL--api-urlUNYFORM_API_URLhttps://api.unyform.ai
Authโ€”UNYFORM_API_KEY~/.unyform/credentials.json

Files

PathCreated byContents
~/.unyform/credentials.jsonunyform login{ "api_key": "..." }, mode 0600 on Unix
.unyform/config.ymlunyform init --org-id <id>Per-project org_id, optional gateway_id, api_url

A .unyform/config.yml looks like this โ€” only org_id is required:

org_id: <org-id>
# optional overrides:
# gateway_id: <gateway-id>
# api_url: https://api.unyform.ai

The server walks up from the current directory to find the nearest .unyform/config.yml, so any subdirectory of a project inherits its org.

Tip

Authenticate once with unyform login to write the credentials file, or export UNYFORM_API_KEY in the environment your MCP client launches the server in. The key is sent as a bearer token and is never embedded in the config you paste into your editor.

Registering the server

The same three settings can be passed via the client's MCP config. Per tool:

claude mcp add unyform -- unyform-mcp --org-id <org-id>
{
  "mcpServers": {
    "unyform": {
      "command": "unyform-mcp",
      "args": ["--org-id", "<org-id>"]
    }
  }
}
[mcp_servers.unyform]
command = "unyform-mcp"
args = ["--org-id", "<org-id>"]

Add --debug to the args to log tool calls to stderr. See Use the MCP server for the full tour.

Claude Code plugin

The mx cc-plugin plugin needs no env vars in normal use โ€” install writes its auth config for you. The one input is a per-gateway key:

mx cc-plugin install --api-key uny_gw_your_key_here
WhatWhere
Auth config~/.config/unyform/cc-plugin.json (Linux) / ~/Library/Application Support/unyform/cc-plugin.json (macOS), mode 0600
Hook entries~/.claude/settings.json (SessionStart, Stop)
Key source--api-key flag, or UNYFORM_API_KEY if the flag is omitted
Base URLhttps://gateway.unyform.ai by default; override with --base-url for staging/dev

The uny_gw_โ€ฆ key resolves to exactly one gateway, so the plugin knows which blueprints to serve with no further config. See Use the Claude Code plugin.

Gateway-side settings (dashboard)

Everything that governs a request โ€” which providers are allowed, whether BYOK passthrough is on, which blueprints inject, and how policies enforce โ€” is configured per gateway in the dashboard, not on your machine.

SettingWhereWhat it controls
ProvidersProviders tabAnthropic / OpenAI / Azure / Google / Custom, default model, priority
PassthroughPer-provider toggleWhether clients may route with their own (BYOK) key
BlueprintsBlueprints tabWhich blueprints inject, and their priority
PoliciesPolicies tabWhich org policies attach to this gateway
Enforcement modePer-policyEnforce (block), Warn (log, pass), or Disabled
API keysAPI Keys tabMint / revoke uny_gw_โ€ฆ keys for the gateway

Note

A gateway with no policies still injects blueprints and context โ€” it just doesn't gate requests.

For the full walkthrough, see Create & configure a gateway.

Edit this page on GitHub