Skip to main content
Glama

otel-mcp

OpenTelemetry 트레이스, 메트릭 및 로그를 세 가지 OTLP 와이어 형식 중 하나로, 동시에 하나 이상의 OTLP 엔드포인트로 전송하는 MCP 서버입니다:

  • grpc — OTLP/gRPC (HTTP/2 기반 protobuf)

  • http/protobuf — OTLP/HTTP 바이너리 protobuf

  • http/json — OTLP/HTTP proto3-JSON (사양 준수)

또한 잘 알려진 도구(nginx, postgres, redis, kafka, aws-lambda, kubernetes pod, 일반 gRPC 서비스)와 유사한 형태의 현실적인 신호 번들을 생성하는 도구 모방 프로필을 제공하므로, 실제 환경과 유사한 트래픽으로 수집기나 백엔드를 채울 수 있습니다.

설치

uv venv
uv pip install -e .

Related MCP server: Mock MCP Server

실행

otel-mcp           # stdio transport — wire into any MCP client

또는 MCP 클라이언트 설정(예: Claude Desktop, Claude Code)을 통해 실행:

{
  "mcpServers": {
    "otel": {
      "command": "otel-mcp"
    }
  }
}

환경 변수 부트스트랩

실행 시 OTEL_EXPORTER_OTLP_ENDPOINT가 설정되어 있으면, 표준 OTEL 환경 변수를 사용하여 default라는 이름의 엔드포인트가 등록됩니다:

  • OTEL_EXPORTER_OTLP_ENDPOINT

  • OTEL_EXPORTER_OTLP_PROTOCOL (grpc | http/protobuf | http/json)

  • OTEL_EXPORTER_OTLP_HEADERS (쉼표로 구분된 k=v 쌍)

  • OTEL_EXPORTER_OTLP_INSECURE (gRPC TLS 토글)

도구

엔드포인트 관리

도구

목적

add_endpoint

명명된 OTLP 대상(url, 프로토콜, 신호, 헤더 등)을 등록합니다.

remove_endpoint

이름으로 엔드포인트 하나를 삭제합니다.

clear_endpoints

모든 엔드포인트를 삭제합니다.

list_endpoints

현재 엔드포인트를 나열합니다.

status

엔드포인트 + 사용 가능한 모방 프로필 상태를 확인합니다.

엔드포인트는 호출별로 선택됩니다: 모든 신호 전송 도구는 endpoints: [names] 인수를 허용합니다. 이를 생략하면 해당 신호 유형을 허용하는 모든 엔드포인트로 전송(fan-out)됩니다.

원시 신호 전송

도구

입력 형태

send_trace

{service_name, spans[]} — 각 스팬은 name, kind, attributes, duration_ms, status, events[], 중첩을 위한 선택적 parent_name을 가집니다.

send_metric

{service_name, metrics[]} — 각 메트릭은 name, kind (counter/up_down_counter/gauge/histogram), unit, description, points[]를 가집니다. 히스토그램은 포인트당 샘플 목록을 허용합니다.

send_log

{service_name, records[]} — 각 레코드는 body, severity, severity_text, attributes, timestamp_ns를 가집니다.

모방(Mimicry)

도구

목적

list_mimic_profiles

모든 프로필과 해당 매개변수를 표시합니다.

mimic_tool

프로필 하나를 실행하고 번들을 한 번 전송합니다.

generate_load

지속적인 트래픽을 시뮬레이션하기 위해 루프에서 프로필을 실행합니다.

내장 프로필:

프로필

형태

nginx / http-server

HTTP semconv, 액세스 로그, 요청 카운터 및 지연 시간 히스토그램이 포함된 서버 스팬.

postgres

db.system=postgresql + 연결 풀 메트릭이 포함된 DB 클라이언트 스팬.

redis

db.system=redis가 포함된 DB 클라이언트 스팬.

kafka

메시징 semconv가 포함된 프로듀서/컨슈머 스팬.

aws-lambda

faas.* + cloud.* 리소스 속성, Lambda 액세스 로그, 호출 메트릭이 포함된 서버 스팬.

k8s-pod

리소스 = 전체 k8s.* 속성, 컨테이너 CPU/메모리/네트워크 메트릭, Started 이벤트 로그.

grpc

rpc.system=grpc가 포함된 서버 스팬.

예시 세션

> add_endpoint name="otel-collector" url="http://localhost:4318" protocol="http/protobuf"
> add_endpoint name="jaeger-json"    url="http://localhost:4318" protocol="http/json" signals=["traces"]
> mimic_tool profile="nginx" options={"count": 50, "error_rate": 0.1}
> mimic_tool profile="postgres"
> generate_load profile="kafka" iterations=10 interval_seconds=2
> send_trace service_name="checkout" spans=[
    {"name": "POST /checkout", "kind": "server", "duration_ms": 42, "attributes": {"http.response.status_code": 200}},
    {"name": "charge_card",    "kind": "client", "parent_name": "POST /checkout", "duration_ms": 18,
     "attributes": {"peer.service": "stripe"}}
  ]

