OpenTelemetry MCP Server & Agent Plugin (v0.2.0)
Production-grade OpenTelemetry on Kubernetes with strict Knowledge Layer (Agent Skills) and Execution Layer (MCP Server) separation — intent-driven collector provisioning, multi-language auto-instrumentation, single-call N→1 pipeline diagnostics, OTTL cardinality & PII governance, and security posture auditing.
Architecture: Strict Knowledge vs. Execution Separation
In accordance with Skill and Execution Separation, this package enforces a strict, testable boundary between portable domain knowledge and live cluster execution:
flowchart TB
subgraph Knowledge["Knowledge Layer (Agent Skills — Zero Live I/O)"]
S1["provisioning-opentelemetry-collectors"]
S2["instrumenting-kubernetes-workloads"]
S3["troubleshooting-telemetry-pipelines"]
S4["tuning-sampling-and-trace-derived-metrics"]
S5["controlling-telemetry-cardinality-and-noise"]
S6["auditing-observability-security-posture"]
S7["upgrading-opentelemetry-components"]
SC["12 Offline Deterministic Python Scripts\n(sizing, OTTL linting, series estimation, OBI manifests)"]
end
subgraph Execution["Execution Layer (MCP Server — Live Kubernetes I/O Only)"]
T["17 Consolidated MCP Tools\n(<= 8 parameters each, dry_run=True default)"]
R["14 Live Redacted Resources\n(otel:// scheme, zero static catalogs)"]
P["0 MCP Prompts\n(workflows live in SKILL.md)"]
M["Middleware & Safety Gates\n(Write Gate, Elicitation, Secret Redaction, GitOps Guard)"]
end
Knowledge -->|"Invokes tools & reads resources"| Execution
Execution -->|"Kubernetes API + :8888/metrics"| K8s[("Kubernetes Cluster\n& OTel Operator CRDs")]
Core Architectural Invariants
- Zero Static-Data Tools or Resources: Static language matrices, topology calculators, and OTTL snippet generators live in
skills/*/references/andskills/*/scripts/— never in MCP tools or resources. - Zero MCP Prompts: All multi-step operational runbooks live in
skills/<skill-name>/SKILL.mdwith progressive disclosure. - 17 Focused Tools ($\le 8$ Parameters Each): High-cohesion N→1 tools (
otel_survey_cluster,otel_diagnose_collector,otel_verify_instrumentation) replace fragmented single-check tools. - Two-Phase Mutation Safety: Every mutating tool defaults to
dry_run=True, runs the pre-apply configuration linter (blockingseverity="error"findings), detects GitOps ownership (Argo CD,Flux,Helm), snapshots previous configs tootel.mcp/last-known-good, and gates destructive operations behind MCP Elicitation /confirm=True. - Mandatory Secret Redaction: All tool and resource outputs strip
kubectl.kubernetes.io/last-applied-configurationandmetadata.managedFieldsand mask inline tokens/keys with***REDACTED***while preserving${env:VAR}placeholders.
Execution Layer: 17 MCP Tools
| Toolset | Tool Name | Mode | Max Params | Purpose |
|---|---|---|---|---|
discovery |
otel_survey_cluster |
Read-Only | 3 | Single-call cluster survey: Operator health, Collectors, Instrumentations, TargetAllocators, OpAMPBridges, eBPF agents, and discovered backends |
discovery |
otel_list_workloads |
Read-Only | 5 | Scan Deployment, StatefulSet, and DaemonSet workloads with 4-tier language detection and instrumentation state (instrumented, uninstrumented, broken) |
ui |
otel_query_a2ui |
Read-Only | 0 | TalkOps A2UI frontend datatable status aggregation |
collector |
otel_provision_collector |
Write (dry_run=True) |
8 | Intent-driven Collector CRD + least-privilege RBAC provisioning (agent, gateway, tail-sampler, all-in-one) |
collector |
otel_patch_collector |
Write (dry_run=True) |
7 | Create/patch Collector CRD with pre-apply config linting, unified diff, and snapshot persistence |
collector |
otel_revert_collector_config |
Write (dry_run=True) |
4 | One-level rollback of a Collector CRD to its otel.mcp/last-known-good snapshot |
collector |
otel_delete_resource |
Write (dry_run=True) |
5 | Delete OpenTelemetryCollector, Instrumentation, or OpAMPBridge CRDs with confirmation gate |
instrumentation |
otel_patch_instrumentation |
Write (dry_run=True) |
8 | Create/patch Instrumentation CRD with pinned agent images and per-language OTLP protocol/port alignment (:4317 gRPC for Java/Node.js, :4318 HTTP for Python/.NET/Go) |
instrumentation |
otel_manage_workload_instrumentation |
Write (dry_run=True) |
8 | Enable, disable, or rolling-restart workload auto-instrumentation across Deployment, StatefulSet, and DaemonSet |
instrumentation |
otel_verify_instrumentation |
Read-Only | 3 | Single-call end-to-end verification of annotations, CR existence, pod initContainers, injected env vars, and restart timestamps |
pipeline |
otel_configure_receivers |
Write (dry_run=True) |
6 | Wire kubeletstats, hostmetrics, k8s_cluster, k8sobjects, filelog, and prometheus_ta with volume mounts and RBAC |
pipeline |
otel_configure_processing |
Write (dry_run=True) |
6 | Configure OTTL transform and filter processors for JSON parsing, PII masking, attribute dropping, and healthcheck noise filtering |
pipeline |
otel_configure_sampling |
Write (dry_run=True) |
5 | Configure head, probabilistic, tail (with trace-affinity topology guard), or none sampling |
pipeline |
otel_configure_connectors |
Write (dry_run=True) |
5 | Configure bounded spanmetrics and servicegraph connectors across traces and metrics pipelines |
diagnostics |
otel_diagnose_collector |
Read-Only | 4 | Single-call N→1 diagnosis correlating CR status, pod OOM/CrashLoop state, Service endpoints, events, redacted logs, and :8888/metrics |
diagnostics |
otel_validate_collector_config |
Read-Only | 5 | Deep static + live cluster validation (processor order, filelog safety, referential integrity, Secret refs, RBAC, v0.123+ deprecations) |
governance |
otel_audit_security_posture |
Read-Only | 3 | Cluster-wide audit of inline secrets, unencrypted exporters, wildcard RBAC, and eBPF/OBI pod privileges |
Execution Layer: 14 Live MCP Resources (otel://)
| Resource URI | Description |
|---|---|
otel://server/capabilities |
Server write mode (allow_write, read_only, toolsets), bound context, K8s connectivity, default Collector version |
otel://cluster/contexts |
Available kubeconfig contexts and active bound context |
otel://operator/status |
OpenTelemetry Operator pod health, webhook diagnostics, and per-namespace Instrumentation CR counts |
otel://collectors/{namespace} |
Summary list of OpenTelemetryCollector CRDs in {namespace} |
otel://collector/{namespace}/{name} |
Sanitized Collector CRD status, pipeline topology, and GitOps ownership |
otel://collector/{namespace}/{name}/config |
Redacted YAML configuration of {name} |
otel://collector/{namespace}/{name}/history |
Snapshot metadata and redacted preview from otel.mcp/last-known-good |
otel://k8s-enrichment/{namespace}/{collector} |
k8sattributes processor enrichment profile |
otel://logs-profile/{namespace}/{collector} |
filelog receiver, checkpoint storage, and log pipeline profile |
otel://spanmetrics/{namespace}/{collector} |
spanmetrics & servicegraph connector profile and cardinality estimate |
otel://sampling/{namespace}/{collector} |
Combined head + tail sampling profile |
otel://instrumentations/{namespace} |
Summary list of Instrumentation CRDs in {namespace} |
otel://instrumentation/{namespace}/{name} |
Sanitized Instrumentation CRD spec |
otel://target-allocator/{namespace}/{name} |
Target Allocator configuration, allocation strategy, and Prometheus CR selectors |
Knowledge Layer: 7 Agent Skills & 12 Offline Scripts
| Skill Directory | Purpose | Bundled Offline Scripts (scripts/) |
|---|---|---|
skills/provisioning-opentelemetry-collectors |
Role-based Collector architecture (agent, gateway, tail-sampler, all-in-one), GOMEMLIMIT sizing, RBAC |
plan_collector_topology.py, render_collector_cr.py, lint_collector_config.py |
skills/instrumenting-kubernetes-workloads |
Multi-language Operator auto-instrumentation, OTLP protocol alignment, Go/Rust OBI eBPF fallback | lint_workload_manifest.py, render_instrumentation_cr.py, render_obi_manifest.py |
skills/troubleshooting-telemetry-pipelines |
Evidence-first pipeline triage (:8888/metrics, OOMKilled, webhook failures, silent drops) |
analyze_internal_metrics.py |
skills/tuning-sampling-and-trace-derived-metrics |
Head vs. probabilistic vs. two-tier tail sampling (loadbalancing exporter) + spanmetrics/servicegraph |
estimate_tail_sampling_capacity.py, render_tail_sampling_policies.py |
skills/controlling-telemetry-cardinality-and-noise |
Metric series estimation, OTTL attribute dropping, healthcheck noise filtering, PII redaction | render_ottl_statements.py |
skills/auditing-observability-security-posture |
Secret redaction, TLS, least-privilege RBAC, Linux 5.8+ CAP_BPF/CAP_PERFMON eBPF auditing |
render_audit_report.py |
skills/upgrading-opentelemetry-components |
Safe Collector/Operator upgrades (v0.120+ pull metrics, v0.123+ debug exporter, semconv migration) |
check_config_deprecations.py |
Getting Started & CLI Flags
Run from Source
cd src/opentelemetry-mcp-server
uv sync
# Default safe mode (read-only by default unless --allow-write is passed)
uv run opentelemetry-mcp-server
# Enable cluster mutations (still protected by dry_run=True default and confirmation gates)
uv run opentelemetry-mcp-server --allow-write
# Bind to a specific kubeconfig context (multi-cluster pattern: one server entry per context)
uv run opentelemetry-mcp-server --context prod-us-east-1 --allow-write
# Expose only specific toolsets
uv run opentelemetry-mcp-server --toolsets discovery,diagnostics
Configuration & CLI Options
| CLI Flag | Environment Variable | Default | Description |
|---|---|---|---|
--allow-write |
MCP_ALLOW_WRITE |
false |
Enable cluster-mutating tools (dry_run=False) |
--read-only |
MCP_READ_ONLY |
false |
Force read-only mode (registers only the 7 read-only tools) |
--toolsets |
MCP_TOOLSETS |
all |
Comma-separated toolsets (all, readonly, discovery, collector, instrumentation, pipeline, diagnostics, governance, ui) |
--context |
KUBE_CONTEXT / K8S_CONTEXT_NAME |
current | Bind server instance to a specific kubeconfig context |
--collector-version-default |
OTEL_COLLECTOR_VERSION_DEFAULT |
0.152.1 |
Default OpenTelemetry Collector Contrib image tag |
Testing Suite (3 Layers)
The test suite follows MCP Server Testing Guide across three deterministic layers:
# Run all 380 tests across unit, integration, and skill layers
uv run pytest
# Layer 1: Pure unit tests (builder invariants, config linter, redaction, metrics parser)
uv run pytest tests/unit/
# Layer 2: In-memory FastMCP Client integration & end-to-end workflow tests
uv run pytest tests/integration/
# Layer 3: Agent Plugin manifest, SKILL.md budgets, gate markers, and offline script tests
uv run pytest tests/skills/
Metadata
Release files for talkops-opentelemetry-mcp-server 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| talkops_opentelemetry_mcp_server-0.2.0.tar.gz | 379.2 kB | With provenance | Details for talkops_opentelemetry_mcp_server-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| talkops_opentelemetry_mcp_server-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for talkops_opentelemetry_mcp_server-0.2.0-py3-none-any.whl |
Total release size: 540.8 kB
Release files / talkops_opentelemetry_mcp_server-0.2.0.tar.gz
| Download URL | talkops_opentelemetry_mcp_server-0.2.0.tar.gz |
|---|---|
| Size | 379.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1632fcb7993e3d4fb2574fc253f4d5a43cfccf3fc0ca14f009595fe955fa3b77
|
|
BLAKE2b-256 checksum How to use checksums |
9a89057cb3c99a74b3779c5454f4e8d8c1453f5857ddb73d047bf916971dce51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / talkops_opentelemetry_mcp_server-0.2.0-py3-none-any.whl
| Download URL | talkops_opentelemetry_mcp_server-0.2.0-py3-none-any.whl |
|---|---|
| Size | 161.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e350e186d2f5b33af6be4d15b3a94ffc19ab031db543afae197db263e34ce02
|
|
BLAKE2b-256 checksum How to use checksums |
2cf4d46c132d7b08f22095909dc1e10e053b020edb91db9dff002a354ed9682b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for talkops-opentelemetry-mcp-server 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for talkops_opentelemetry_mcp_server-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.