otel-mcp
An MCP server that emits OpenTelemetry traces, metrics, and logs to OTLP endpoints in various formats. It includes tool-mimicry profiles to generate realistic traffic resembling common tools like nginx, postgres, and AWS Lambda for testing and demonstration purposes.
README
otel-mcp
An MCP server that emits OpenTelemetry traces, metrics, and logs to one or more OTLP endpoints at the same time, in any of the three OTLP wire formats:
grpc— OTLP/gRPC (protobuf over HTTP/2)http/protobuf— OTLP/HTTP binary protobufhttp/json— OTLP/HTTP proto3-JSON (spec-compliant)
It also ships tool-mimicry profiles that produce realistic signal bundles shaped like well-known tools (nginx, postgres, redis, kafka, aws-lambda, kubernetes pod, generic gRPC service), so you can populate a collector or backend with traffic that looks like a real environment.
Install
uv venv
uv pip install -e .
Run
otel-mcp # stdio transport — wire into any MCP client
Or via an MCP client config (e.g. Claude Desktop, Claude Code):
{
"mcpServers": {
"otel": {
"command": "otel-mcp"
}
}
}
Env bootstrap
If OTEL_EXPORTER_OTLP_ENDPOINT is set on launch, an endpoint named default
is registered using the standard OTEL env vars:
OTEL_EXPORTER_OTLP_ENDPOINTOTEL_EXPORTER_OTLP_PROTOCOL(grpc|http/protobuf|http/json)OTEL_EXPORTER_OTLP_HEADERS(comma-separatedk=vpairs)OTEL_EXPORTER_OTLP_INSECURE(gRPC TLS toggle)
Tools
Endpoint management
| Tool | Purpose |
|---|---|
add_endpoint |
Register a named OTLP destination (url, protocol, signals, headers, …). |
remove_endpoint |
Drop one endpoint by name. |
clear_endpoints |
Drop every endpoint. |
list_endpoints |
Enumerate current endpoints. |
status |
Endpoints + available mimic profiles. |
Endpoints are selected per call: every signal-emitting tool accepts an
endpoints: [names] arg. Omit it to fan out to every endpoint that accepts
that signal type.
Raw signal emission
| Tool | Shape of input |
|---|---|
send_trace |
{service_name, spans[]} — each span has name, kind, attributes, duration_ms, status, events[], optional parent_name for nesting. |
send_metric |
{service_name, metrics[]} — each metric has name, kind (counter/up_down_counter/gauge/histogram), unit, description, points[]. Histograms accept a list of samples per point. |
send_log |
{service_name, records[]} — each record has body, severity, severity_text, attributes, timestamp_ns. |
Mimicry
| Tool | Purpose |
|---|---|
list_mimic_profiles |
Show every profile with its parameters. |
mimic_tool |
Run one profile and send its bundle once. |
generate_load |
Run a profile on a loop to simulate sustained traffic. |
Built-in profiles:
| Profile | What it looks like |
|---|---|
nginx / http-server |
Server spans with HTTP semconv, access logs, request counters & latency histograms. |
postgres |
DB client spans with db.system=postgresql + connection pool metrics. |
redis |
DB client spans with db.system=redis. |
kafka |
Producer/consumer spans with messaging semconv. |
aws-lambda |
Server spans with faas.* + cloud.* resource attrs, Lambda access logs, invocation metrics. |
k8s-pod |
Resource = full k8s.* attributes, container cpu/memory/network metrics, Started event log. |
grpc |
Server spans with rpc.system=grpc. |
Example session
> 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"}}
]
Adding a new mimic profile
- Write a function returning a
MimicBundleinsrc/otel_mcp/mimics.py. - Register it in the
PROFILESdict at the bottom of that file. - Call
list_mimic_profilesto confirm it picked up the parameters.
Profiles stay declarative: each returns span/metric/log specs that flow through the same generator pipeline, so they inherit correct resource merging, wire format support, and fan-out automatically.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。