alimuratkuslu/byok-observability-mcp

๐Ÿ“Š Monitoring
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Comprehensive MCP server for Grafana, Prometheus, Kafka UI, and Datadog with a secure "Bring Your Own Key" or BYOK model.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "alimuratkuslu-byok-observability-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "alimuratkuslu-byok-observability-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

byok-observability-mcp

byok-observability-mcp

Query your observability stack from Claude Code, Codex, or any MCP client and no data leaves your machine.

npm version License: MIT Awesome MCP Servers Node โ‰ฅ18 alimuratkuslu/byok-observability-mcp MCP server

Grafana Prometheus Kafka UI Datadog


Bring Your Own Keys โ€” credentials stay in env vars on your machine. No clone, no build, runs via npx.

Partial setup โ€” configure only the backends you use. Tools for unconfigured backends are never exposed.

Quick Start ยท Tools ยท Credentials ยท Configuration ยท Scheduled Reports ยท Examples ยท Security ยท Development


How it works

     ๐Ÿค– Claude Code / Codex CLI      
                 โ”‚                   
                 โ–ผ                   
     โšก byok-observability-mcp       
        (Local npx process)          
                 โ”‚                   
  ๐Ÿ”’ env vars never leave your machine 
                 โ”‚                   
                 โ–ผ                   
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” 
 โ”‚  ๐Ÿ“Š Grafana     ๐Ÿ”ฅ Prometheus   โ”‚ 
 โ”‚  ๐Ÿ›ถ Kafka UI    ๐Ÿถ Datadog      โ”‚ 
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ 

โšก Quick Start

Option A โ€” Interactive wizard (recommended)

Run once, answer a few questions, get a ready-made .mcp.json:

npx byok-observability-mcp --init

The wizard will:

  • Let you pick which backends to configure
  • Ask for credentials per service
  • Test connectivity with your real endpoints before writing anything
  • Write .mcp.json to your project root or ~/.claude/ โ€” your choice

Then just start Claude Code:

claude

[!TIP] That's it. No clone, no build, no env file. Works in under 60 seconds.


Option B โ€” Manual .mcp.json

Create .mcp.json in your project root. Include only the backends you need.

{
  "mcpServers": {
    "observability-mcp": {
      "command": "npx",
      "args": ["-y", "byok-observability-mcp"],
      "env": {
        "GRAFANA_URL":    "https://grafana.mycompany.internal",
        "GRAFANA_TOKEN":  "glsa_...",
        "PROMETHEUS_URL": "https://prometheus.mycompany.internal",
        "KAFKA_UI_URL":   "https://kafka-ui.mycompany.internal",
        "DD_API_KEY":     "your-datadog-api-key",
        "DD_APP_KEY":     "your-datadog-app-key"
      }
    }
  }
}

Credentials in git? Use the ${VAR} approach instead โ€” see Configuration โ†’ Method B.

Start Claude Code:

claude

Claude Code reads .mcp.json automatically. No claude mcp add, no build step.

Verify by asking Claude:

What observability tools do you have available?

๐Ÿงฉ Supported clients

ClientConfiguration
Claude Code.mcp.json in project root (recommended) or claude mcp add CLI
OpenAI Codex CLI.mcp.json in project root โ€” same format as Claude Code

Both clients read .mcp.json automatically. The Quick Start above works for either.

Codex CLI example
# Same .mcp.json as above works out of the box
codex

Or add via CLI:

codex mcp add --transport stdio observability-mcp -- npx -y byok-observability-mcp

๐Ÿ”ง Available tools

๐Ÿ›ฐ๏ธ System โ€” 1 tool

Always available. Checks connectivity across all configured backends.

ToolDescription
obs_health_checkUnified Health Check. Runs a parallel check on all backends and returns a status table.
Grafana ย 7 tools

Enabled when GRAFANA_URL + GRAFANA_TOKEN are set.

ToolDescription
grafana_healthCheck connectivity, version, and database status
grafana_list_datasourcesList all datasources (name, type, UID)
grafana_query_metricsRun a PromQL expression via a Grafana datasource
grafana_list_dashboardsSearch and list dashboards by name or tag
grafana_get_dashboardGet panels and metadata for a dashboard by UID
grafana_list_alertsList active alerts from Alertmanager (firing/pending)
grafana_get_alert_rulesList all configured alert rules across all folders
Prometheus ย 5 tools

Enabled when PROMETHEUS_URL is set.

ToolDescription
prometheus_healthCheck connectivity
prometheus_queryInstant PromQL query โ€” current value of a metric
prometheus_query_rangeRange PromQL query โ€” metric values over time
prometheus_list_metricsList all available metric names
prometheus_metric_metadataGet help text and type for a specific metric
Kafka UI ย 6 tools

