langfuse-mcp
by avivsinai·★ 87·Score 48
Langfuse MCP server for AI agents to query trace data, debug exceptions, and manage observability.
Overview
The langfuse-mcp server provides comprehensive access to Langfuse observability data through the Model Context Protocol. It exposes 37 tools across multiple categories including traces, observations, sessions, exceptions, prompts, datasets, annotation queues, and scores. This allows AI agents to directly query production telemetry to answer critical questions about performance failures, user sessions, prompt versions, and dataset annotations. The server is actively maintained with recent commits and offers both read-only mode and selective tool loading for efficient token usage.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server if you need comprehensive access to Langfuse observability data including traces, sessions, exceptions, and dataset management, especially when the official server's limited functionality isn't sufficient.
When NOT to choose this
Don't choose this if you only need prompt management capabilities (covered by the official server), or if you're concerned about potential vendor lock-in with Langfuse-specific features.
Tools this server exposes
12 tools extracted from the READMEfetch_tracesFetch Langfuse trace data for debugging and analysis
fetch_traceGet details for a specific Langfuse trace
fetch_observationsRetrieve observations from Langfuse traces
find_exceptionsFind exceptions in Langfuse traces
get_session_detailsGet details for a specific Langfuse session
list_promptsList available prompts in Langfuse
get_promptRetrieve a specific prompt from Langfuse
list_datasetsList available datasets in Langfuse
create_dataset_itemCreate or update a dataset item in Langfuse
list_annotation_queuesList annotation queues in Langfuse
list_scores_v2List scores in Langfuse v2
get_data_schemaGet the data schema for Langfuse
Comparable tools
Installation
Installation
**Using Claude Desktop (via project .mcp.json)**
{
"mcpServers": {
"langfuse": {
"command": "uvx",
"args": ["langfuse-mcp"],
"env": {
"LANGFUSE_PUBLIC_KEY": "pk-...",
"LANGFUSE_SECRET_KEY": "sk-...",
"LANGFUSE_HOST": "https://cloud.langfuse.com"
}
}
}
}**Using CLI**
# Claude Code
code mcp add \
-e LANGFUSE_PUBLIC_KEY=pk-... \
-e LANGFUSE_SECRET_KEY=sk-... \
-e LANGFUSE_HOST=https://cloud.langfuse.com \
langfuse -- uvx langfuse-mcp
# Codex CLI
codex mcp add langfuse \
--env LANGFUSE_PUBLIC_KEY=pk-... \
--env LANGFUSE_SECRET_KEY=sk-... \
--env LANGFUSE_HOST=https://cloud.langfuse.com \
-- uvx langfuse-mcpFAQ
- How does this compare to the official Langfuse MCP server?
- This server provides a full observability toolkit including traces, observations, sessions, exceptions, prompts, datasets, annotation queues, and scores. The official MCP focuses only on prompt management, making this a more comprehensive solution for debugging and analyzing agent behavior.
- Can I limit the tools loaded to reduce token usage?
- Yes, use selective tool loading with `langfuse-mcp --tools traces,prompts` to load only specific tool groups. Available groups include traces, observations, sessions, exceptions, prompts, datasets, annotation_queues, scores, and schema.
Compare langfuse-mcp with
Last updated · Auto-generated from public README + GitHub signals.