새로운 모방 프로필 추가

  1. src/otel_mcp/mimics.py에서 MimicBundle을 반환하는 함수를 작성합니다.

  2. 해당 파일 하단의 PROFILES 딕셔너리에 등록합니다.

  3. list_mimic_profiles를 호출하여 매개변수가 제대로 인식되었는지 확인합니다.

프로필은 선언적으로 유지됩니다: 각 프로필은 동일한 생성기 파이프라인을 통과하는 스팬/메트릭/로그 사양을 반환하므로, 올바른 리소스 병합, 와이어 형식 지원 및 팬아웃을 자동으로 상속받습니다.

Available Tools

11 tools
add_endpointA

Register an OTLP destination.

Args: name: Unique identifier used by other tools to target this endpoint. url: Collector URL. gRPC: host:port or http://host:port. HTTP: base URL (/v1/traces etc. is appended automatically). protocol: One of grpc, http/protobuf, http/json. signals: Subset of traces, metrics, logs. Defaults to all. headers: Headers added to every request (auth tokens, tenant ids, ...). insecure: gRPC only — disable TLS. timeout_seconds: Per-request timeout. overwrite: If an endpoint with this name already exists, replace it.

Inputs: name (required), url (required), protocol, signals, +4 more. Returns: object

clear_endpointsB

Remove all endpoints.

Inputs: no named parameters. Returns: object

generate_loadA

Repeatedly run a mimic profile to simulate sustained traffic.

Blocks for roughly iterations * interval_seconds seconds. For true background loops use an external scheduler — this tool is synchronous by design so the caller sees per-iteration results.

Inputs: profile (required), iterations, interval_seconds, endpoints, +1 more. Returns: object

list_endpointsB

List registered endpoints.

Inputs: no named parameters. Returns: object

list_mimic_profilesB

List available tool-mimicry profiles.

Inputs: no named parameters. Returns: object

mimic_toolB

Emit a realistic bundle of signals mimicking a known tool.

Args: profile: One of nginx, postgres, redis, kafka, aws-lambda, k8s-pod, grpc. Call list_mimic_profiles for profile-specific parameters. endpoints: Fan-out target endpoints. Defaults to all registered. options: Keyword args passed to the profile (e.g. {"count": 50}).

Inputs: profile (required), endpoints, options. Returns: object

remove_endpointC

Remove an endpoint by name.

Inputs: name (required). Returns: object

send_logB

Send one or more log records.

Each record dict accepts: body, severity (trace/debug/info/warn/ error/fatal), severity_text, attributes, timestamp_ns.

Inputs: service_name (required), records (required), resource_attributes, endpoints. Returns: object

send_metricB

Send one or more metric instruments.

Each metric dict accepts: name, kind (counter/up_down_counter/gauge/ histogram), unit, description, points (list of {value, attributes}). For histograms, value may be a list of samples.

Inputs: service_name (required), metrics (required), resource_attributes, endpoints. Returns: object

send_traceA

Send one or more spans to the targeted endpoints.

Each span dict accepts: name, kind (internal/server/client/producer/ consumer), attributes, duration_ms, status (ok/error/unset), status_message, events (list of {name, attributes}), parent_name (to nest spans within the same batch).

If endpoints is omitted, fans out to every endpoint that accepts traces.

Inputs: service_name (required), spans (required), resource_attributes, endpoints. Returns: object

statusA

Report configured endpoints and available profiles.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 11 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Tools like add_endpoint, remove_endpoint, and clear_endpoints handle endpoint management, while send_log, send_metric, and send_trace target specific telemetry signals. Mimic_tool and generate_load are for simulation, and list_endpoints/list_mimic_profiles/status are for querying, all with non-overlapping functions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as add_endpoint, list_endpoints, send_log, and mimic_tool. This uniformity makes the set predictable and easy to understand, with no deviations in naming conventions.

    Tool Count5/5

    With 11 tools, this server is well-scoped for OpenTelemetry management and simulation. It covers endpoint configuration, telemetry emission, mimicry, and status reporting without being overly sparse or bloated, with each tool serving a clear and necessary role.

    Completeness5/5

    The tool set provides complete coverage for the OpenTelemetry domain, including CRUD operations for endpoints (add, remove, clear, list), sending all signal types (logs, metrics, traces), simulation capabilities (mimic, generate_load), and querying (status, list profiles). There are no obvious gaps that would hinder agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server implementation that enables dynamic configuration of OpenTelemetry Collectors, allowing users to add, remove, and configure receivers, processors, and exporters through MCP tools.
      52
      GPL 3.0
    • A
      license
      B
      quality
      D
      maintenance
      A mock MCP server for testing MCP client implementations and development workflows. Supports tools, prompts, and resources across multiple transport protocols (stdio, HTTP, SSE).
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server for analyzing OpenTelemetry traces with performance and error diagnosis, supporting loading from files, AWS X-Ray, and CloudWatch.
      8
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that gives AI agents access to your application's OpenTelemetry traces for querying, analysis, and debugging.
      5
      11 npm
      2
      MIT