Langfuse
MCP server for Langfuse observability. Query traces, debug exceptions, analyze sessions, and manage prompts and datasets for your LLM applications.
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
Maintainer
Works with
Installation
Manual Installation
npx langfuseConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-).
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-mcpOr 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"
}
}
}
}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,exceptionsEnable 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-onlyLangfuse 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.
Langfuse Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to Langfuse? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
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.
Set Up Langfuse in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.