Skip to content

Configuration file reference ​

Load a file explicitly with serve --config <path> or KIBANA_MCP_CONFIG. It executes as code; working-directory discovery is disabled.

ts
import { defineKibanaMcpConfig } from "@havesomecode/kibana-mcp-server/config";

export default defineKibanaMcpConfig({
  // …
});

Default-export an object or a function (sync or async) returning it. defineKibanaMcpConfig provides types only.

Options ​

OptionTypeOverridden byDescription
urlstringKIBANA_BASE_URLKibana base URL
userstringKIBANA_USERNAMEKibana user
passwordstringKIBANA_PASSWORDKibana password
timeoutMsnumberKIBANA_TIMEOUT_MSBackend deadline in milliseconds
profilestring--profile, KIBANA_PROFILEProfile served when the transport names none
storestore or factoryWhere source catalogs are kept. Without it, catalogs are files.
storeOptionsanyHanded to the store factory
http.hoststring--host, KIBANA_HTTP_HOSTListen host
http.portnumber--port, KIBANA_HTTP_PORTListen port
http.pathstring--path, KIBANA_HTTP_PATHEndpoint path
http.profileHeaderstring--profile-header, KIBANA_HTTP_PROFILE_HEADERHeader carrying the profile of the caller
http.authTokenstringKIBANA_HTTP_AUTH_TOKENShared secret expected as a bearer token
http.oidc.issuerstringKIBANA_HTTP_OIDC_ISSUEROpenID Connect issuer protecting the endpoint
http.oidc.resourcestringKIBANA_HTTP_OIDC_RESOURCEPublic URL of the MCP endpoint, required with issuer
http.oidc.audiencestringKIBANA_HTTP_OIDC_AUDIENCEExpected token audience, default resource
http.oidc.mode"offline" | "introspection"KIBANA_HTTP_OIDC_MODEToken verification, default introspection with a client id, offline otherwise
http.oidc.clientIdstringKIBANA_HTTP_OIDC_CLIENT_IDClient used for introspection
http.oidc.clientSecretstringKIBANA_HTTP_OIDC_CLIENT_SECRETSecret of that client
http.oidc.requiredScopesstring[]KIBANA_HTTP_OIDC_REQUIRED_SCOPESScopes every token must carry
http.oidc.scopesSupportedstring[]KIBANA_HTTP_OIDC_SCOPES_SUPPORTEDScopes advertised to clients
http.oidc.profileClaimstringKIBANA_HTTP_OIDC_PROFILE_CLAIMClaim naming the caller at the issuer, default sub; the profile is <issuer>#<claim value>
http.oidc.allowInsecureRequestsbooleanKIBANA_HTTP_OIDC_ALLOW_INSECURE_REQUESTSAllow a non-HTTPS issuer or resource. Development only.

Precedence ​

Command-line flag → environment variable → configuration file → built-in default.

Constraints ​

  • store requires url, user and password, from the file or from the environment.
  • store cannot be combined with KIBANA_SOURCE_CATALOG_PATH.
  • Without store, direct connections require explicit KIBANA_SOURCE_CATALOG_PATH; saved profiles use their saved path. No implicit catalog path.
  • http.oidc excludes http.authToken and http.profileHeader, requires named profiles, and its resource path must be http.path.
  • A .ts file needs Node.js 22.18 or later. A .mjs file works on every supported version.
  • The package must resolve from the file's directory for its import to work.

Types ​

ts
import type { CatalogStore } from "@havesomecode/kibana-mcp-server/config";
import { CatalogConflictError } from "@havesomecode/kibana-mcp-server/config";

See Custom store for the CatalogStore contract.

Released under the MIT License. Independent project, not affiliated with or endorsed by Elastic. Kibana and Elasticsearch are trademarks of Elasticsearch B.V.