Environment variables
Set environment variables to override configuration-file defaults.
Connection
KIBANA_BASE_URLKIBANA_USERNAMEKIBANA_PASSWORDKIBANA_PROFILEoptional, selects a saved non-default machine profileKIBANA_TIMEOUT_MSoptional, default10000KIBANA_SOURCE_CATALOG_PATHrequired for direct environment-based startup unless a configuration-file store supplies the catalog; saved profiles carry their own path. No implicit default.
Deadlines and cancellation
KIBANA_TIMEOUT_MS covers each Kibana HTTP request end to end: queue wait, connection and response-body read.
- Per configured client: eight concurrent requests, 32 queued. Excess work fails immediately with
KIBANA_OVERLOADED. - Cancelled MCP calls abort queued/in-flight backend work.
- Shared schema discovery: cancellation stops only that caller's wait while others remain; the last caller's cancellation aborts the shared backend request.
Backend failures use stable codes: KIBANA_TIMEOUT, KIBANA_CANCELLED, KIBANA_OVERLOADED, KIBANA_AUTHENTICATION, KIBANA_DNS, KIBANA_TLS, KIBANA_CONNECTION, KIBANA_RESPONSE and others. Failed backend tool results expose diagnostics in _meta.kibana_request_error.
Choose the base URL
Set KIBANA_BASE_URL to the base prefix; the server joins it with configured backend/schema paths.
Use:
https://kibana.example.comhttps://gateway.example.com/logswhen Kibana is reverse-proxied under/logs
Do not use:
https://kibana.example.com/internal/search/eshttps://gateway.example.com/logs/internal/search/es
Sources already carry paths such as /internal/search/es; a full API path here usually produces a bad combined URL and 404.
Select startup mode
- Direct environment: supply all three connection values plus explicit
KIBANA_SOURCE_CATALOG_PATHor a configuration-file store. Only the named catalog is read; the checkout is never searched. Useconfig/sources.example.jsononly as a deliberate hand-authored template, never automatic setup input. - Saved profile: unset connection variables; optionally select
KIBANA_PROFILE. Credentials and catalog path come from saved state. Without a saved connection, startup fails withNo saved Kibana connection is available. Run connection bootstrap first.
Configuration file
KIBANA_MCP_CONFIGpath of a configuration file, same asserve --config
HTTP transport
KIBANA_HTTP_HOSTlisten host, default127.0.0.1KIBANA_HTTP_PORTlisten port, default3000KIBANA_HTTP_PATHendpoint path, default/mcpKIBANA_HTTP_PROFILE_HEADERheader carrying the profile of the caller, no defaultKIBANA_HTTP_AUTH_TOKENshared secret expected asAuthorization: Bearer <token>KIBANA_HTTP_OIDC_ISSUEROpenID Connect issuer protecting the endpoint, instead of the shared secretKIBANA_HTTP_OIDC_RESOURCEpublic URL of the MCP endpoint, required with the issuerKIBANA_HTTP_OIDC_AUDIENCEexpected token audience, default the resourceKIBANA_HTTP_OIDC_MODEofflineorintrospectionKIBANA_HTTP_OIDC_CLIENT_ID,KIBANA_HTTP_OIDC_CLIENT_SECRETclient used for introspectionKIBANA_HTTP_OIDC_REQUIRED_SCOPESscopes every token must carry, separated by spacesKIBANA_HTTP_OIDC_SCOPES_SUPPORTEDscopes advertised to clientsKIBANA_HTTP_OIDC_PROFILE_CLAIMclaim naming the caller at the issuer, defaultsub; the profile is<issuer>#<claim value>KIBANA_HTTP_OIDC_ALLOW_INSECURE_REQUESTStrueallows a non-HTTPS issuer or resource, for development only
See HTTP transport and OpenID Connect authentication.
Catalog stores
KIBANA_STORE_URLconnection URL of the bundled stores whenstoreOptions.urlis not setREDIS_URL,DATABASE_URL,MONGODB_URI,MONGO_URLare read next, by the matching store
See Catalog stores.
Machine state
KIBANA_STATE_DIRdirectory holding saved profiles and their generated catalogs. Defaults to the configuration directory of the operating system.