Enabled when KAFKA_UI_URL is set.

ToolDescription
kafka_list_clustersList configured Kafka clusters and their status
kafka_list_topicsList topics in a cluster
kafka_describe_topicGet partition count, replication factor, and config
kafka_list_consumer_groupsList consumer groups and their state
kafka_consumer_group_lagGet per-partition lag for a consumer group
kafka_broker_healthBroker count and disk usage per broker
Datadog ย proxied via official server

Enabled when both DD_API_KEY and DD_APP_KEY are set. Proxies the official Datadog MCP server.

Default toolsets: core, apm, alerting. Set DD_TOOLSETS=all to load everything.

ToolsetCovers
coreMetrics, dashboards, monitors, infrastructure
apmAPM services, traces, service map
alertingMonitors, downtimes, alerts
logsLog search and analytics
incidentsIncident management
ddsqlSQL-style metric queries
securityCloud security posture
syntheticsSynthetic test results
networksNetwork performance monitoring
dbmDatabase monitoring
software-deliveryCI/CD pipelines
llm-obsLLM observability
casesCase management
feature-flagsFeature flag tracking

๐Ÿ”‘ Getting credentials

Grafana ย Service account token
  1. Open Grafana โ†’ Administration โ†’ Users and access โ†’ Service accounts
  2. Click Add service account โ†’ set Role to Viewer โ†’ Create
  3. On the service account page โ†’ Add service account token โ†’ Generate token
  4. Copy the token (starts with glsa_) โ€” you won't see it again
GRAFANA_URL=https://grafana.mycompany.internal
GRAFANA_TOKEN=glsa_xxxxxxxxxxxxxxxx

If your Grafana uses a self-signed certificate:

GRAFANA_VERIFY_SSL=false
Prometheus ย URL (+ optional basic auth)

If Prometheus has no authentication:

PROMETHEUS_URL=https://prometheus.mycompany.internal

If Prometheus uses basic auth:

PROMETHEUS_URL=https://prometheus.mycompany.internal
PROMETHEUS_USERNAME=your-username
PROMETHEUS_PASSWORD=your-password
Kafka UI ย URL (+ optional login)

If Kafka UI has no authentication:

KAFKA_UI_URL=https://kafka-ui.mycompany.internal

If Kafka UI requires a login:

KAFKA_UI_URL=https://kafka-ui.mycompany.internal
KAFKA_UI_USERNAME=admin
KAFKA_UI_PASSWORD=your-password
Datadog ย API key + Application key

API key: Datadog โ†’ Organization Settings โ†’ API Keys โ†’ New Key

Application key: Datadog โ†’ Organization Settings โ†’ Application Keys โ†’ New Key

DD_SITE โ€” match your Datadog login URL:

Login URLDD_SITE
app.datadoghq.comdatadoghq.com (default)
app.us3.datadoghq.comus3.datadoghq.com
app.us5.datadoghq.comus5.datadoghq.com
app.datadoghq.eudatadoghq.eu
app.ap1.datadoghq.comap1.datadoghq.com
DD_API_KEY=your-api-key
DD_APP_KEY=your-application-key
DD_SITE=datadoghq.com
DD_TOOLSETS=core,apm,alerting

โš™๏ธ Configuration

Method A โ€” Values directly in .mcp.json (simplest)

Put credentials directly in .mcp.json. Works everywhere, no extra steps.

Add .mcp.json to your .gitignore if the repo is shared.

Method B โ€” Keep credentials out of git

Use ${VAR} placeholders in .mcp.json and put real values in .env.

.mcp.json (safe to commit โ€” contains no secrets):

{
  "mcpServers": {
    "observability-mcp": {
      "command": "npx",
      "args": ["-y", "byok-observability-mcp"],
      "env": {
        "GRAFANA_URL":    "${GRAFANA_URL}",
        "GRAFANA_TOKEN":  "${GRAFANA_TOKEN}",
        "PROMETHEUS_URL": "${PROMETHEUS_URL}",
        "KAFKA_UI_URL":   "${KAFKA_UI_URL}",
        "DD_API_KEY":     "${DD_API_KEY}",
        "DD_APP_KEY":     "${DD_APP_KEY}"
      }
    }
  }
}

.env (add to .gitignore):

GRAFANA_URL=https://grafana.mycompany.internal
GRAFANA_TOKEN=glsa_...

Start Claude with the env loaded:

set -a && source .env && set +a && claude

A ready-made helper script is included:

./scripts/run-claude-with-env.sh

A template .mcp.json with all variables is available as .mcp.json.example.

Method C โ€” Global config (available in every project)

Add to ~/.claude.json:

