Skip to main content
MCP server CX Codex

Langfuse MCP — Claude Code MCP server: what it does, how to install

Connects Langfuse telemetry to coding assistants to inspect traces, user sessions, and runtime errors. Useful for debugging AI workflows from your terminal.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env LANGFUSE_PUBLIC_KEY=<LANGFUSE_PUBLIC_KEY> --env LANGFUSE_SECRET_KEY=<LANGFUSE_SECRET_KEY> --env LANGFUSE_HOST=<LANGFUSE_HOST> --env LANGFUSE_MCP_READ_ONLY=<LANGFUSE_MCP_READ_ONLY> --transport stdio langfuse-mcp -- uvx langfuse-mcp
Open on GitHub

What Langfuse MCP does

The server supplies 48 tools focused on reading traces, observations, user sessions, and routing decisions. It aims at local troubleshooting rather than broad API coverage. Unlike the hosted official server, it includes route-decision analysis and compact output modes. It cannot write scores or manage comments.

Error tracking inspects observation entries with a strict level == "ERROR" filter. A text message alone will not trigger it. Results group failures by file or category, returning up to 50 groups alongside representative trace IDs.

Running this tool requires uvx and Python between 3.10 and 3.14. You must pass valid API credentials via LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY on startup.

What it helps with

  • locate recent errors in execution traces grouped by file
  • inspect slow user sessions and identify high latency points
  • review low-confidence model routing decisions
  • pull prompt definitions and dataset run items into the workspace

Example prompts for the agent

  • find exceptions in the last day
  • fetch trace details for this trace ID and include observations
  • why was this user session slow?

How to install Langfuse MCP

Platform CLI

claude mcp add --env LANGFUSE_PUBLIC_KEY=<LANGFUSE_PUBLIC_KEY> --env LANGFUSE_SECRET_KEY=<LANGFUSE_SECRET_KEY> --env LANGFUSE_HOST=<LANGFUSE_HOST> --env LANGFUSE_MCP_READ_ONLY=<LANGFUSE_MCP_READ_ONLY> --transport stdio langfuse-mcp -- uvx langfuse-mcp

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from langfuse-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Langfuse MCP

How to install Langfuse MCP in Claude Code?

Run claude mcp add langfuse-mcp -e LANGFUSE_PUBLIC_KEY=<LANGFUSE_PUBLIC_KEY> -e LANGFUSE_SECRET_KEY=<LANGFUSE_SECRET_KEY> -- uvx langfuse-mcp with your project credentials. Restart your CLI session and run /mcp to confirm the connection.

What does Langfuse MCP do?

It exposes 48 tools for exploring Langfuse traces, sessions, errors, and routing choices through local MCP clients. It allows your assistant to query telemetry without opening the web dashboard.

How does it differ from the official hosted Langfuse MCP?

This local server focuses on debugging execution traces, sessions, and route decisions via stdio. It does not support score writing or comments, which require the official hosted endpoint.

Similar MCP servers

All MCP servers for AI and ML →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor