Skip to main content

Config Schema

The published JSON Schema for external validators lives in the in-repo spec subproject:

  • spec/schemas/cli.schema.json

This implementation also carries a local copy at pkg/config/cli.schema.json, and the loader embeds that copy for runtime validation. In practice, keep both in sync and treat the spec/schemas/ version as the public contract.

Top-level fields

FieldTypeRequiredNotes
clistringyesMust be non-empty.
modeobjectyesRequires default.
runtimeobjectnoRuntime deployment selection plus local/remote runtime settings.
sourcesobjectyesMust contain at least one source after final merge.
mcpServersobjectnoCompatibility input normalized into canonical MCP sources and services.
servicesobjectnoOptional named services.
curationobjectnoTool sets for curated views.
agentsobjectnoProfiles and default profile.
policyobjectnoApproval and secret-exec policy.
secretsobjectnoSecret references keyed by security scheme name.

sources.*

FieldTypeRequiredValues / meaning
typestringyesapiCatalog, serviceRoot, openapi, or mcp
uristringdependsRequired for non-MCP sources
enabledbooleannoDefaults to enabled for newly introduced sources
refresh.maxAgeSecondsintegernoMust be >= 0
refresh.manualOnlybooleannoReuse cache until a forced refresh is requested
transportobjectfor mcpMCP transport configuration
disabledToolsstring[]noMCP tools removed before normalization
oauthobjectstreamable-http onlySource-local MCP transport OAuth (clientCredentials only)

For openapi, serviceRoot, and apiCatalog sources, uri is the only discovery endpoint field. MCP-only fields (transport, disabledTools, and source-local oauth) are rejected by the schema.

runtime

FieldTypeMeaning
modestringauto, embedded, local, or remote
localobjectLocal runtime lifecycle and sharing configuration
remoteobjectRemote runtime URL and runtime-auth configuration

runtime.local

FieldTypeMeaning
sessionScopestringterminal, agent, or shared-group
heartbeatSecondsintegerExpected heartbeat interval for managed local ownership
missedHeartbeatLimitintegerMissed heartbeat threshold before considering the owner gone
shutdownstringwhen-owner-exits or manual
sharestringexclusive or group
shareKeystringExplicit group-sharing key

shutdown: "manual" is only valid with sessionScope: "shared-group".

runtime.remote

FieldTypeMeaning
urlstringBase URL for the remote runtime. Required when runtime.mode is remote.
oauthobjectOptional runtime-auth configuration for the remote runtime itself

runtime.remote.oauth

FieldTypeMeaning
modestringprovidedToken, oauthClient, or browserLogin
audiencestringOptional OAuth audience for runtime token requests
scopesstring[]Optional runtime scopes such as service bundles or tool grants
tokenRefstringRequired for providedToken; currently supports env:NAME references
client.tokenURLstringToken endpoint for oauthClient mode
client.clientIdobjectSecret ref for the OAuth client ID in oauthClient mode
client.clientSecretobjectSecret ref for the OAuth client secret in oauthClient mode
browserLogin.callbackPortintegerOptional fixed localhost callback port for browserLogin mode

runtime.server.auth

FieldTypeMeaning
validationProfilestringoidc_jwks or oauth2_introspection
modestringLegacy alias for oauth2Introspection; accepted on input and normalized to validationProfile: "oauth2_introspection"
issuerstringRequired issuer for oidc_jwks validation
jwksURLstringRequired JWKS endpoint for oidc_jwks validation
audiencestringRequired audience for both oidc_jwks and oauth2_introspection validation
introspectionURLstringRFC 7662-style token introspection endpoint for oauth2_introspection
clientId / clientSecretobjectOptional secret refs used when the introspection endpoint itself requires client auth
authorizationURLstringOptional browser-login authorization endpoint exposed via runtime metadata
tokenURLstringOptional browser-login token endpoint exposed via runtime metadata
browserClientIdstringOptional public OAuth client ID exposed via runtime metadata