{
  "mcpServers": {
    "observability-mcp": {
      "command": "npx",
      "args": ["-y", "byok-observability-mcp"],
      "env": {
        "GRAFANA_URL":   "https://grafana.mycompany.internal",
        "GRAFANA_TOKEN": "glsa_..."
      }
    }
  }
}

๐Ÿ“‹ Environment variables

VariableBackendRequiredDescription
GRAFANA_URLGrafanaโœ…Base URL of your Grafana instance
GRAFANA_TOKENGrafanaโœ…Service account token (Viewer role)
GRAFANA_VERIFY_SSLGrafanaSet to false to skip TLS verification
PROMETHEUS_URLPrometheusโœ…Base URL of your Prometheus instance
PROMETHEUS_USERNAMEPrometheusBasic auth username
PROMETHEUS_PASSWORDPrometheusBasic auth password
KAFKA_UI_URLKafka UIโœ…Base URL of your Kafka UI instance
KAFKA_UI_USERNAMEKafka UILogin username
KAFKA_UI_PASSWORDKafka UILogin password
DD_API_KEYDatadogโœ…Datadog API key
DD_APP_KEYDatadogโœ…Datadog Application key
DD_SITEDatadogDatadog site (default: datadoghq.com)
DD_TOOLSETSDatadogTool groups to load (default: core,apm,alerting)
SLACK_WEBHOOK_URLReportsโœ…*Slack Incoming Webhook URL for scheduled reports
REPORT_BACKENDSReportsComma-separated backends to include in reports (default: all configured)

๐Ÿ“Š Scheduled Reports

Send an automated observability digest to Slack on a schedule โ€” no Claude or Codex instance needs to be running.

How it works

cron / launchd
     โ”‚  fires every N minutes
     โ–ผ
npx byok-observability-mcp --report
     โ”‚
     โ”‚  reads env vars, connects directly to backends
     โ–ผ
Grafana ยท Prometheus ยท Kafka UI
     โ”‚
     โ”‚  categorizes findings โ†’ P0 / P1 / P2 / P3
     โ–ผ
Slack Incoming Webhook  โ†’  #your-channel

The command collects data, categorizes every finding by severity, formats a Slack message, sends it, and exits. It is completely stateless.

Severity levels

LevelMeaningExamples
๐Ÿ”ด P0 โ€” KRฤฐTฤฐKService down or unreachableGrafana alert firing (critical), Kafka cluster offline, backend unreachable
๐ŸŸ  P1 โ€” YรœKSEKDegraded, action needed soonGrafana alert firing (non-critical), Kafka consumer lag > 10 000
๐ŸŸก P2 โ€” ORTAWarning, monitor closelyGrafana alert pending, Kafka consumer lag > 1 000
๐ŸŸข P3 โ€” BฤฐLGฤฐInformational, all normalHealthy backends, silenced alerts

Setup

Step 1 โ€” Get a Slack Incoming Webhook URL

  1. Go to api.slack.com/apps โ†’ Create New App โ†’ From scratch
  2. Incoming Webhooks โ†’ toggle on โ†’ Add New Webhook to Workspace
  3. Pick a channel โ†’ Allow โ†’ copy the Webhook URL

Step 2 โ€” Set environment variables

export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXX/YYY/ZZZ

# Optional: restrict which backends are included (default: all configured)
export REPORT_BACKENDS=grafana,prometheus,kafka

Step 3 โ€” Run a one-off report to verify

npx byok-observability-mcp --report

You should see a message in your Slack channel within seconds.

Step 4 โ€” Schedule with cron

Open your crontab:

crontab -e

Add a line. Examples:

# Every hour at minute 0
0 * * * * SLACK_WEBHOOK_URL=https://hooks.slack.com/... GRAFANA_URL=... GRAFANA_TOKEN=... npx byok-observability-mcp --report >> /tmp/obs-report.log 2>&1

# Every 30 minutes
*/30 * * * * SLACK_WEBHOOK_URL=https://hooks.slack.com/... npx byok-observability-mcp --report >> /tmp/obs-report.log 2>&1

[!TIP] Put all env vars in a .env file and source it inside the cron command to keep the crontab clean:

0 * * * * bash -c 'source /path/to/.env && npx byok-observability-mcp --report' >> /tmp/obs-report.log 2>&1

Alternative: macOS launchd (runs on login, survives reboots)

