# Langfuse Trace URL Extractor MCP for AI Agents AI Agent Connect

> Langfuse Trace URL Extractor automates the extraction of trace IDs and the construction of direct observability URLs from your Langfuse payloads, saving you from manual log parsing.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_mORUNaxsxJKt0DhLvO9C2dXdcem9Xgcsp3iXkEJx/ai-agent-connect
- **Tags:** langfuse, tracing, logs, debugging, ci-cd

## Description

Debugging LLM applications usually involves staring at massive, unreadable JSON blobs in your logs. You see a trace ID, but then you have to find the project ID and piece together a URL just to see what happened in your dashboard. It is a tedious loop of copy-pasting that breaks your focus. This MCP changes that by handling the heavy lifting of parsing those payloads for you. When you connect it via Vinkius, your agent can look at a raw log, grab the necessary identifiers, and hand you a clickable link to the Langfuse dashboard immediately. It turns a multi-step manual hunt into a single request, letting you jump straight from an error log to the visual trace.

## Tools

### extract_trace_identifiers
Pulls trace and project IDs out of raw JSON payloads so you do not have to hunt for them.

### validate_payload_schema
Checks if your JSON data actually contains the required fields before you try to process it.

### construct_langfuse_url
Generates a direct link to your Langfox Cloud dashboard for any specific trace.

## Prompt Examples

**Prompt:** 
```
Can you find the trace link in this log: {'id': 't-123', 'project_id': 'p-456'}?
```

**Response:** 
```
| Field | Value |
| :--- | :--- |
| **Trace ID** | `t-123` |
| **Project ID** | `p-456` |
| **Direct Link** | [View Trace in Langfuse](https://cloud.langfuse.com/project/p-456/traces/t-123) |
```

**Prompt:** 
```
Is this payload ready for Langfuse?
```

**Response:** 
```
**Payload Status:** ❌ Invalid

**Missing Fields:**
* `project_id`

Please ensure the JSON contains both the trace and project identifiers.
```

**Prompt:** 
```
Get the URL for trace abc in project xyz.
```

**Response:** 
```
The direct link to your trace is ready:

[https://cloud.langfuse.com/project/xyz/traces/abc](https://cloud.langfuse.com/project/xyz/traces/abc)
```

## Capabilities

### Generate direct dashboard links
Turns raw identifiers into clickable URLs for your Langfuse Cloud dashboard.

### Parse IDs from raw logs
Pulls trace and project IDs directly out of messy JSON payloads.

### Verify payload integrity
Checks that your incoming data contains all the required fields before processing.

### Automate error investigation
Allows your agent to navigate from a log entry to an observability trace in one step.

## Use Cases

### Found a broken trace in your logs?
Ask your agent to extract the ID and give you the link so you can see the error immediately.

### Checking if a new log format is compatible?
Use the validation tool to verify the schema against Langfuse requirements instantly.

### Automating error reports in CI/CD
Have your agent generate direct Langfuse links for every error found during automated testing.

### Auditing large batch processing runs
Quickly jump between different trace IDs extracted from massive JSON output files.

## Benefits

- Stop manually constructing URLs with construct_langfuse_url.
- Quickly find IDs using extract_trace_identifiers without manual searching.
- Ensure data integrity with validate_payload_schema before debugging.
- Reduce context switching between your terminal and the Langfuse dashboard.
- Speed up the entire debugging loop for LLM traces.

## How It Works

The bottom line is you stop hunting for links and start debugging traces.

1. Provide a raw JSON payload or log entry to your AI client.
2. The MCP extracts the specific trace and project identifiers from the data.
3. You receive a direct, clickable link to view the trace in Langfuse Cloud.

## Frequently Asked Questions

**How can I use Langfuse Trace URL Extractor to find errors faster?**
You can point your AI agent at any raw log file. The MCP will automatically pull the trace IDs and provide a clickable link that takes you straight to the error in Langfuse Cloud.

**Does Langfuse Trace URL Extractor work with other observability tools?**
This tool is specifically designed for Langfuse payloads. It will not work correctly with logs from other tracing platforms unless they use the same ID structure.

**Can Langfuse Trace URL Extractor help me validate my logs?**
Yes, it includes a tool to check if your JSON data contains all the required fields needed for successful tracing and observability.

**Do I need to manually set up anything for Langfuse Trace URL Extractor?**
No setup is required beyond connecting the MCP via Vinkius. Once connected, your agent can immediately start parsing your existing logs.

**Can this tool help me debug production LLM errors?**
Absolutely. It bridges the gap between seeing an error in your production logs and viewing the full execution trace in your dashboard.

**What does `extract_trace_identifiers` do?**
It parses a Langfuse payload JSON to extract the root `id` and `project_id` fields.

**How do I generate a clickable link?**
Use the `construct_langfuse_url` tool with the extracted trace ID and project ID.

**Can I verify if a payload is valid before processing?**
Yes, the `validate_payload_schema` tool checks for the presence of required keys.