Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Langfuse MCP

by avivsinaiversion 0.14.0i★ 113iRuns on your computerRepository ↗
Registry nameio.github.avivsinai/langfuse-mcp

How to install

What it does

Langfuse MCP server for accessing and analyzing telemetry data via natural language

  • Connects Runs on your computer
  • Account or key Needs LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY
  • Category Other

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity37/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score49/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: 61 (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Langfuse MCP. Follow https://mcp.popnx.com/i/avivsinai-langfuse-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Langfuse MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "langfuse": { "command": "uvx", "args": [ "langfuse-mcp" ], "env": { "LANGFUSE_PUBLIC_KEY": "your-value", "LANGFUSE_SECRET_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Langfuse MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Langfuse MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Langfuse MCP site ↗

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "langfuse": {
          "command": "uvx",
          "args": [
            "langfuse-mcp"
          ],
          "env": {
            "LANGFUSE_PUBLIC_KEY": "your-value",
            "LANGFUSE_SECRET_KEY": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Langfuse MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Langfuse MCP or shows a Langfuse MCP tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LANGFUSE_HOST Langfuse API base URL (Cloud or self-hosted) · default https://cloud.langfuse.com
  • LANGFUSE_MCP_READ_ONLY Set true to disable write tools · default false

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Langfuse MCP yet

Langfuse MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Langfuse MCP

  • You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Langfuse MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user langfuse --env LANGFUSE_PUBLIC_KEY=your-value --env LANGFUSE_SECRET_KEY=your-value -- uvx langfuse-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Langfuse MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Langfuse MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Langfuse MCP site ↗

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user langfuse --env LANGFUSE_PUBLIC_KEY=your-value --env LANGFUSE_SECRET_KEY=your-value -- uvx langfuse-mcp

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Langfuse MCP listed as connected

  6. Try it

    Use Langfuse MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Langfuse MCP or shows a Langfuse MCP tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LANGFUSE_HOST Langfuse API base URL (Cloud or self-hosted) · default https://cloud.langfuse.com
  • LANGFUSE_MCP_READ_ONLY Set true to disable write tools · default false

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Langfuse MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "langfuse": { "command": "uvx", "args": [ "langfuse-mcp" ], "env": { "LANGFUSE_PUBLIC_KEY": "your-value", "LANGFUSE_SECRET_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Langfuse MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Langfuse MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Langfuse MCP site ↗

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Langfuse MCP settings, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Langfuse MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Langfuse MCP or shows a Langfuse MCP tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LANGFUSE_HOST Langfuse API base URL (Cloud or self-hosted) · default https://cloud.langfuse.com
  • LANGFUSE_MCP_READ_ONLY Set true to disable write tools · default false

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Langfuse MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Langfuse MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "langfuse": { "type": "stdio", "command": "uvx", "args": [ "langfuse-mcp" ], "env": { "LANGFUSE_PUBLIC_KEY": "your-value", "LANGFUSE_SECRET_KEY": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Langfuse MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Langfuse MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Langfuse MCP site ↗

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Langfuse MCP settings, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Langfuse MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Langfuse MCP or shows a Langfuse MCP tool in the answer, you are connected

2 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • LANGFUSE_HOST Langfuse API base URL (Cloud or self-hosted) · default https://cloud.langfuse.com
  • LANGFUSE_MCP_READ_ONLY Set true to disable write tools · default false

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Langfuse MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user langfuse --env LANGFUSE_PUBLIC_KEY=your-value --env LANGFUSE_SECRET_KEY=your-value -- uvx langfuse-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "langfuse": {
      "command": "uvx",
      "args": [
        "langfuse-mcp"
      ],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "your-value",
        "LANGFUSE_SECRET_KEY": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "langfuse": {
      "command": "uvx",
      "args": [
        "langfuse-mcp"
      ],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "your-value",
        "LANGFUSE_SECRET_KEY": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "langfuse": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "langfuse-mcp"
      ],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "your-value",
        "LANGFUSE_SECRET_KEY": "your-value"
      }
    }
  }
}

Values you fill in

  • LANGFUSE_PUBLIC_KEY secret required env
    Langfuse public API key
  • LANGFUSE_SECRET_KEY secret required env
    Langfuse secret API key
  • LANGFUSE_HOST env
    Langfuse API base URL (Cloud or self-hosted)
  • LANGFUSE_MCP_READ_ONLY env
    Set true to disable write tools

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
2,822/wk
Connection
Runs on your computer
Latest versioni
0.14.0
Categoryi
Other
Published to registryi
Oct 25, 2026
Code last changedi
Nov 7, 2026
Maker
avivsinai
Packages
pypi: langfuse-mcp
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 18, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account avivsinai, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 11 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for langfuse-mcp@0.14.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/avivsinai-langfuse-mcp.svg)](https://mcp.popnx.com/en/servers/avivsinai-langfuse-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 99% of the other 20575 servers in this category
  • Published to the registry more recently than 64% of the other 20575 servers in this category
  • Basic checks equal to or better than 99% of the other 20575 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Langfuse MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 11 days ago, and the latest version (0.14.0) reached the registry 24 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

by koala73Widely used★ 90.8KUpdated 2 days ago

Runs in the cloud✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 2 months ago

Runs in the cloud✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 29 days ago

Runs in the cloud✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Runs in the cloudRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Runs in the cloud✓ service owner · jitsu.com
Compared with similar ones
This one
Langfuse MCP
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/41/44/4
LicenseMITAGPL-3.0AGPL-3.0MITApache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

Langfuse MCP Server

Usage: 12,518 PyPI downloads last month (pypistats, 2026-08-19). v0.10.1.

Local MCP server and skill for Langfuse. Debug traces, sessions, and exceptions from Claude Code, Codex, Cursor, or any MCP client.

Why this instead of native Langfuse MCP?

Use this for local debug: first-class traces, sessions, and exceptions; route-decision tools; compact / file-dump output; plus the included langfuse skill.

Use official Langfuse MCP for hosted, zero-install access to the broader API (score writes, comments, models, media).

As of June 2026:

| | langfuse-mcp | Native Langfuse MCP | |-|--------------|---------------------| | Primary fit | Local debug: traces, sessions, exceptions | Hosted, zero-install API surface | | Deployment | Local stdio or HTTP, via the Langfuse Python SDK | Native streamable HTTP at /api/public/mcp | | Trace / session / exception tools | First-class | Observation/API-oriented access | | Route-decision tools | Yes | No | | Token & output control | Compact summaries, truncation, file-dump mode, tool-group gating | Hosted tool response + client | | Metrics & dataset runs | Yes | Yes | | Prompt, dataset, queue & score reads | Yes | Yes | | Score writes, comments, models, media | No | Yes |

langfuse-mcp for local debug. Native MCP for hosted breadth.

See a failing trace in 2 minutes

Install is uvx langfuse-mcp plus Langfuse API keys — Quick Start for Claude Code, Codex, Cursor, or Docker.

After the client restarts, ask:

find exceptions in the last day

That maps to existing tools:

find_exceptions(age=1440, group_by="file")

find_exceptions_in_file(filepath=" ", age=1440) get_exception_details(trace_id=" ")

find_exceptions returns {group, count, observation_id, trace_id} (top 50 groups) — each group carries a representative observation/trace ID, and find_exceptions_in_file also yields full error records. Then optionally:

fetch_trace(trace_id="<trace_id>", include_observations=true)

The exception tools detect errors by observation level == "ERROR" (strict; a non-empty status_message alone does not count). Counts describe error-level observations, not individual exception events — get_error_count.exception_count is the same error-observation total reported by find_exceptions.metadata.observation_count (including groups beyond the top 50). Exception details come from recorded metadata (exception.type / exception.message / exception.stacktrace, top-level or under metadata.attributes); absent values are null. Results are not a point-in-time snapshot.

Project Links

  • Quick Start
  • Agent Skill
  • Tools
  • Selective Tool Loading
  • Read-Only Mode
  • Other Clients

Quick Start

Requires uv (for uvx) and Python 3.10 or newer. CI verifies Python 3.10 through 3.14.

Get credentials from Langfuse Cloud → Settings → API Keys. If self-hosted, use your instance URL for LANGFUSE_HOST.

# Claude Code (project-scoped, shared via .mcp.json)

claude mcp add \ -e LANGFUSE_PUBLIC_KEY=pk-... \ -e LANGFUSE_SECRET_KEY=sk-... \ -e LANGFUSE_HOST=https://cloud.langfuse.com \ --scope project \ langfuse -- uvx langfuse-mcp

Codex CLI (user-scoped, stored in ~/.codex/config.toml)

codex mcp add langfuse \ --env LANGFUSE_PUBLIC_KEY=pk-... \ --env LANGFUSE_SECRET_KEY=sk-... \ --env LANGFUSE_HOST=https://cloud.langfuse.com \ -- uvx langfuse-mcp

To pin a CI-verified interpreter explicitly, add --python 3.14 before langfuse-mcp.

Restart your CLI, then verify with /mcp (Claude Code) or codex mcp list (Codex).

Agent Skill

This repo ships a first-party langfuse skill for Claude Code and Codex. The skill gives agents concrete playbooks for trace debugging, exception triage, latency analysis, prompt management, and dataset work.

Install it when you want the agent to know when to reach for Langfuse and which MCP tools to call first.

Via [skills](https://github.com/vercel-labs/add-skill) (recommended):

npx skills add avivsinai/langfuse-mcp -g -y

Via [skild](https://skild.sh):

npx skild install @avivsinai/langfuse -t claude -y

Manual install:

cp -r skills/langfuse ~/.claude/skills/   # Claude Code

cp -r skills/langfuse ~/.codex/skills/ # Codex CLI

After installing the skill, try:

help me debug langfuse traces

find exceptions in the last day why was this user's session slow?

The MCP server provides the tools; the skill provides the agent-facing workflow. See skills/langfuse/SKILL.md, skills/langfuse/references/setup.md, and skills/langfuse/references/tool-reference.md.

Tools (48 total)

CategoryTools
Tracesfetch_traces, fetch_trace
Observationsfetch_observations, fetch_observation
Routingfind_route_decisions, get_route_decision, summarize_route_decisions, find_low_confidence_route_decisions
Sessionsfetch_sessions, get_session_details, get_user_sessions
Exceptionsfind_exceptions, find_exceptions_in_file, get_exception_details, get_error_count
Promptslist_prompts, get_prompt, get_prompt_unresolved, create_text_prompt, create_chat_prompt, update_prompt_labels
Datasetslist_datasets, get_dataset, list_dataset_items, get_dataset_item, create_dataset, create_dataset_item, delete_dataset_item, list_dataset_runs, get_dataset_run, list_dataset_run_items, create_dataset_run_item, delete_dataset_run
Annotation Queueslist_annotation_queues, create_annotation_queue, get_annotation_queue, list_annotation_queue_items, get_annotation_queue_item, create_annotation_queue_item, update_annotation_queue_item, delete_annotation_queue_item, create_annotation_queue_assignment, delete_annotation_queue_assignment
Scoreslist_scores_v2, get_score_v2
Metricsquery_metrics, get_metrics_schema
Schemaget_data_schema

On Observations API v2, traces are built from root observations. fetch_traces omits traces without a root observation, and fetch_trace cannot find traces with no observations.

Dataset-run reads use the experiments API when the installed Langfuse SDK exposes it (Python SDK 4.13.1+). The older routes remain a fallback for self-hosted servers that do not serve experiments. delete_dataset_run uses the legacy delete route while it works; after that route is removed, it deletes the run's traces only when you pass delete_traces=True. Trace deletion also removes observations and related scores. create_dataset_run_item still uses the legacy link API; when that API is gone, create experiment data through the SDK experiment runner or OTel ingestion.

Dataset Item Updates (Upsert)

Langfuse uses upsert for dataset items. To edit an existing item, call create_dataset_item with item_id. If the ID exists, it updates; otherwise it creates a new item.

create_dataset_item(dataset_name="qa-test-cases", item_id="item_123", input={"question": "What is 2+2?"}, expected_output={"answer": "4"})

Metrics Queries

query_metrics aggregates telemetry server-side (cost, latency, tokens, counts, score values) so agents can answer "what did inference cost?" or "what's p95 latency by model?" without pulling raw traces. Call get_metrics_schema for the full view/dimension/measure catalog.

query_metrics(

view="observations", metrics=[{"measure": "totalCost", "aggregation": "sum"}, {"measure": "latency", "aggregation": "p95"}], dimensions=["providedModelName"], age=1440, # last 24h; or pass from_timestamp / to_timestamp )

High-cardinality fields (id, traceId, userId, sessionId) must be used in filters, not dimensions. The v2 metrics endpoint is Langfuse Cloud-only; self-hosted instances may return 404.

Selective Tool Loading

Load only the tool groups you need to reduce token overhead:

langfuse-mcp --tools traces,prompts

Available groups: traces, observations, routing, sessions, exceptions, prompts, datasets, annotation_queues, scores, metrics, schema

The routing group is router-neutral. It reads Langfuse span observations with metadata.schema_version: "mcp.route_decision.v1" and filters on route-decision fields stored in observation metadata, such as decision_id, router_name, provider, and capability_id.

Read-Only Mode

Disable all write operations for safer read-only access:

langfuse-mcp --read-only

Or via environment variable

LANGFUSE_MCP_READ_ONLY=true langfuse-mcp

This disables: create_text_prompt, create_chat_prompt, update_prompt_labels, create_dataset, create_dataset_item, delete_dataset_item, create_dataset_run_item, delete_dataset_run, create_annotation_queue, create_annotation_queue_item, update_annotation_queue_item, delete_annotation_queue_item, create_annotation_queue_assignment, delete_annotation_queue_assignment

Default Output Mode

Set the MCP-exposed default output_mode so clients that omit the parameter automatically use your preferred mode:

langfuse-mcp --default-output-mode full_json_file

Or via environment variable

LANGFUSE_MCP_DEFAULT_OUTPUT_MODE=full_json_file langfuse-mcp

Supported values: compact, full_json_string, full_json_file

This updates the default shown in MCP tool schemas. Clients can still override it per call by passing output_mode explicitly.

Other Clients

Cursor

Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global):

{

"mcpServers": { "langfuse": { "command": "uvx", "args": ["langfuse-mcp"], "env": { "LANGFUSE_PUBLIC_KEY": "pk-...", "LANGFUSE_SECRET_KEY": "sk-...", "LANGFUSE_HOST": "https://cloud.langfuse.com", "LANGFUSE_MCP_DEFAULT_OUTPUT_MODE": "full_json_file" } } } }

Docker (single project)
docker run --rm -i \

-e LANGFUSE_PUBLIC_KEY=pk-... \ -e LANGFUSE_SECRET_KEY=sk-... \ -e LANGFUSE_HOST=https://cloud.langfuse.com \ ghcr.io/avivsinai/langfuse-mcp:latest

Multiple projects with profiles (stdio)

For local clients (Claude Code, Codex, Cursor), keep the credentials of each Langfuse project in a profiles file and register one MCP server per project. Each server starts with --profile .

The file is TOML at $XDG_CONFIG_HOME/langfuse-mcp/profiles.toml (or `~/.config/langfuse-mc

Only the beginning is shown; read the rest in the repo