# jerrelblankenship/jb-kibana-mcp architecture

> Architecture diagram of the GitHub repository jerrelblankenship/jb-kibana-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jerrelblankenship/jb-kibana-mcp
- Repository: https://github.com/jerrelblankenship/jb-kibana-mcp

## Overview

Kibana MCP Server exposes saved Kibana content and Elasticsearch search through MCP. AI clients connect over either stdio or HTTP/SSE; the transport hands MCP requests to shared server logic, which registers read-only resources and executable tools. Those handlers invoke the Kibana client for dashboards, visualizations, data views, saved searches, dashboard export, and log queries. The client authenticates REST requests to Kibana, which also proxies searches to Elasticsearch. README documents capabilities beyond the sampled handler excerpts; those are represented at the subsystem level where wiring is not fully evidenced.

Main entry points: [`src/http-server.ts`](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/http-server.ts) (HTTP/SSE Entry), [`src/server.ts`](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/server.ts) (MCP Server), [`src/kibana/client.ts`](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/kibana/client.ts) (Kibana API Client), [`src/index.ts`](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/index.ts) (stdio Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transport["MCP Transports"]
  node_stdio["stdio Entry<br/>[index.ts]"]
  node_http["HTTP/SSE Entry<br/>[http-server.ts]"]
end

subgraph group_core["MCP Capabilities"]
  node_mcp["MCP Server<br/>[server.ts]"]
  node_resources["Read Resources<br/>[index.ts]"]
  node_tools["Executable Tools<br/>[index.ts]"]
end

subgraph group_integration["Kibana Integration"]
  node_client["Kibana API Client<br/>[client.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
end

node_assistant(("AI Assistant"))
node_kibana["Kibana REST API"]
node_elasticsearch[("Elasticsearch")]

node_assistant -->|"starts process"| node_stdio
node_assistant -->|"connects MCP"| node_http
node_stdio -->|"creates and connects"| node_mcp
node_http -->|"creates per session"| node_mcp
node_http -->|"streams MCP"| node_assistant
node_assistant -->|"posts messages"| node_http
node_mcp -->|"registers handlers"| node_resources
node_mcp -->|"registers handlers"| node_tools
node_resources -->|"reads Kibana data"| node_client
node_tools -->|"executes API calls"| node_client
node_client -->|"builds request headers"| node_auth
node_client -->|"REST requests"| node_kibana
node_kibana -.->|"proxies searches"| node_elasticsearch

click node_stdio "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/index.ts"
click node_http "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/http-server.ts"
click node_mcp "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/server.ts"
click node_resources "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/resources/index.ts"
click node_tools "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/tools/index.ts"
click node_client "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/kibana/client.ts"
click node_auth "https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/kibana/auth.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_stdio,node_http toneBlue
class node_mcp,node_resources,node_tools,node_elasticsearch toneAmber
class node_client,node_auth,node_kibana toneMint
class node_assistant toneIndigo
```

## Components

### MCP Transports

- [stdio Entry](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/index.ts): `src/index.ts`
- [HTTP/SSE Entry](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/http-server.ts): `src/http-server.ts`

### MCP Capabilities

- [MCP Server](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/server.ts): `src/server.ts`
- [Read Resources](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/resources/index.ts): `src/resources/index.ts`
- [Executable Tools](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/tools/index.ts): `src/tools/index.ts`

### Kibana Integration

- [Kibana API Client](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/kibana/client.ts): `src/kibana/client.ts`
- [Authentication](https://github.com/jerrelblankenship/jb-kibana-mcp/blob/main/src/kibana/auth.ts): `src/kibana/auth.ts`

### Other components

- **AI Assistant**
- **Kibana REST API**
- **Elasticsearch**

## Connections

- AI Assistant → stdio Entry: starts process
- AI Assistant → HTTP/SSE Entry: connects MCP
- stdio Entry → MCP Server: creates and connects
- HTTP/SSE Entry → MCP Server: creates per session
- HTTP/SSE Entry → AI Assistant: streams MCP
- AI Assistant → HTTP/SSE Entry: posts messages
- MCP Server → Read Resources: registers handlers
- MCP Server → Executable Tools: registers handlers
- Read Resources → Kibana API Client: reads Kibana data
- Executable Tools → Kibana API Client: executes API calls
- Kibana API Client → Authentication: builds request headers
- Kibana API Client → Kibana REST API: REST requests
- Kibana REST API → Elasticsearch: proxies searches