Create ~/Library/LaunchAgents/com.observability-mcp.report.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.observability-mcp.report</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/bin/npx</string>
    <string>byok-observability-mcp</string>
    <string>--report</string>
  </array>
  <key>EnvironmentVariables</key>
  <dict>
    <key>SLACK_WEBHOOK_URL</key>
    <string>https://hooks.slack.com/services/XXX/YYY/ZZZ</string>
    <key>GRAFANA_URL</key>
    <string>https://grafana.mycompany.internal</string>
    <key>GRAFANA_TOKEN</key>
    <string>glsa_...</string>
  </dict>
  <key>StartInterval</key>
  <integer>3600</integer>
  <key>StandardOutPath</key>
  <string>/tmp/obs-report.log</string>
  <key>StandardErrorPath</key>
  <string>/tmp/obs-report.log</string>
</dict>
</plist>

Load it:

launchctl load ~/Library/LaunchAgents/com.observability-mcp.report.plist

To stop: launchctl unload ~/Library/LaunchAgents/com.observability-mcp.report.plist


๐Ÿ’ฌ Example prompts

Single-backend queries

BackendTry asking Claude...
Grafana"List all datasources and tell me which ones are Prometheus type."
Grafana"Search for dashboards related to 'kubernetes' โ€” list names and UIDs."
Grafana"Query http_requests_total rate over the last hour via the default Prometheus datasource."
Prometheus"What is the current value of the up metric? Which targets are down?"
Prometheus"Show CPU usage (node_cpu_seconds_total rate) over the past hour, by instance."
Prometheus"List all available metrics that start with http_."
Kafka UI"List all Kafka clusters. Are there any with offline brokers?"
Kafka UI"Describe the topic 'orders' in cluster 'production' โ€” partitions and replication factor?"
Kafka UI"Check consumer lag for group 'order-processor'. Which partitions have the highest lag?"
Datadog"List all Datadog monitors currently in Alert state."
Datadog"Show APM service performance for the past hour. Which services have the highest error rate?"
Datadog"Query aws.ec2.cpuutilization for the last 30 minutes. Which hosts are above 80%?"

๐Ÿ› ๏ธ Incident Response (v0.2.0+)

GoalTry asking Claude...
Health"Run a health check on all systems."
Alerts"Are there any firing alerts in Grafana right now?"
Triage"Show me the alert rules for the 'Production' folder."

Cross-backend queries

Check the health of all configured observability backends and give me a summary.
I'm seeing high error rates. Check Prometheus for http_requests_total with status=500,
then look for related Datadog monitors that might be alerting.

๐Ÿ”’ Security

[!NOTE] All tools are read-only. No write operations are performed on any backend.

[!IMPORTANT] Credentials are read from environment variables and never logged or sent to Anthropic. Tokens are redacted in all error messages.

  • TLS certificate verification is enabled by default
  • The MCP process runs locally โ€” your infrastructure URLs only reach Claude's context window if you type them into the chat

Least-privilege recommendations:

BackendRecommended role
GrafanaService account with Viewer role
PrometheusNetwork-level read-only access
Kafka UIRead-only UI user
DatadogAPI key + Application key with read scopes

๐Ÿ›  Development

git clone https://github.com/alimuratkuslu/byok-observability-mcp
cd byok-observability-mcp
npm install
npm run dev          # run with tsx (no build step)
npm run build        # compile to dist/
npm run typecheck    # TypeScript check without emitting

Tested versions

BackendTested version
Grafanav9.x, v10.x, v11.x
Prometheusv2.x
Kafka UIprovectus/kafka-ui:v0.7.2

License

MIT

Related MCP Servers

aayushmdesai/mcp-dotnet-diagnostics

๐Ÿ  ๐ŸŽ ๐Ÿง - Live .NET runtime diagnostics for AI assistants. Ask Claude to diagnose memory leaks, GC pressure, LOH fragmentation, and thread starvation in any running .NET process โ€” no code changes required. Install: dotnet tool install -g mcp-dotnet-diagnostics

๐Ÿ“Š Monitoring0 views
adanb13/cirdan

๐Ÿ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - AI infrastructure cartographer & MCP server: fingerprints, graphs, and watches the live infrastructure an agent can reach (Docker, Kubernetes, cloud, IaC) and detects incidents.

๐Ÿ“Š Monitoring0 views
agentkitai/agentlens

๐Ÿ“‡ ๐Ÿ  โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Tamper-evident observability for AI agents: a SHA-256 hash-chained audit log with chain verification and signed export (EU AI Act Art. 12). Instrument any agent with zero code via npx -y @agentlensai/mcp; also ingests OpenTelemetry GenAI traces.

๐Ÿ“Š Monitoring0 views
alilxxey/openobserve-community-mcp

๐Ÿ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Read-only MCP server for OpenObserve Community Edition via REST API. Search logs, traces, stream schemas, and dashboards without requiring the Enterprise license.

๐Ÿ“Š Monitoring0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

Last checked: 7/28/2026, 10:45:29 AM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.