runtime.server.auth.validationProfile: "oidc_jwks" requires issuer, jwksURL, and audience.

runtime.server.auth.validationProfile: "oauth2_introspection" requires both audience and introspectionURL.

sources.*.transport

Fieldstdiossestreamable-http
typerequiredrequiredrequired
commandrequiredforbiddenforbidden
argsoptionalforbiddenforbidden
envoptionalforbiddenforbidden
urlforbiddenrequiredrequired
headersforbiddenoptionaloptional
headerSecretsforbiddenoptionaloptional

Current stdio framing is newline-delimited JSON-RPC.

mcpServers.*

mcpServers is a compatibility input for .mcp.json-style configuration. Each entry is normalized into:

  • sources.<name> with type: "mcp"
  • services.<name> when an explicit service is not already present

services.*

FieldTypeRequiredMeaning
sourcestringyesSource ID to bind to this service
aliasstringnoTop-level CLI command name
overlaysstring[]noOverlay document refs
skillsstring[]noSkill manifest refs
workflowsstring[]noArazzo workflow refs

curation.toolSets.*

FieldTypeMeaning
allowstring[]If non-empty, only matching tools are visible in the tool set
denystring[]Matching tools are removed from the tool set

agents

FieldTypeMeaning
defaultProfilestringProfile used when the active mode is curated and no explicit profile is provided
profiles.*.modestringdiscover or curated
profiles.*.toolSetstringName of a tool set under curation.toolSets

policy

FieldTypeMeaning
denystring[]Merged into effective config; see runtime nuance below
approvalRequiredstring[]Tool patterns that require approval
allowExecSecretsbooleanEnables exec secret resolution

secrets.*

FieldTypeMeaning
typestringenv, file, osKeychain, exec, or oauth2
valuestringEnv var name, file path, keychain ref, or fallback command
commandstring[]Explicit argv for exec secrets
modestringFor oauth2: authorizationCode or clientCredentials
issuer / authorizationURL / tokenURLstringOAuth endpoint configuration
clientId / clientSecretobjectNested static secret refs for OAuth clients
scopes / audiencestring[] / stringOptional OAuth request shaping
interactive, callbackPort, redirectURI, tokenStoragemixedAuthorization-code and token caching controls

Loader behavior that matters in practice

JSON only

Config files are decoded with Go's JSON decoder. .cli.json is literal JSON, not YAML.

Unknown fields are rejected

The loader calls DisallowUnknownFields() during JSON decoding. In practice, that means stray keys still fail even in places where the JSON Schema is intentionally permissive for forward compatibility.

Cross-reference validation exists

After schema validation, the loader also checks that every services.<id>.source points at a known source.

It also validates MCP transport constraints, OAuth ownership of the transport Authorization header, and MCP/OAuth compatibility rules such as "SSE forbids source-local OAuth".

It also validates runtime-specific rules such as:

  • runtime.mode: "remote" requires runtime.remote.url
  • runtime.remote.oauth.mode: "providedToken" requires runtime.remote.oauth.tokenRef
  • runtime.remote.oauth.mode: "oauthClient" requires client.tokenURL, client.clientId, and client.clientSecret
  • runtime.server.auth.validationProfile: "oidc_jwks" requires issuer, jwksURL, and audience
  • runtime.server.auth.validationProfile: "oauth2_introspection" requires audience and introspectionURL
  • legacy runtime.server.auth.mode: "oauth2Introspection" is still accepted and normalizes to validationProfile: "oauth2_introspection"

Final validation is stricter than per-scope validation

Individual scope files may omit required top-level fields. The final merged config may not.

Runtime nuance: policy.deny

The schema exposes policy.deny, and the loader merges it into the effective config. The current execution-time policy engine, however, only enforces the internally tracked managed deny list directly. Use curated tool sets and managed scope policy for hard deny behavior in the current release.