Skip to content

Environment variables

Every sample on this site configures from the environment, so nothing prints a literal endpoint or credential.

Variable
VECTADYNE_MCP_URLYour tenant’s MCP endpoint
VECTADYNE_TOKENA bearer token for a principal

Use these instead of VECTADYNE_TOKEN for anything unattended. The SDK exchanges them for a short-lived token and refreshes it transparently.

Variable
VECTADYNE_CLIENT_IDMachine principal client id
VECTADYNE_CLIENT_SECRETIts secret — a secret, unlike the URL
VECTADYNE_TOKEN_URLToken endpoint. Derived from the MCP URL if unset

See Enrol a machine principal.

Reads the environmentHow
Govectadyne.Config{}.FromEnv()
PythonAgentConfig.from_env()
TypeScriptno facade — read process.env yourself

The TypeScript gap is real and listed rather than discovered:

const mcpUrl = process.env.VECTADYNE_MCP_URL;
const token = process.env.VECTADYNE_TOKEN;
if (!mcpUrl || !token) {
throw new Error("VECTADYNE_MCP_URL and VECTADYNE_TOKEN are required");
}
const client = new VectadyneMCPClient({ mcpUrl, token, app: "my-agent" });

Check both and fail loudly at startup. A client constructed with undefined fails later, further from the cause.

In all three SDKs an explicitly-passed value wins over the environment. FromEnv() fills in what you did not supply; it does not override you.

cfg := vectadyne.Config{App: "release-bot"}.FromEnv().WithDefaults()
// ^ kept ^ fills the rest ^ defaults
Not a secretSecret
VECTADYNE_MCP_URLVECTADYNE_TOKEN
VECTADYNE_CLIENT_IDVECTADYNE_CLIENT_SECRET
VECTADYNE_TOKEN_URL

In CI, put the URL and client id in variables and the token and secret in the secret store.

Credentials are typed values in the SDKs — every formatting path (%+v, repr, asdict, vars, an f-string) yields <redacted>, and reading the real value is an explicit, greppable call. Redaction is a property of the value, not of one display path.

spec/reference/config.md in the server repository lists server-operator settings — latency budgets, backend selection, index tuning. None of it is settable by an integrator, and none of it is here.