- npm v0.18.1
- PyPI v0.2.0
- 15,000+ npm downloads
Your MCP tool failed. Your traces said 200 OK.
OpenTelemetry for MCP servers in Node.js and Python — it catches silent failures and tampered tool definitions. It detects, never blocks.
npm i opentel-mcp- OpenTelemetry
- Model Context Protocol
- Node.js 20+
- TypeScript
- MIT licensed
- 748 tests
15,000+
Total npm downloads since launch.
npm v0.18.1 · PyPI v0.2.0.
200 OK, but the tool failed.
MCP reports success at the JSON-RPC envelope while the failure sits inside CallToolResult.isError. Same call, two traces:
Standard OTel span
- http.status_code
- 200
- span.status
- UNSET / OK
- result.isError
- (never inspected)
Dashboards stay green. The failure is invisible.
With opentel-mcp
- http.status_code
- 200
- span.status
- ERROR
- mcp.failure.fingerprint
- stable 16-hex hash
isError detected, span flagged, identical failures grouped.
What's new — v0.18 · Python 0.2.0
Security observability for MCP tool calls
- Tool definition integrity: SHA-256 hashes and pinning to spot rug-pulls.
- Secret leak detection in tool outputs (opt-in; type and count only).
- Auth failure counter and sensitive-tool audit events with wildcards.
- Security panel in the dashboard; identical hashes in JS and Python.
- v0.18.1: clean install, no deprecation warnings, 0 known vulnerabilities.
Next: v0.19 · planned
- Per-call integrity checks
- Suspected-rug-pull event
- Pin age
Planned, not released. Scope may change.
Built specifically for MCP observability
Always detects, never blocks.
Core
What every server gets from one instrumentMcpServer() call.
Data freshness
Know when a tool is answering with stale data.
Privacy and hardening
Observability that doesn't become a data leak.
Security observability · v0.18 · Python 0.2.0
Notice when a tool changes underneath you.
opentel-mcp detects and reports. It never blocks a call or alters a result.
Tool definition integrity
SHA-256 hashes plus pinning detect rug-pulls: a tool that changes after you approved it.
Secret leak detection
Opt-in. Reports the type and count of secrets in tool outputs, never the value.
Auth failure counter
A metric for rejected credentials across your tool surface.
Sensitive tool audit events
Audit events for the tools you mark sensitive, with wildcard matching.
Security panel
Everything above in the dashboard, with the same hash in JS and Python.
How it works
Install
Add opentel-mcp alongside your existing OpenTelemetry SDK setup.
pnpm add opentel-mcpInstrument your server
Wrap your MCP server once — every tools/call gets a span automatically.
import { instrumentMcpServer } from "opentel-mcp";
instrumentMcpServer(server);See silent failures in your traces
Tool calls with isError: true now show up as ERROR spans with a stable fingerprint, in any OTel-compatible backend.
span: tools/call query_database
status: ERROR
fingerprint: a1b2c3d4e5f6a7b8How opentel-mcp compares
| Capability | opentel-mcp | @opentelemetry/api (raw) |
|---|---|---|
| Instruments tools/call automatically | ||
| Detects isError: true inside a successful response | ||
| Deep failure fingerprinting | ||
| Built-in mcp.tool.* metrics instruments | ||
| LLM cost tracking on tool calls | ||
| Detects an agent retrying the same failure repeatedly | ||
| Detects a tool's input schema changing between observations | ||
| Detects its own instrumentation silently no-op'ing | ||
| Cardinality-safe metric attributes, structurally enforced | ||
| Never throws into the instrumented handler | ||
| Requires manual span code per handler |
Raw @opentelemetry/api has no concept of MCP or CallToolResult — that's true by definition, not a knock against it. See the full comparison page for the reasoning behind every row, including why fastmcp and mcp-tracer aren't columns here.
Install in seconds
npm 0.18.1 · PyPI 0.2.0
npm install opentel-mcpPython support
- mcp 1.25–2.x, Python 3.10–3.14
- Same silent-failure detection as the Node.js package
- Error fingerprints identical to JS (shared conformance fixtures)
- Same dashboard, via dev mode
- 0.2.0 adds the security features: tool integrity hashes and pinning, secret leak detection, auth failure counter, sensitive tool audit events
Stop shipping silent MCP failures.
Install opentel-mcp and see the first ERROR span it catches that your current setup misses.
pnpm add opentel-mcp