Langfuse MCP
PYPI · LANGFUSE-MCP
Langfuse MCP server for accessing and analyzing telemetry data via natural language
Available components
Last scanned (17 hours ago)
Scores higher than 69% of PyPI servers
Category Monitoring and Observability
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security44
- Malware scan not yet available for this package.Unverified
- No known CVEs affecting this package version or its production dependencies.Pass
- Declares code that runs automatically (build-time code we could not rule out (a Hatch, PDM or setuptools build hook, a dynamic version we could not read statically, shipped VCS metadata or a stray root module)) and that we could not recognise. It may be perfectly ordinary, but we have not established what it does. View diagnostics → Partial
- 2 of 49 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency100
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Cryptographically verified build provenance (signed, bound to avivsinai/langfuse-mcp). View diagnostics → Pass
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 26 days ago).Pass
- Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability66
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 8755 tokens (~182/item across 48 items; 48 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management100
- No destabilizing schema changes in the last 30 days.Pass
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 99% of tool parameters carry a description.Partial
- Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Tool Safety75
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- 0 of 4 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation; "delete_annotation_queue_item" implies "delete" and declares no destructiveHint at all, which the MCP spec reads as destructive by default. See how to fix → Fail
- An AI judge read all 48 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a current MCP spec version (2026-07-28).Pass
Checks we ran (15)
- Known CVEs
- Install scripts
- Dependency health
- Source repository
- Provenance
- License
- Maintenance
- Security disclosure
- Schema quality
- Stability
- Tool coverage
- Injection markers
- Destructive annotations
- Judged manipulation
- MCP protocol
Checks we could not complete (1)
These are gaps on our side, not findings about this package. We only credit what we can confirm, so a category made up entirely of them scores 0.
- Malware scan in Supply Chain SecurityMalware scan not yet available for this package.
Does not apply to this package (2)
- Endpoint SecurityScored on hosted endpoints only. A package has no live endpoint of its own for us to probe.
- Transport & ReachabilityScored on hosted endpoints only. A package has no live endpoint of its own for us to probe.
The score does not measure everything. What the score does not measure →
Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 21 Nov 26 +1
- Stability: 0.97 → pass security
- 19 Nov 26 −1
- Stability: pass → 0.93 functional
- 13 Nov 26 −14
- Malware scan: pass → unverified ▼ security
- Stability: 0.97 → pass security
- Package version: 0.13.0 → 0.14.0 functional
- 12 Nov 26 +15
- Malware scan: unverified → pass ▲ security
- 11 Nov 26 −14
- Malware scan: pass → unverified ▼ security
- 9 Nov 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 83 to 87. That category is still filling its 30-day observation window: 25 days of observed history at the previous scan, 26 at this one. The score rises as the window fills, whether or not the server changes.
- 7 Nov 26 −3
- Stability: pass → 0.80 functional
- 6 Nov 26 +15
- Malware scan: unverified → pass ▲ security
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 21 Nov 2026 · Analysed pypi/langfuse-mcp@0.14.0
Provenance Verified
A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.
| Result | Verified |
|---|---|
| Ecosystem | pypi |
| Reason | Verified |
| Discovered via | GitHub artifact attestations |
| Source repo | avivsinai/langfuse-mcp |
| Certificate issuer | https://token.actions.githubusercontent.com |
| Certificate SAN | https://github.com/avivsinai/langfuse-mcp/.github/workflows/release.yml@refs/heads/main |
| Rekor log index | 3456066172 |
| Predicate type | SLSA build provenance https://slsa.dev/provenance/v1 |
| Subject digest | sha256:ecb6d945abba5c281099298eb3ec99113bd37286e417a3db88bb1163d4c985e3 |
Background: How many MCP packages publish verified provenance →
Install scripts 2 scripts
| Hook | Tier | Command |
|---|---|---|
| build_backend | Known build tool | hatchling.build |
| build_hook | Not reviewed | tool.hatch.version.source |
Background: Why install scripts are a supply-chain risk →
Dependencies 49 packages
| Packages resolved | 49 |
|---|---|
| Stale | 1 |
| No linked repository | 1 |
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
create_annotation_queue ~47
Create an annotation queue.
| Name | Type | Req | Description |
|---|---|---|---|
| description | – | – | Optional queue description |
| name | string | yes | Unique queue name |
| score_config_ids | – | – | Optional score config IDs attached to this queue |
Structured output declared, but exposes no named fields.
No examples provided.
create_annotation_queue_assignment ~41
Assign a user to an annotation queue.
| Name | Type | Req | Description |
|---|---|---|---|
| queue_id | string | yes | Annotation queue ID |
| user_id | string | yes | User ID to assign |
Structured output declared, but exposes no named fields.
No examples provided.
create_annotation_queue_item ~64
Create an annotation queue item.
| Name | Type | Req | Description |
|---|---|---|---|
| object_id | string | yes | Object ID to enqueue |
| object_type | string | yes | Object type, for example TRACE or OBSERVATION |
| queue_id | string | yes | Annotation queue ID |
| status | – | – | Optional status |
Structured output declared, but exposes no named fields.
No examples provided.
create_chat_prompt ~168
Create a new chat prompt version in Langfuse. Chat prompts are arrays of role/content messages. Prompts are immutable; create a new version to update content. Labels are unique across versions.
| Name | Type | Req | Description |
|---|---|---|---|
| commit_message | – | – | Optional commit message describing the changes |
| config | – | – | Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7}) |
| labels | – | – | Labels to assign (e.g., ['production', 'staging']) |
| name | string | yes | The name of the prompt to create |
| prompt | array | yes | Chat messages in the format [{role: 'system'|'user'|'assistant', content: '...'}] |
| tags | – | – | Optional tags for organization (e.g., ['experimental', 'v2']) |
Structured output declared, but exposes no named fields.
No examples provided.
create_dataset ~162
Create a new dataset in the project. Datasets are used to store evaluation test cases with input/expected output pairs. Args: ctx: Context object containing lifespan context with Langfuse client name: Name for the new dataset (must be unique) description: Optional description metadata: Optional custom metadata Returns: A dictionary containing the created dataset details: - id: Unique dataset identifier - name: Dataset name - description: Dataset description - metadata: Custom metadata - createdAt: Creation timestamp
| Name | Type | Req | Description |
|---|---|---|---|
| description | – | – | Optional description of the dataset |
| metadata | – | – | Optional custom metadata as key-value pairs |
| name | string | yes | Name for the new dataset (must be unique in project) |
Structured output declared, but exposes no named fields.
No examples provided.
create_dataset_item ~289
Create a new item in a dataset, or update if item_id already exists. Dataset items store input/expected output pairs for evaluation. If item_id is provided and already exists, the item will be updated (upsert behavior). Args: ctx: Context object containing lifespan context with Langfuse client dataset_name: Name of the target dataset input: Input data for the item expected_output: Expected output for evaluation metadata: Optional custom metadata source_trace_id: Optional linked trace ID source_observation_id: Optional linked observation ID item_id: Optional custom ID (enables upsert) status: Item status (ACTIVE or ARCHIVED) Returns: A dictionary containing the created/updated item details
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_name | string | yes | Name of the dataset to add the item to |
| expected_output | – | – | Expected output data for evaluation (any JSON-serializable value) |
| input | – | – | Input data for the dataset item (any JSON-serializable value) |
| item_id | – | – | Optional custom ID for the item (for upsert behavior) |
| metadata | – | – | Optional custom metadata as key-value pairs |
| source_observation_id | – | – | Optional observation ID to link this item to |
| source_trace_id | – | – | Optional trace ID to link this item to |
| status | – | – | Item status (default: ACTIVE) |
Structured output declared, but exposes no named fields.
No examples provided.
create_dataset_run_item ~127
Create a dataset run item and flush the ingestion write. If this legacy API is gone, use the SDK experiment runner or OTel ingestion; neither can link an existing trace through this API.
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_item_id | string | yes | Dataset item ID to include in the run |
| metadata | – | – | Optional run-item metadata |
| observation_id | – | – | Optional observation ID linked to this run item |
| run_description | – | – | Optional run description |
| run_name | string | yes | Dataset run name to append this item to |
| trace_id | – | – | Optional trace ID linked to this run item |
Structured output declared, but exposes no named fields.
No examples provided.
create_text_prompt ~159
Create a new text prompt version in Langfuse. Prompts are immutable; creating a new version is the only way to update prompt content. Labels are unique across versions - assigning a label here will move it from other versions.
| Name | Type | Req | Description |
|---|---|---|---|
| commit_message | – | – | Optional commit message describing the changes |
| config | – | – | Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7}) |
| labels | – | – | Labels to assign (e.g., ['production', 'staging']) |
| name | string | yes | The name of the prompt to create |
| prompt | string | yes | Prompt text content (supports {{variables}}) |
| tags | – | – | Optional tags for organization (e.g., ['experimental', 'v2']) |
Structured output declared, but exposes no named fields.
No examples provided.
delete_annotation_queue_assignment ~43
Unassign a user from an annotation queue.
| Name | Type | Req | Description |
|---|---|---|---|
| queue_id | string | yes | Annotation queue ID |
| user_id | string | yes | User ID to unassign |
Structured output declared, but exposes no named fields.
No examples provided.
delete_annotation_queue_item ~39
Delete an annotation queue item.
| Name | Type | Req | Description |
|---|---|---|---|
| item_id | string | yes | Annotation queue item ID |
| queue_id | string | yes | Annotation queue ID |
Structured output declared, but exposes no named fields.
No examples provided.
delete_dataset_item ~80
Delete a dataset item by ID. This is a permanent deletion and cannot be undone. Args: ctx: Context object containing lifespan context with Langfuse client item_id: The ID of the dataset item to delete Returns: A dictionary confirming the deletion
| Name | Type | Req | Description |
|---|---|---|---|
| item_id | string | yes | The ID of the dataset item to delete |
Structured output declared, but exposes no named fields.
No examples provided.
delete_dataset_run ~96
Delete a run through the legacy route, or explicitly delete its traces after removal. Trace deletion also removes observations and related scores. Set delete_traces=True to allow this broader replacement.
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_name | string | yes | The name of the dataset that owns the run |
| delete_traces | boolean | – | Allow trace deletion when the legacy run-delete route is unavailable |
| run_name | string | yes | The dataset run name to delete |
Structured output declared, but exposes no named fields.
No examples provided.
fetch_observation ~193
Get a single observation by ID. Args: ctx: Context object containing lifespan context with Langfuse client observation_id: The ID of the observation to fetch (unique identifier string) output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: Summarized observation object - full_json_string: String containing the full JSON response - full_json_file: Summarized observation object with file save info
| Name | Type | Req | Description |
|---|---|---|---|
| observation_id | string | yes | The ID of the observation to fetch (unique identifier string) |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
fetch_observations ~453
Get observations filtered by type and other criteria. Args: ctx: Context object containing lifespan context with Langfuse client type: The observation type to filter by (SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING or GUARDRAIL) age: Minutes ago to start looking (e.g., 1440 for 24 hours) name: Optional name filter (string pattern to match) user_id: Optional user ID filter (exact match) trace_id: Optional trace ID filter (exact match) parent_observation_id: Optional parent observation ID filter (exact match) page: Page number for pagination (starts at 1) limit: Maximum number of observations to return per page output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: List of summarized observation objects - full_json_string: String containing the full JSON response - full_json_file: List of summarized observation objects with file save info
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Minutes ago to start looking (e.g., 1440 for 24 hours) |
| limit | integer | – | Maximum number of observations to return per page |
| name | – | – | Optional name filter (string pattern to match) |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| page | integer | – | Page number for pagination (starts at 1) |
| parent_observation_id | – | – | Optional parent observation ID filter (exact match) |
| trace_id | – | – | Optional trace ID filter (exact match) |
| type | – | – | The observation type to filter by (SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING or GUARDRAIL) |
| user_id | – | – | Optional user ID filter (exact match) |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
fetch_sessions ~259
Get a list of sessions in the current project. Args: ctx: Context object containing lifespan context with Langfuse client age: Minutes ago to start looking (e.g., 1440 for 24 hours) page: Page number for pagination (starts at 1) limit: Maximum number of sessions to return per page output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: List of summarized session objects - full_json_string: String containing the full JSON response - full_json_file: List of summarized session objects with file save info
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Minutes ago to start looking (e.g., 1440 for 24 hours) |
| limit | integer | – | Maximum number of sessions to return per page |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| page | integer | – | Page number for pagination (starts at 1) |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
fetch_trace ~500
Get a single trace by ID with full details. On Observations API v2, a trace is built from its root observation; a trace with no observations is not found. Args: ctx: Context object containing lifespan context with Langfuse client trace_id: The ID of the trace to fetch (unique identifier string) include_observations: If True, fetch and include the full observation objects. If False, the observations field group is dropped entirely to avoid expensive per-observation IO. Use True when you need access to system prompts, model parameters, or other details stored within observations. Significantly increases response time but provides complete data. output_mode: Controls the output format and detail level Returns: One of the following based on output_mode: - For 'compact' and 'full_json_file': A response dictionary with the structure: { "data": Single trace object, "metadata": { "file_path": Path to saved file (only for full_json_file mode), "file_info": File save details (only for full_json_file mode) } } - For 'full_json_string': A string containing the full JSON response Usage Tips: - For quick browsing: use include_observations=False with output_mode="compact" - For full data but viewable in responses: use include_observations=True with output_mode="compact" - For complete data dumps: use include_observations=True with output_mode="full_json_file"
| Name | Type | Req | Description |
|---|---|---|---|
| include_observations | boolean | – | If True, fetch and include the full observation objects. If False, the observations field group is dropped entirely to avoid the expensive per-observation IO that dominates large-trace payloads. Use… |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| trace_id | string | yes | The ID of the trace to fetch (unique identifier string) |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
fetch_traces ~267
Find traces based on filters. All filter parameters are optional. On Observations API v2, each trace is built from its root observation; traces without a root observation do not appear.
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Minutes ago to start looking (e.g., 1440 for 24 hours) |
| include_observations | boolean | – | If True, fetch and include the full observation objects instead of just IDs. Use this when you need access to system prompts, model parameters, or other details stored within observations. Significan… |
| limit | integer | – | Maximum number of traces to return per page |
| metadata | – | – | Metadata fields to filter by |
| name | – | – | Name of the trace to filter by |
| output_mode | string | – | Controls the output format: 'compact' (default) returns summarized JSON, 'full_json_string' returns complete raw JSON as string, 'full_json_file' saves complete data to file and returns summary with… |
| page | integer | – | Page number for pagination (starts at 1) |
| session_id | – | – | Session ID to filter traces by |
| tags | – | – | Tag or comma-separated list of tags to filter traces by |
| user_id | – | – | User ID to filter traces by |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
find_exceptions ~253
Get error-level observations grouped by file path, function, type, name, or observation type. Args: ctx: Context object containing lifespan context with Langfuse client age: Number of minutes to look back; capped by the configured maximum group_by: How to group errors - "file" groups by recorded code.filepath, "function" by code.function, "type" by recorded exception.type, "name" by observation name, or "observation_type" by observation type Returns: List of error-observation counts grouped by the specified category. A group entry carries a representative observation_id and trace_id. Counts describe error-level observations, NOT individual exception events (which the standard observation listing does not expose).
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| group_by | string | – | How to group errors - 'file' groups by recorded code.filepath metadata, 'function' by code.function, 'type' by recorded exception.type, 'name' by observation name, or 'observation_type' by observatio… |
Structured output declared, but exposes no named fields.
No examples provided.
find_exceptions_in_file ~258
Get detailed error info for a specific file (recorded code.filepath match). Args: ctx: Context object containing lifespan context with Langfuse client filepath: Path to the file as recorded in Langfuse metadata (code.filepath) age: Number of minutes to look back; capped by the configured maximum output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: List of summarized error records (top 10 newest after the full scan) - full_json_string: String containing the full JSON response - full_json_file: List of summarized error records with file save info
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| filepath | string | yes | Path to the file to search for exceptions (full path including extension) |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
find_low_confidence_route_decisions ~252
Find route decisions that are low-confidence or explicitly uncallable.
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | – | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| capability_id | – | – | Optional route-decision metadata capability_id filter |
| include_uncallable | boolean | – | Also return decisions with metadata callable=false |
| limit | integer | – | Maximum number of matching route decisions to return |
| max_confidence | number | – | Return route decisions with confidence at or below this value |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| page | integer | – | Page number for pagination (starts at 1) |
| provider | – | – | Optional route-decision metadata provider filter |
| router_name | – | – | Optional route-decision metadata router_name filter |
| session_id | – | – | Optional route-decision metadata session_id filter |
| trace_id | – | – | Optional Langfuse trace ID filter |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
find_route_decisions ~272
Find generic agent route decisions emitted as Langfuse SPAN observations. This tool is router-neutral. It only treats observations with metadata.schema_version == "mcp.route_decision.v1" as route decisions, and it filters on fields inside observation metadata rather than display output.
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | – | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| capability_id | – | – | Optional route-decision metadata capability_id filter |
| decision_id | – | – | Optional route-decision metadata decision_id filter |
| limit | integer | – | Maximum number of route decisions to return per page |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| page | integer | – | Page number for pagination (starts at 1) |
| provider | – | – | Optional route-decision metadata provider filter |
| router_name | – | – | Optional route-decision metadata router_name filter |
| session_id | – | – | Optional route-decision metadata session_id filter |
| trace_id | – | – | Optional Langfuse trace ID filter |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_annotation_queue ~28
Get a single annotation queue by ID.
| Name | Type | Req | Description |
|---|---|---|---|
| queue_id | string | yes | Annotation queue ID |
Structured output declared, but exposes no named fields.
No examples provided.
get_annotation_queue_item ~45
Get a specific annotation queue item by queue and item ID.
| Name | Type | Req | Description |
|---|---|---|---|
| item_id | string | yes | Annotation queue item ID |
| queue_id | string | yes | Annotation queue ID |
Structured output declared, but exposes no named fields.
No examples provided.
get_data_schema ~83
Get schema of trace, span and event objects. Args: ctx: Context object containing lifespan context with Langfuse client dummy: Unused parameter for API compatibility (can be left empty) Returns: String containing the detailed schema definitions for traces, spans, events, and other core Langfuse data structures
| Name | Type | Req | Description |
|---|---|---|---|
| dummy | string | – | – |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
get_dataset ~134
Get a specific dataset by name. Retrieves dataset details including metadata and item count. Args: ctx: Context object containing lifespan context with Langfuse client name: The name of the dataset to fetch Returns: A dictionary containing dataset details: - id: Unique dataset identifier - name: Dataset name - description: Dataset description - metadata: Custom metadata - items: List of dataset items (if included by the API) - runs: List of dataset runs (if included by the API)
| Name | Type | Req | Description |
|---|---|---|---|
| name | string | yes | The name of the dataset to fetch |
Structured output declared, but exposes no named fields.
No examples provided.
get_dataset_item ~217
Get a specific dataset item by ID. Retrieves the full dataset item including input, expected output, metadata, and linked traces. Args: ctx: Context object containing lifespan context with Langfuse client item_id: The ID of the dataset item to fetch output_mode: How to format the response data Returns: A dictionary containing the dataset item details: - id: Unique item identifier - datasetId: Parent dataset ID - input: Input data for the item - expectedOutput: Expected output data - metadata: Custom metadata - sourceTraceId: Linked trace ID (if any) - sourceObservationId: Linked observation ID (if any) - status: Item status (ACTIVE or ARCHIVED)
| Name | Type | Req | Description |
|---|---|---|---|
| item_id | string | yes | The ID of the dataset item to fetch |
| output_mode | string | – | Output format: 'compact' truncates, 'full_json_string' returns full data, 'full_json_file' writes to file |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_dataset_run ~88
Get a dataset run, including any run items returned by the SDK.
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_name | string | yes | The name of the dataset that owns the run |
| output_mode | string | – | Output format: 'compact' truncates, 'full_json_string' returns full data, 'full_json_file' writes to file |
| run_name | string | yes | The dataset run name to fetch |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_error_count ~131
Get number of traces with error-level observations in last N minutes. Args: ctx: Context object containing lifespan context with Langfuse client age: Number of minutes to look back; capped by the configured maximum Returns: Dictionary with error statistics: trace_count (distinct traces), observation_count (error-level observations), and exception_count (the same error-observation total as find_exceptions, not a count of individual exception events; see metadata.note).
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
Structured output declared, but exposes no named fields.
No examples provided.
get_exception_details ~237
Get detailed error info for a trace/observation. Args: ctx: Context object containing lifespan context with Langfuse client trace_id: The ID of the trace to analyze for errors (unique identifier string) span_id: Optional observation ID to filter by (applies across all observation types) output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: List of summarized error records - full_json_string: String containing the full JSON response - full_json_file: List of summarized error records with file save info
| Name | Type | Req | Description |
|---|---|---|---|
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| span_id | – | – | Optional span ID to filter by specific span (unique identifier string) |
| trace_id | string | yes | The ID of the trace to analyze for exceptions (unique identifier string) |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_metrics_schema ~79
Get the query schema for the metrics API (views, dimensions, measures, aggregations). Companion to query_metrics: describes which views exist, the dimensions and measures available on each, the supported aggregations/operators, and the query-object shape. ``dummy`` is unused and exists only for MCP API compatibility.
| Name | Type | Req | Description |
|---|---|---|---|
| dummy | string | – | – |
| Name | Type | Req | Description |
|---|---|---|---|
| result | string | yes | – |
No examples provided.
get_prompt ~274
Fetch a specific prompt by name with resolved dependencies. Retrieves a prompt from Langfuse with all dependency tags resolved. Uses the SDK's built-in caching for optimal performance. Args: ctx: Context object containing lifespan context with Langfuse client name: The name of the prompt to fetch label: Optional label to fetch (e.g., 'production'). Cannot be used with version. version: Optional specific version number. Cannot be used with label. Returns: A dictionary containing the prompt details: - id: Unique prompt identifier - name: Prompt name - version: Version number - type: 'text' or 'chat' - prompt: The prompt content (string for text, list for chat) - labels: List of labels assigned to this version - tags: List of tags - config: Model configuration (temperature, model, etc.) Raises: ValueError: If both label and version are specified LookupError: If prompt not found
| Name | Type | Req | Description |
|---|---|---|---|
| label | – | – | Label to fetch (e.g., 'production', 'staging'). Mutually exclusive with version. |
| name | string | yes | The name of the prompt to fetch |
| version | – | – | Specific version number to fetch. Mutually exclusive with label. |
Structured output declared, but exposes no named fields.
No examples provided.
get_prompt_unresolved ~221
Fetch a specific prompt by name WITHOUT resolving dependencies. Returns raw prompt content with dependency tags intact (e.g., @@@langfusePrompt:name=xxx@@@) when the SDK supports resolve=false. Otherwise returns the resolved prompt and marks metadata.resolved=True. Useful for analyzing prompt composition and debugging dependency chains. Args: ctx: Context object containing lifespan context with Langfuse client name: The name of the prompt to fetch label: Optional label to fetch. Cannot be used with version. version: Optional specific version number. Cannot be used with label. Returns: A dictionary containing the raw prompt details with dependency tags preserved. Raises: ValueError: If both label and version are specified LookupError: If prompt not found
| Name | Type | Req | Description |
|---|---|---|---|
| label | – | – | Label to fetch (e.g., 'production', 'staging'). Mutually exclusive with version. |
| name | string | yes | The name of the prompt to fetch |
| version | – | – | Specific version number to fetch. Mutually exclusive with label. |
Structured output declared, but exposes no named fields.
No examples provided.
get_route_decision ~127
Fetch one route decision by metadata decision_id.
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | – | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| decision_id | string | yes | Route-decision metadata decision_id to fetch |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_score_v2 ~42
Get a score by ID from Scores API v3 (the v2 route where v3 is not served).
| Name | Type | Req | Description |
|---|---|---|---|
| score_id | string | yes | Score ID |
Structured output declared, but exposes no named fields.
No examples provided.
get_session_details ~386
Get detailed information about a specific session. Args: ctx: Context object containing lifespan context with Langfuse client session_id: The ID of the session to retrieve (unique identifier string) include_observations: If True, fetch and include the full observation objects instead of just IDs. Use this when you need access to system prompts, model parameters, or other details stored within observations. Significantly increases response time but provides complete data. output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: Summarized session details object - full_json_string: String containing the full JSON response - full_json_file: Summarized session details object with file save info Usage Tips: - For quick browsing: use include_observations=False with output_mode="compact" - For full data but viewable in responses: use include_observations=True with output_mode="compact" - For complete data dumps: use include_observations=True with output_mode="full_json_file"
| Name | Type | Req | Description |
|---|---|---|---|
| include_observations | boolean | – | If True, fetch and include the full observation objects instead of just IDs. Use this when you need access to system prompts, model parameters, or other details stored within observations. Significan… |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| session_id | string | yes | The ID of the session to retrieve (unique identifier string) |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
get_user_sessions ~429
Get sessions for a user within a time range. Args: ctx: Context object containing lifespan context with Langfuse client user_id: The ID of the user to retrieve sessions for (unique identifier string) age: Minutes ago to start looking (e.g., 1440 for 24 hours) include_observations: If True, fetch and include the full observation objects instead of just IDs. Use this when you need access to system prompts, model parameters, or other details stored within observations. Significantly increases response time but provides complete data. output_mode: Controls the output format and detail level Returns: Based on output_mode: - compact: List of summarized session objects - full_json_string: String containing the full JSON response - full_json_file: List of summarized session objects with file save info Usage Tips: - For quick browsing: use include_observations=False with output_mode="compact" - For full data but viewable in responses: use include_observations=True with output_mode="compact" - For complete data dumps: use include_observations=True with output_mode="full_json_file"
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | yes | Minutes ago to start looking (e.g., 1440 for 24 hours) |
| include_observations | boolean | – | If True, fetch and include the full observation objects instead of just IDs. Use this when you need access to system prompts, model parameters, or other details stored within observations. Significan… |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| user_id | string | yes | The ID of the user to retrieve sessions for |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
list_annotation_queue_items ~58
List items in an annotation queue.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Items per page (max 100) |
| page | integer | – | Page number for pagination (starts at 1) |
| queue_id | string | yes | Annotation queue ID |
Structured output declared, but exposes no named fields.
No examples provided.
list_annotation_queues ~46
List annotation queues with pagination.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Items per page (max 100) |
| page | integer | – | Page number for pagination (starts at 1) |
Structured output declared, but exposes no named fields.
No examples provided.
list_dataset_items ~263
List items in a dataset with pagination and optional filtering. Returns dataset items with their input, expected output, and metadata. Args: ctx: Context object containing lifespan context with Langfuse client dataset_name: The name of the dataset to list items from source_trace_id: Optional filter by source trace ID source_observation_id: Optional filter by source observation ID page: Page number for pagination (starts at 1) limit: Maximum items per page (max 100) output_mode: How to format the response data Returns: A dictionary containing: - data: List of dataset item objects - metadata: Pagination info (page, limit, total, dataset_name)
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_name | string | yes | The name of the dataset to list items from |
| limit | integer | – | Items per page (max 100) |
| output_mode | string | – | Output format: 'compact' truncates, 'full_json_string' returns full data, 'full_json_file' writes to file |
| page | integer | – | Page number for pagination (starts at 1) |
| source_observation_id | – | – | Filter by source observation ID |
| source_trace_id | – | – | Filter by source trace ID |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
list_dataset_run_items ~115
List dataset run items by dataset ID and run name.
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_id | string | yes | Dataset ID that owns the run items |
| limit | integer | – | Items per page (max 100) |
| output_mode | string | – | Output format: 'compact' truncates, 'full_json_string' returns full data, 'full_json_file' writes to file |
| page | integer | – | Page number for pagination (starts at 1) |
| run_name | string | yes | Dataset run name to list items from |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
list_dataset_runs ~65
List runs for a dataset by dataset name.
| Name | Type | Req | Description |
|---|---|---|---|
| dataset_name | string | yes | The name of the dataset to list runs from |
| limit | integer | – | Items per page (max 100) |
| page | integer | – | Page number for pagination (starts at 1) |
Structured output declared, but exposes no named fields.
No examples provided.
list_datasets ~134
List all datasets in the project with pagination. Returns metadata about datasets including name, description, item count, and timestamps. Args: ctx: Context object containing lifespan context with Langfuse client page: Page number for pagination (starts at 1) limit: Maximum items per page (max 100) Returns: A dictionary containing: - data: List of dataset metadata objects - metadata: Pagination info (page, limit, total)
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | – | Items per page (max 100) |
| page | integer | – | Page number for pagination (starts at 1) |
Structured output declared, but exposes no named fields.
No examples provided.
list_prompts ~199
List and filter prompts in the project. Returns metadata about prompts including versions, labels, tags, and last updated time. Args: ctx: Context object containing lifespan context with Langfuse client name: Optional filter by exact prompt name label: Optional filter by label on any version tag: Optional filter by tag page: Page number for pagination (starts at 1) limit: Maximum items per page (max 100) Returns: A dictionary containing: - data: List of prompt metadata objects - metadata: Pagination info (page, limit, total)
| Name | Type | Req | Description |
|---|---|---|---|
| label | – | – | Filter by label (e.g., 'production', 'staging') |
| limit | integer | – | Items per page (max 100) |
| name | – | – | Filter by exact prompt name |
| page | integer | – | Page number for pagination (starts at 1) |
| tag | – | – | Filter by tag |
Structured output declared, but exposes no named fields.
No examples provided.
list_scores_v2 ~351
List scores via Scores API v3 with optional filters (GET /v2/scores where v3 is not served). With operator ``=`` and a value, v3 defaults an omitted data_type to NUMERIC; pass BOOLEAN for boolean scores. Strict ``>``/``<`` can return fewer than limit rows on a page after boundary rows are dropped; next_page shows whether more rows exist.
| Name | Type | Req | Description |
|---|---|---|---|
| config_id | – | – | Optional score config ID |
| data_type | – | – | Optional score data type |
| environment | – | – | Optional environment filter |
| from_timestamp | – | – | Optional ISO8601 timestamp lower bound |
| limit | integer | – | Items per page (max 100) |
| name | – | – | Optional score name filter |
| operator | – | – | Optional comparison for value: =, >, >=, < or <= (default =) |
| page | integer | – | Page number for pagination (starts at 1) |
| queue_id | – | – | Optional annotation queue ID |
| score_ids | – | – | Optional comma-separated score IDs |
| session_id | – | – | Optional session ID (not together with trace_id) |
| source | – | – | Optional score source filter |
| to_timestamp | – | – | Optional ISO8601 timestamp upper bound |
| trace_id | – | – | Optional trace ID |
| trace_tags | – | – | Optional comma-separated trace tags (Scores API v3 has none: uses GET /v2/scores, which Langfuse Cloud removes on 2026-11-16) |
| user_id | – | – | Optional user ID filter (Scores API v3 has none: uses GET /v2/scores, which Langfuse Cloud removes on 2026-11-16) |
| value | – | – | Optional numeric score value filter |
Structured output declared, but exposes no named fields.
No examples provided.
query_metrics ~641
Query aggregated metrics (cost, latency, token usage, counts, score values) from Langfuse. Wraps the Langfuse v2 metrics endpoint. Use this for analytics questions — "what did inference cost in the last 24h grouped by model", "p95 latency per prompt", "score distribution by name" — instead of pulling raw observations and aggregating client-side. Per-parameter contracts live in the Field descriptions above. Notes: - The v2 metrics endpoint is Langfuse Cloud-only; self-hosted instances may return 404. - Recently-ingested data can lag (OTEL ingestion delay up to ~10 minutes). - High-cardinality fields (id, traceId, userId, sessionId) must be filters, not dimensions.
| Name | Type | Req | Description |
|---|---|---|---|
| age | – | – | Minutes to look back from now (e.g. 1440 for 24h). Used when from_timestamp is omitted; defaults to 1440 (24h) when no time range is given. |
| dimensions | – | – | Optional fields to group results by, e.g. ['providedModelName']. Do NOT use high-cardinality fields (id, traceId, userId, sessionId) as dimensions — pass them as filters instead. |
| filters | – | – | Optional filter objects: {'column','operator','value','type', plus 'key' for metadata/object types}. Example: [{'column':'userId','operator':'=','value':'u1','type':'string'}]. See get_metrics_schema… |
| from_timestamp | – | – | ISO-8601 start of the time range. Overrides 'age' when provided. |
| metrics | array | yes | One or more metrics to compute. Each item is {'measure': <name>, 'aggregation': <fn>}, e.g. [{'measure': 'totalCost', 'aggregation': 'sum'}, {'measure': 'latency', 'aggregation': 'p95'}]. Aggregation… |
| order_by | – | – | Optional ordering: list of {'field': <dimension-or-metric>, 'direction': 'asc'|'desc'}. |
| output_mode | string | – | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized… |
| time_granularity | – | – | When set, results are bucketed by this granularity across the time range (time series). |
| to_timestamp | – | – | ISO-8601 end of the time range. Defaults to now (UTC). |
| view | string | yes | Data view to aggregate over: 'observations' (spans/generations/events — latency, cost, tokens, counts), 'scores-numeric' (numeric/boolean scores), or 'scores-categorical' (categorical scores). Call g… |
| Name | Type | Req | Description |
|---|---|---|---|
| result | – | yes | – |
No examples provided.
summarize_route_decisions ~171
Summarize generic route decisions for a trace, session, router, provider, or capability.
| Name | Type | Req | Description |
|---|---|---|---|
| age | integer | – | Number of minutes to look back (positive integer, max 7 days/10080 minutes) |
| capability_id | – | – | Optional route-decision metadata capability_id filter |
| limit | integer | – | Maximum number of route decisions to summarize from the current page |
| max_confidence | number | – | Confidence threshold used for low-confidence counts |
| page | integer | – | Page number for pagination (starts at 1) |
| provider | – | – | Optional route-decision metadata provider filter |
| router_name | – | – | Optional route-decision metadata router_name filter |
| session_id | – | – | Optional route-decision metadata session_id filter |
| trace_id | – | – | Optional Langfuse trace ID filter |
Structured output declared, but exposes no named fields.
No examples provided.
update_annotation_queue_item ~52
Update the status of an annotation queue item.
| Name | Type | Req | Description |
|---|---|---|---|
| item_id | string | yes | Annotation queue item ID |
| queue_id | string | yes | Annotation queue ID |
| status | string | yes | New status value |
Structured output declared, but exposes no named fields.
No examples provided.
update_prompt_labels ~117
Update labels for a specific prompt version. This is the only supported mutation for existing prompts. Provided labels are added to the version (existing labels are preserved). Labels are unique across versions, and the 'latest' label is managed by Langfuse.
| Name | Type | Req | Description |
|---|---|---|---|
| labels | array | yes | Labels to add to this version (can be empty to add none). Existing labels are preserved; labels are unique across versions. |
| name | string | yes | The name of the prompt to update |
| version | integer | yes | The prompt version to update |
Structured output declared, but exposes no named fields.
No examples provided.
How do I install the Langfuse MCP server?
Langfuse MCP runs locally as a PyPI package, launched with uvx langfuse-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
pypi · langfuse-mcp
claude mcp add avivsinai-langfuse-mcp -- uvx langfuse-mcp
What is the Langfuse MCP server?
Langfuse MCP is listed in the public MCP registry as io.github.avivsinai/langfuse-mcp. Langfuse MCP server for accessing and analyzing telemetry data via natural language. This page covers its PyPI package (langfuse-mcp).
Is the Langfuse MCP server safe to use?
Langfuse MCP scores 76 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 21 November 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the Langfuse MCP server expose?
Langfuse MCP exposes 48 tools: list_annotation_queues, create_annotation_queue, get_annotation_queue, list_annotation_queue_items, get_annotation_queue_item, and 43 more. Their descriptions and schemas cost roughly 8,755 tokens of context every time the server is loaded.
Is the Langfuse MCP server still maintained?
Langfuse MCP is still listed as active in the MCP registry. We last reached this channel on 21 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.
What licence is the Langfuse MCP server under?
Langfuse MCP declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.
What did VerifyMCP test on the Langfuse MCP server?
VerifyMCP ran 15 checks on Langfuse MCP, covering Known CVEs, Install scripts, Dependency health, Source repository and 11 more. One item could not be completed, a gap on our side rather than a finding about Langfuse MCP: Malware scan. Endpoint Security and Transport & Reachability do not apply to a PyPI package, so they were not tested. The score does not measure everything, and the scoring documentation lists what it leaves out.