---
title: ServerContext
description: Per-request facilities handed to a server plugin's handler.
updated_at: '2026-11-19T06:37:33+01:00'
created_at: '2026-11-11T09:53:08+01:00'
symbol:
  kind: interface
  name: ServerContext
  signatures:
    - interface ServerContext
  members:
    - name: env
      kind: property
      signature: 'readonly env: Readonly<Record<string, unknown>>'
      description: >-
        The platform's env (Cloudflare vars, secrets and bindings), else the
        server's private env vars (Node). In dev, the private env vars plus any
        [[reference/api/core/DEV_BINDINGS|DEV_BINDINGS]], which win on a shared
        name.
    - name: clientAddress
      kind: property
      signature: 'readonly clientAddress: string | undefined'
      description: 'The client''s IP address, when the adapter reports one.'
    - name: vault
      kind: property
      signature: >-
        readonly vault:
        [[reference/api/core/ServerVaultSettings|ServerVaultSettings]]
    - name: base
      kind: property
      signature: 'readonly base: string'
      description: >-
        The absolute path this plugin answers under, without a trailing slash,
        such as `/_svartz/submissions`.
    - name: waitUntil
      kind: method
      signature: 'waitUntil(promise: Promise<unknown>): void'
      description: >-
        Keeps work alive after the response: the platform's `waitUntil` on
        Workers; elsewhere the promise runs on and its failure is logged.
    - name: dashboard
      kind: method
      signature: >-
        dashboard(): Promise<readonly
        [[reference/api/core/DashboardSection|DashboardSection]][]>
      description: >-
        Every dashboard panel the vault's server plugins contribute, grouped by
        plugin in registry order. Starts each plugin's factory that hasn't run
        yet. It checks no permission: whoever lists or renders a panel decides
        who may.
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/core/src/plugin/server.ts#L59
---

# ServerContext
