traceloop/opentelemetry-mcp-server
Unified MCP server for querying OpenTelemetry traces across multiple backends (Jaeger, Tempo, Traceloop, etc.), enabling AI agents to analyze distributed traces for automated debugging and observability.
d03e08a2b263opentelemetry-mcp0.2.2 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety and Capability Exposure are shown as partly traced instead of a score: no finding there is not a clean result.
- In 18 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 11 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
None of the tools reaches any of these in the code the scanner could trace.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (11: 11 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
find_errorstool Find traces with errors.
Find traces with errors.
Including detailed error messages, stack traces, and LLM-specific error information.
Args:
start_time: Start time in ISO 8601 format
end_time: End time in ISO 8601 format
service_name: Filter by service name
limit: Maximum error traces to return (default: 100)
Returns:
JSON string with error tracesget_llm_expensive_tracestool Find traces with highest LLM token usage.
Find traces with highest LLM token usage.
Useful for cost optimization and identifying inefficient prompts.
Args:
limit: Maximum number of traces to return (default: 10)
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_tokens: Minimum token count threshold (only return traces above this)
service_name: Filter by service name
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
Returns:
JSON string with top N most expensive traces sorted by total token usageget_llm_model_statstool Get detailed performance statistics for a specific LLM model.
Get detailed performance statistics for a specific LLM model.
Analyzes request count, latency percentiles (p50, p95, p99), token usage statistics,
error rates, and finish reason distributions.
Args:
model_name: Model name to analyze (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo")
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
Returns:
JSON string with comprehensive model statistics including duration/token percentilesget_llm_slow_tracestool Find slowest LLM traces by duration.
Find slowest LLM traces by duration.
Useful for performance optimization and identifying latency bottlenecks.
Args:
limit: Maximum number of traces to return (default: 10)
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum duration threshold in milliseconds (only return traces above this)
service_name: Filter by service name
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
Returns:
JSON string with top N slowest traces sorted by durationget_llm_usagetool Get aggregated LLM usage metrics (token counts) for a time period.
Get aggregated LLM usage metrics (token counts) for a time period.
Provides breakdowns by model and service.
Args:
start_time: Start time in ISO 8601 format
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider
gen_ai_request_model: Filter by requested model name
gen_ai_response_model: Filter by actual model used
limit: Maximum traces to analyze (default: 1000)
Returns:
JSON string with usage metricsget_tracetool Get complete trace details by trace ID.
Get complete trace details by trace ID.
Returns all spans with attributes, including parsed Opentelemetry data for LLM operations.
Args:
trace_id: Trace identifier
Returns:
JSON string with trace detailslist_llm_modelstool List all LLM models being used with usage statistics.
List all LLM models being used with usage statistics.
Discovers what models are deployed and tracks their usage patterns.
Args:
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic, cohere)
limit: Maximum traces to analyze for model discovery (default: 1000)
Returns:
JSON string with list of models and their statistics (count, request_count, first_seen, last_seen)list_llm_tools_tooltool List all LLM tools being used by identifying traceloop.span.kind == tool.
List all LLM tools being used by identifying traceloop.span.kind == tool.
Discovers which tools/functions LLM applications are calling, grouped by tool name
with usage statistics.
Args:
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider (openai, anthropic, etc.)
limit: Maximum spans to analyze (default: 1000)
Returns:
JSON string with list of tools and their statistics (usage count, services, first/last seen)list_servicestool List all available services in the OpenTelemetry backend.
List all available services in the OpenTelemetry backend.
Returns:
JSON string with list of servicessearch_spans_tooltool Search for individual OpenTelemetry spans with optional filters.
Search for individual OpenTelemetry spans with optional filters.
Unlike search_traces, this returns individual spans rather than grouped traces,
which is useful for analyzing specific operations or finding spans with certain
characteristics (e.g., LLM tool calls with traceloop.span.kind == tool).
Args:
service_name: Filter by service name
operation_name: Filter by operation/span name
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum span duration in milliseconds
max_duration_ms: Maximum span duration in milliseconds
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic)
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
has_error: Filter spans with errors
tags: Additional tag filters as key-value pairs
filters: Generic filter conditions - list of filter objects with:
- field: Field name in dotted notation (e.g., "traceloop.span.kind")
- operator: Comparison operator
- value: Single value for most operators
- values: List of values for "in", "not_in", "between" operators
- value_type: Type of value(s) - "string", "number", or "boolean"
limit: Maximum number of spans to return (1-1000, default: 100)
Returns:
JSON string with span summaries
Example filter to find LLM tool calls:
{"field": "traceloop.span.kind", "operator": "equals", "value": "tool", "value_type": "string"}search_tracestool Search for OpenTelemetry traces with filters.
Search for OpenTelemetry traces with filters.
Supports both simple parameters and advanced generic filter system.
Args:
service_name: Filter by service name (use filters for advanced queries)
operation_name: Filter by operation/span name
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum trace duration in milliseconds
max_duration_ms: Maximum trace duration in milliseconds
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic)
gen_ai_request_model: Filter by requested model name (e.g., gpt-4)
gen_ai_response_model: Filter by actual model used (e.g., gpt-4-0613)
has_error: Filter traces with errors
tags: Additional tag filters as key-value pairs
filters: Generic filter conditions (advanced) - list of filter objects with:
- field: Field name in dotted notation (e.g., "gen_ai.usage.prompt_tokens")
- operator: Comparison operator (equals, not_equals, gt, lt, gte, lte, contains,
not_contains, starts_with, ends_with, in, not_in, between, exists, not_exists)
- value: Single value for most operators
- values: List of values for "in", "not_in", "between" operators
- value_type: Type of value(s) - "string", "number", or "boolean"
limit: Maximum number of traces to return (1-1000, default: 100)
Returns:
JSON string with search results
Filter Examples:
Find expensive traces:
{"field": "gen_ai.usage.total_tokens", "operator": "gt", "value": 5000, "value_type": "number"}
Filter by multiple models:
{"field": "gen_ai.request.model", "operator": "in", "values": ["gpt-4", "claude-3"], "value_type": "string"}
Check if attribute exists:
{"field": "gen_ai.request.temperature", "operator": "exists", "value_type": "number"}
Find streaming requests:
{"field": "gen_ai.request.is_streaming", "operator": "equals", "value": true, "value_type": "boolean"}Text the model reads (11)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
search_traces tool
Search for OpenTelemetry traces with filters.
Supports both simple parameters and advanced generic filter system.
Args:
service_name: Filter by service name (use filters for advanced queries)
operation_name: Filter by operation/span name
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum trace duration in milliseconds
max_duration_ms: Maximum trace duration in milliseconds
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic)
gen_ai_request_model: Filter by requested model name (e.g., gpt-4)
gen_ai_response_model: Filter by actual model used (e.g., gpt-4-0613)
has_error: Filter traces with errors
tags: Additional tag filters as key-value pairs
filters: Generic filter conditions (advanced) - list of filter objects with:
- field: Field name in dotted notation (e.g., "gen_ai.usage.prompt_tokens")
- operator: Comparison operator (equals, not_equals, gt, lt, gte, lte, contains,
not_contains, starts_with, ends_with, in, not_in, between, exists, not_exists)
- value: Single value for most operators
- values: List of values for "in", "not_in", "between" operators
- value_type: Type of value(s) - "string", "number", or "boolean"
limit: Maximum number of traces to return (1-1000, default: 100)
Returns:
JSON string with search results
Filter Examples:
Find expensive traces:
{"field": "gen_ai.usage.total_tokens", "operator": "gt", "value": 5000, "value_type": "number"}
Filter by multiple models:
{"field": "gen_ai.request.model", "operator": "in", "values": ["gpt-4", "claude-3"], "value_type": "string"}
Check if attribute exists:
{"field": "gen_ai.request.temperature", "operator": "exists", "value_type": "number"}
Find streaming requests:
{"field": "gen_ai.request.is_streaming", "operator": "equals", "value": true, "value_type": "boolean"}get_trace tool
Get complete trace details by trace ID.
Returns all spans with attributes, including parsed Opentelemetry data for LLM operations.
Args:
trace_id: Trace identifier
Returns:
JSON string with trace detailsget_llm_usage tool
Get aggregated LLM usage metrics (token counts) for a time period.
Provides breakdowns by model and service.
Args:
start_time: Start time in ISO 8601 format
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider
gen_ai_request_model: Filter by requested model name
gen_ai_response_model: Filter by actual model used
limit: Maximum traces to analyze (default: 1000)
Returns:
JSON string with usage metricslist_services tool
List all available services in the OpenTelemetry backend.
Returns:
JSON string with list of servicesfind_errors tool
Find traces with errors.
Including detailed error messages, stack traces, and LLM-specific error information.
Args:
start_time: Start time in ISO 8601 format
end_time: End time in ISO 8601 format
service_name: Filter by service name
limit: Maximum error traces to return (default: 100)
Returns:
JSON string with error traceslist_llm_models tool
List all LLM models being used with usage statistics.
Discovers what models are deployed and tracks their usage patterns.
Args:
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic, cohere)
limit: Maximum traces to analyze for model discovery (default: 1000)
Returns:
JSON string with list of models and their statistics (count, request_count, first_seen, last_seen)get_llm_model_stats tool
Get detailed performance statistics for a specific LLM model.
Analyzes request count, latency percentiles (p50, p95, p99), token usage statistics,
error rates, and finish reason distributions.
Args:
model_name: Model name to analyze (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo")
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
Returns:
JSON string with comprehensive model statistics including duration/token percentilesget_llm_expensive_traces tool
Find traces with highest LLM token usage.
Useful for cost optimization and identifying inefficient prompts.
Args:
limit: Maximum number of traces to return (default: 10)
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_tokens: Minimum token count threshold (only return traces above this)
service_name: Filter by service name
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
Returns:
JSON string with top N most expensive traces sorted by total token usageget_llm_slow_traces tool
Find slowest LLM traces by duration.
Useful for performance optimization and identifying latency bottlenecks.
Args:
limit: Maximum number of traces to return (default: 10)
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum duration threshold in milliseconds (only return traces above this)
service_name: Filter by service name
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
Returns:
JSON string with top N slowest traces sorted by durationsearch_spans_tool tool
Search for individual OpenTelemetry spans with optional filters.
Unlike search_traces, this returns individual spans rather than grouped traces,
which is useful for analyzing specific operations or finding spans with certain
characteristics (e.g., LLM tool calls with traceloop.span.kind == tool).
Args:
service_name: Filter by service name
operation_name: Filter by operation/span name
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
min_duration_ms: Minimum span duration in milliseconds
max_duration_ms: Maximum span duration in milliseconds
gen_ai_system: Filter by LLM provider (e.g., openai, anthropic)
gen_ai_request_model: Filter by requested model name (e.g., "gpt-4")
gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")
has_error: Filter spans with errors
tags: Additional tag filters as key-value pairs
filters: Generic filter conditions - list of filter objects with:
- field: Field name in dotted notation (e.g., "traceloop.span.kind")
- operator: Comparison operator
- value: Single value for most operators
- values: List of values for "in", "not_in", "between" operators
- value_type: Type of value(s) - "string", "number", or "boolean"
limit: Maximum number of spans to return (1-1000, default: 100)
Returns:
JSON string with span summaries
Example filter to find LLM tool calls:
{"field": "traceloop.span.kind", "operator": "equals", "value": "tool", "value_type": "string"}list_llm_tools_tool tool
List all LLM tools being used by identifying traceloop.span.kind == tool.
Discovers which tools/functions LLM applications are calling, grouped by tool name
with usage statistics.
Args:
start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
end_time: End time in ISO 8601 format
service_name: Filter by service name
gen_ai_system: Filter by LLM provider (openai, anthropic, etc.)
limit: Maximum spans to analyze (default: 1000)
Returns:
JSON string with list of tools and their statistics (usage count, services, first/last seen)What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 11 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 11 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 11 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 11 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 11 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 11 capabilities; 11 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 11 capabilities; 11 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 11 capabilities; 11 more call code the scanner could not follow, where it may happen
Where the code is: 11 handlers in 1 file at commit d03e08a2b263
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionfastmcp ~=4.1, mcp ~=2.3
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 11 capabilities; 11 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | Streamable HTTP, stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | fastmcp ~=4.1, mcp ~=2.3 |
| Servers in the code | 1 (opentelemetry-mcp) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-05 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 2 catalogs (awesome_habitoai, github_search) |
|---|---|
| License | Apache-2.0 |
| Created | 2025-11-02 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.