Skip to content

Redis store ​

1. Install a driver ​

Both entry points behave identically; choose your client:

Entry pointDriver
@havesomecode/kibana-mcp-server/stores/redisredis
@havesomecode/kibana-mcp-server/stores/ioredisioredis
bash
npm install redis

2. Configure the store ​

Redis keeps one key per profile, without expiry:

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

export default defineKibanaMcpConfig({
  url: process.env.KIBANA_URL,
  user: process.env.KIBANA_USER,
  password: process.env.KIBANA_PASSWORD,
  store,
  storeOptions: { url: process.env.REDIS_URL, keyPrefix: "kibana-mcp:production:" },
});

Options ​

OptionDefaultDescription
urlKIBANA_STORE_URL, then REDIS_URLredis:// or rediss:// URL
keyPrefixkibana-mcp:catalog:Prefix of the catalog keys
clientnoneA client you configured yourself, used instead of url. The store never closes it.

Use client with ioredis to reach Sentinel or Cluster deployments:

ts
import { Redis } from "ioredis";
import store from "@havesomecode/kibana-mcp-server/stores/ioredis";

const client = new Redis({ sentinels: [{ host: "sentinel-1", port: 26379 }], name: "mymaster" });

export default defineKibanaMcpConfig({ /* … */ store, storeOptions: { client } });

Redis must be durable ​

Use durable Redis; catalogs are data, not cache:

  • Enable disk persistence (AOF or RDB).
  • Set noeviction: full instances must refuse writes, not drop catalogs.

Cache instances usually have opposite settings. If unsure, use a dedicated instance or database.

How writes are protected ​

A Lua script sets the key only if its content still matches what was read. Shared server processes cannot overwrite each other's changes.

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