> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Langfuse

> Give the Sazabi agent tools to inspect LLM traces, observations, metrics, scores, comments, and prompts from your Langfuse project.

[All Langfuse integration capabilities](https://docs.sazabi.com/catalogs/integrations/langfuse)

## About

Langfuse is an MCP connector that gives the Sazabi agent tools to inspect LLM traces, observations, metrics, scores, comments, and prompts. Langfuse hosts an MCP server over Streamable HTTP at `/api/public/mcp`, region-scoped by Langfuse Cloud host — US (`https://us.cloud.langfuse.com`), EU (`https://cloud.langfuse.com`), or JP (`https://jp.cloud.langfuse.com`). Sazabi authenticates using HTTP Basic Auth built from a Langfuse project API key pair (`pk-lf-...` / `sk-lf-...`), stored securely and sent in the `Authorization` header.

**What the agent can do:**

* Query traces and observations to investigate LLM application behavior
* Retrieve metrics, scores, and evaluation results
* Read comments attached to traces and observations
* Fetch managed prompts from Prompt Management
* Scope the connection to your Langfuse Cloud region (US, EU, or JP)

## Prerequisites

* A Langfuse Cloud account (or self-hosted deployment via the custom connector)
* A Langfuse project API key pair (Public `pk-lf-...` and Secret `sk-lf-...`) from **Project settings > API keys**

## Set up in the dashboard

Configure connectors in the dashboard under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 1**

### Open the connector

Find Langfuse in [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 2**

### Add your key

Select your Langfuse Cloud region (US, EU, or JP). In Langfuse, open **Project settings > API keys** and create a new key pair. Base64-encode `publicKey:secretKey` and enter it as `Basic <encoded>`. Sazabi sends this value as the `Authorization` header to Langfuse's hosted MCP endpoint.

## Set up with the CLI

Langfuse authenticates with Langfuse project API keys. With the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) installed and authenticated (see [`sazabi mcp-connectors` reference](https://docs.sazabi.com/reference/cli/mcp-connectors)), connect it in one command, passing the credential as a header:

```bash theme={"system"}
sazabi mcp-connectors connect langfuse --header "Authorization=Basic <encoded>"
```

The CLI connects to the MCP server at once and prints the connection with the tools it discovered; a credential the server rejects is reported, and the connection is left needing attention. Use `NAME=@<file>` to read a value from a file, or `--header-file <file.json>` for a JSON object of header names and values. To rotate the stored credentials later, use `sazabi mcp-connectors update-credentials <connection-id>`; find the connection ID with `sazabi mcp-connectors list`.

## Verify

Open the connector's connection page under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors) and confirm Sazabi lists the tools it discovered. Then, in a thread, ask the agent to use one of those tools and confirm it runs. If no tools appear, confirm the connection is authorized (OAuth) or the key/header is correct (token auth).

## Troubleshooting

**No tools discovered** — Confirm the `Authorization` value is correctly formatted as `Basic <base64(pk-lf-...:sk-lf-...)>` and that you selected the correct region; re-enter from [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Connection shows needs attention** — The authorization or key may have expired or been revoked; reconnect from [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

## Further reading

> [card] [Agent tools](https://docs.sazabi.com/guides/investigate/agent-tools.md)
>
> How the agent uses connector tools.

> [card] [MCP connectors](https://docs.sazabi.com/catalogs/mcp-connectors.md)
>
> Browse the connector catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.