godelgate Book a demo

Configuration

Every field in godelgate.yaml.

Godelgate reads one YAML file, godelgate.yaml by default (set GODELGATE_CONFIG to change it). Every ${VAR} in the file is replaced with that environment variable before parsing; unset variables become empty. The file is read once at startup.

#Full example

yaml
servers:
  - name: github
    command: npx
    args: [-y, "@modelcontextprotocol/server-github"]
    env: { GITHUB_PERSONAL_ACCESS_TOKEN: "${GITHUB_TOKEN}" }
    labels:
      "get_*": [private]
      "search_*": [untrusted]
      "create_*": [egress]
  - name: docs
    url: https://mcp.example.com/mcp
    headers: { Authorization: "Bearer ${DOCS_TOKEN}" }
  - name: acme
    builtin: demo

users:
  - name: alice
    key: ${ALICE_KEY}
    groups: [engineering]

policy:
  default: allow
  trifecta: block
  approvalTimeoutSeconds: 300
  rules:
    - tool: "github__delete_*"
      action: approve
      reason: "deleting things needs a human"

admin:
  token: ${GODELGATE_ADMIN_TOKEN}

demo:
  public: false

#servers[]

FieldTypeDefaultDescription
namestringrequireda-z, 0-9 and -; unique. Tool prefix.
commandstringStart a local stdio server
argsstring[][]Arguments for command
envmap{}Extra environment for command
urlURLRemote Streamable HTTP server
headersmap{}Headers for url requests
builtindemoBuilt-in demo server
labelsmap of glob → labels{}Labels: private, untrusted, egress
autoLabels{read, write}Labels for tools no pattern matches, chosen by the tool's readOnlyHint
openapi{spec, baseUrl?}A REST API from its OpenAPI document; see REST APIs
isolation.docker{image, network, memory, cpus}Run a command server in a locked-down container; see Isolated local servers

Each server needs exactly one of command, url, openapi or builtin. See MCP servers.

#users[]

FieldTypeDefaultDescription
namestringrequiredName in the audit log
keystringrequiredBearer key, at least 16 characters
groupsstring[][]Groups for rules

See Users and keys.

#policy

FieldTypeDefaultDescription
defaultallow | deny | approveallowDecision when no rule matches
trifectablock | approve | offblockWhat to do when a call completes the trifecta
approvalTimeoutSecondsinteger300How long an approval can wait
rules[].toolglobrequiredMatches server__tool
rules[].actionallow | deny | approverequired
rules[].groupsstring[]everyoneLimit the rule to these groups
rules[].when{arg, op, value}[]Conditions on the call's arguments; see Policy rules
rules[].reasonstringShown to the agent and logged
dlp.redactResultssecrets | secrets_and_pii | offsecretsWhat to hide in tool results; see Data protection
dlp.blockSecretsInArgsbooleantrueDeny calls whose arguments contain a secret

See Policy rules and Lethal-trifecta containment.

#admin

FieldTypeDefaultDescription
tokenstringGODELGATE_ADMIN_TOKEN, else randomToken for /app and /api/*. A random token is printed at startup if none is set.

#demo

FieldTypeDefaultDescription
publicbooleanfalseServe the unauthenticated attack demo at POST /api/demo, rate-limited to 10 runs per minute per IP. It uses its own in-memory gate.

#cloud

FieldTypeDefaultDescription
enabledbooleanfalseTurn on public sign-up at /signup and Cloud workspaces. Leave it off for a private self-hosted gate.
publicUrlURLWhere people reach the gate, for OAuth sign-ins to servers. GODELGATE_PUBLIC_URL overrides it.
passwordsbooleantrueAllow email and password sign-up and sign-in. Set false to make Google the only way in; it stays on if Google sign-in isn't set up.

#Validation

Godelgate refuses to start, and prints the problem, if the file is invalid: an unknown action, a key shorter than 16 characters, a server with zero or several of command/url/builtin, or a duplicate server name.