brushtrail-mcp
Read-only tools for inspecting an Elasticsearch cluster: cluster health with unassigned shard reasons, per-node roles/resource usage, indices by size and health, cheap aggregations (counts over time, top field values), and newest-first document search with long fields clipped. Index access is restricted by an API key and an index allowlist.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
brushtrail-mcp
A small, read-only MCP server for a home lab. It gives Claude Desktop (or any MCP client) one endpoint with a curated set of tools for Zabbix and Elasticsearch, and you can add more sources as "packs".
One endpoint, one token per client, one entry in Claude Desktop
12 focused tools instead of hundreds, so the model picks the right one
Read-only by construction: Zabbix only gets
*.getcalls, Elasticsearch only getsGETand_searchStateless Streamable HTTP on the official MCP TypeScript SDK v2, with a fresh server instance per request
Serves both current (2026-07-28) and 2025-era MCP clients, including
mcp-remoteJSON audit log line for every tool call (which client, which tool, args, duration, ok/error)
Docker image built by GitHub Actions and published to GHCR
Tools
Tool | What it does |
| Unresolved problems now: host, severity, age, tags |
| Problems that started in the last N hours, resolved or ongoing, with duration |
| Hosts with groups, maintenance, and interface availability (agent/SNMP up or down) |
| Items on a host with latest values; finds the |
| Values over time with min/max/avg; falls back to hourly trends |
| Triggers in PROBLEM state, or all triggers on a host |
| Status, shards, pending tasks, and why any shards are unassigned |
| Per-node roles, master, heap/RAM/CPU/disk, load |
| Indices by size with health and doc counts |
| Counts over time and top values of a field. Cheap, use first |
| Matching documents, newest first, long fields clipped |
| Can the server reach and authenticate to each backend? |
Related MCP server: zabbix-mcp
Deploy on a VM
Needs Docker with the compose plugin.
git clone https://github.com/b0bc/brushtrail-mcp.git
cd brushtrail-mcp
cp .env.example .env
openssl rand -hex 32 # use the output as the claude-desktop token
nano .env # fill in tokens, Zabbix and Elasticsearch details
docker compose pull # or: docker compose build
docker compose up -d
docker compose logs -f # look for "listening" and "backend_ok"
curl http://localhost:3000/healthzThe GHCR image is published by the ci workflow on every push to main. The first time the package is published it is private. Either make it public (GitHub → your profile → Packages → brushtrail-mcp → Package settings → Change visibility), or run docker login ghcr.io on the VM with a token that has read:packages. You can also skip the registry: comment out image:, uncomment build: . in docker-compose.yml, and run docker compose up -d --build.
To update: git pull && docker compose pull && docker compose up -d.
Private CA / self-signed certificates
If Zabbix or Elasticsearch use a private CA, copy the CA certificate to ./certs/ca.pem and set NODE_EXTRA_CA_CERTS=/certs/ca.pem in .env. Don't turn off TLS verification.
Backend credentials (read-only)
Zabbix (6.4+ / 7.x)
User group: create e.g.
mcp-readerswith Read permission on the host groups the server should see.User role: type User. Under API methods, choose Allow list and add
*.getandapiinfo.version. The server never calls anything else, and this enforces it on the Zabbix side too.User: create
mcp-readerin that group with that role.API token: Users → API tokens → create one for
mcp-readerand put it inZABBIX_TOKEN.
On Zabbix older than 6.4, set ZABBIX_AUTH_MODE=body.
Elasticsearch
Create an API key limited to the indices you want readable, and keep ELASTIC_INDEX_ALLOWLIST the same:
POST /_security/api_key
{
"name": "brushtrail-mcp",
"role_descriptors": {
"mcp_read": {
"cluster": ["monitor"],
"indices": [
{ "names": ["logs-*"], "privileges": ["read", "view_index_metadata", "monitor"] }
]
}
}
}Put the encoded value from the response in ELASTIC_API_KEY. The API key is the real security boundary. The allowlist is a second fence that also stops the model from wandering into *.
Connect clients
Claude Desktop
Claude Desktop's own "custom connector" setting calls from Anthropic's cloud, so it can't reach a LAN-only VM. Instead, add the server to claude_desktop_config.json through the mcp-remote bridge, which runs on your PC. This needs Node.js installed.
{
"mcpServers": {
"homelab": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"http://mcp-vm.lan:3000/mcp",
"--header", "Authorization:${AUTH_HEADER}",
"--allow-http"
],
"env": { "AUTH_HEADER": "Bearer <claude-desktop token from .env>" }
}
}
}If the server is behind a TLS reverse proxy (haproxy/nginx), use the https:// URL and drop --allow-http. Restart Claude Desktop after editing.
Claude Code
claude mcp add --transport http homelab http://mcp-vm.lan:3000/mcp \
--header "Authorization: Bearer <token>"MCP Inspector (testing)
npx @modelcontextprotocol/inspectorChoose Streamable HTTP, URL http://mcp-vm.lan:3000/mcp, and add an Authorization: Bearer <token> header.
More clients
Give every client its own token so the audit log tells them apart:
MCP_TOKENS=claude-desktop=<hex>,holmes=<hex>,laptop=<hex>Configuration
All settings are environment variables; see .env.example.
Variable | Default | Notes |
| required |
|
|
| Which packs to load |
|
| |
| off | Accept only these |
| off |
|
|
| Larger tool results are truncated with a hint |
|
|
|
| required with zabbix pack | |
|
|
|
| required with elastic pack | |
| required with elastic pack | |
|
| e.g. |
|
| Long fields are clipped |
Logs and audit
Logs are JSON lines on stdout/stderr (docker compose logs). Every tool call writes one record with "audit": true:
{"ts":"2026-12-01T20:14:03.112Z","level":"info","msg":"tool_call","audit":true,"client":"claude-desktop","tool":"zabbix_problems","args":{"min_severity":"warning"},"ok":true,"durationMs":84,"outputChars":1532,"truncated":false}Tokens and backend credentials are never logged.
Adding a pack
Create
src/packs/<name>.tsexporting a factory that returns{ name, tools, check }. Seezabbix.tsfor the pattern: read env with the helpers inconfig.ts, and define tools withdefineTooland a zod input schema.Register it in
src/packs/index.ts.Add it to
PACKSand add its env vars to.env.example.
Keep tools read-only and their output small. Return summaries and let the model ask for detail.
Development
npm install
npm test # end-to-end tests against mock Zabbix/Elasticsearch
npm run dev # watch mode; needs a .env exported into the shell
npm run build && npm startSecurity notes
Exposure. Run on your LAN or behind a VPN/reverse proxy, not on the open internet. Bearer tokens are the only authentication.
Fresh server per request. Each request builds a new
McpServer, which avoids the cross-client data leak class fixed in SDK 1.26.0 (CVE-2026-25536).Container hardening. The container runs as a non-root user with a read-only filesystem, all capabilities dropped and
no-new-privileges.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Syslog receiver and MCP server for homelab log intelligence.
Syslog receiver and MCP server for homelab log intelligence.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseAqualityDmaintenanceRead/write Elasticsearch mcp server with many tools1623 npm3MIT
- FlicenseNot gradedqualityDmaintenanceMCP server to access the Zabbix API, providing tools to list hosts, problems, triggers, items, history, and events.-
- FlicenseNot gradedqualityDmaintenanceRead-only MCP server that provides Zabbix monitoring data to AI agents, enabling investigation of hosts, metrics, incidents, and triggers with deterministic aggregation.-
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server exposing SLURM, GPFS, Prometheus (node exporter + DCGM GPU metrics) and generic Elasticsearch exploration as diagnostic tools for LLM-based HPC support assistants.Apache 2.0