Langfuse

v1.0.0Monitoring & Observabilitystable

MCP server for Langfuse observability. Query traces, debug exceptions, analyze sessions, and manage prompts and datasets for your LLM applications.

agent-skillsai-agentsclaude-codecodexdeveloper-tools
Share:
89
Stars
0
Downloads
0
Weekly
0/5

What is Langfuse?

Langfuse is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for langfuse observability. query traces, debug exceptions, analyze sessions, and manage prompts and datasets for your llm applications.

MCP server for Langfuse observability. Query traces, debug exceptions, analyze sessions, and manage prompts and datasets for your LLM applications.

This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server for Langfuse observability. Query traces, debug e

Use Cases

LLM application observability and tracing
Session debugging and analysis
Prompt and dataset management
avivsinai

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx langfuse

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Langfuse

The Langfuse MCP server connects AI coding assistants to your Langfuse observability platform, exposing 48 tools that let you query traces, debug exceptions, analyze user sessions, manage prompts, and inspect datasets — all from within Claude or another AI client. Instead of switching to the Langfuse web UI, you can ask natural language questions about your LLM application's behavior and get structured answers sourced directly from your observability data. This server is particularly valuable for developers who want to debug production AI applications or iterate on prompts without leaving their coding environment.

Prerequisites

  • A Langfuse account at cloud.langfuse.com or a self-hosted Langfuse instance
  • Langfuse public key (LANGFUSE_PUBLIC_KEY) and secret key (LANGFUSE_SECRET_KEY) from your project settings
  • Python 3.9+ with uvx available (install with pip install uv)
  • An MCP client such as Claude Desktop, Claude Code, or Cursor
1

Obtain Langfuse API keys

Log in to cloud.langfuse.com, navigate to your project's Settings > API Keys, and copy your public key (starts with pk-) and secret key (starts with sk-).

2

Add the server to Claude Code

Use the Claude Code CLI to register the Langfuse MCP server with your project, passing credentials as environment variables. uvx will automatically download and run langfuse-mcp.

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

Or configure Claude Desktop manually

Add the server to your Claude Desktop configuration file with your Langfuse credentials.

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

Optionally limit loaded tools

If you only need a subset of the 48 available tools, pass the --tools flag to reduce startup time and token usage.

uvx langfuse-mcp --tools traces,prompts,exceptions
5

Enable read-only mode for production safety

When connecting to a production Langfuse project, use read-only mode to prevent accidental data mutations.

uvx langfuse-mcp --read-only

Langfuse Examples

Client configuration

Claude Desktop configuration connecting to the Langfuse cloud with a 14-day data lookback window.

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

Prompts to try

Example natural language prompts to use with Claude once the Langfuse MCP server is active.

- "Find all exceptions that occurred in the last 24 hours and group them by error type"
- "Why was this user's session slow? Fetch session details for session ID abc-123"
- "Fetch the 10 most recent traces and summarize their latency and token usage"
- "List all prompts in my Langfuse project and show their current versions"
- "Query metrics for the past week — what is my average cost per trace?"

Troubleshooting Langfuse

Authentication error: 401 Unauthorized

Double-check that LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY are correct and belong to the same Langfuse project. Keys from different projects or environments will not work together.

No traces returned even though data exists

The default lookback window is 7 days. Set LANGFUSE_MAX_AGE_DAYS to a larger value (e.g., 30) if you need to query older data.

uvx command not found

Install uv with pip install uv or curl -LsSf https://astral.sh/uv/install.sh | sh, then verify uvx is in your PATH by running uvx --version.

Frequently Asked Questions about Langfuse

What is Langfuse?

Langfuse is a Model Context Protocol (MCP) server that mcp server for langfuse observability. query traces, debug exceptions, analyze sessions, and manage prompts and datasets for your llm applications. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Langfuse?

Follow the installation instructions on the Langfuse GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Langfuse?

Langfuse works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Langfuse free to use?

Yes, Langfuse is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Monitoring & Observability MCP Servers

Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "langfuse": { "command": "npx", "args": ["-y", "langfuse"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Langfuse?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides