What it does
Langfuse-mcp exposes Langfuse observability data—traces, observations, sessions, exceptions, prompts, datasets, and annotation queues—as Claude-callable tools. The server provides 37 tools grouped into nine categories, from basic trace queries and exception tracking to prompt management and dataset curation. Each tool returns structured data you can analyze, and you can selectively load only the tool groups you need via the --tools flag to keep token overhead minimal.
Who it's for
Backend engineers debugging production LLM applications, observability engineers triaging multi-tenant failures, and AI teams iterating on prompt templates and evaluation datasets. Anyone instrumenting applications with Langfuse for tracing and observability can query that data directly from Claude Code, without context switching to the Langfuse dashboard.
Common use cases
- Query traces and observations to understand why a specific LLM call produced an unexpected output
- Analyze session data across users to identify patterns in model behavior and common failure modes
- Create or update prompt templates and manage test datasets without leaving Claude
- Review exception logs and error counts to prioritize which components need refactoring
- Upsert dataset items to maintain test suites and continuous evaluation workflows
Setup pitfalls
- Requires
LANGFUSE_PUBLIC_KEYandLANGFUSE_SECRET_KEYenvironment variables; the connection fails silently without valid credentials - For self-hosted Langfuse, must set
LANGFUSE_HOSTto your instance URL; defaults to cloud.langfuse.com if omitted - No CI verification is published; verify the server against your own Langfuse instance before relying on it in production
- Write operations are enabled by default; use the
--read-onlyflag to disable dataset, prompt, and queue mutations if safer read-only access is required