Skip to content

Summary

Langfuse's own MCP server for LLM observability — read traces and observations, manage prompt versions, run datasets and evaluators, and query cost and latency metrics from inside your agent.

Features

  • Query traces and observations with schema and filter discovery built in
  • Create and label prompt versions without leaving the agent
  • Datasets, experiments, evaluators and evaluation rules
  • queryMetrics for cost, latency and usage analysis
  • Regional cloud endpoints plus self-hosted, authenticated with project-scoped keys

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "Langfuse" tools will be available.
{
  "mcpServers": {
    "langfuse": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://cloud.langfuse.com/api/public/mcp",
        "--header",
        "Authorization: Basic ${LANGFUSE_BASIC_TOKEN}"
      ],
      "env": {
        "LANGFUSE_BASIC_TOKEN": "base64(public-key:secret-key)"
      }
    }
  }
}

Description

Langfuse is an open-source platform for tracing, evaluating and improving LLM applications. Its MCP server puts that whole surface behind an agent, which changes the debugging loop: instead of switching to a dashboard to find out why last night's run went wrong, the agent queries the traces itself, forms a hypothesis, and can write the fix back as a new prompt version.

What it exposes
  • Traces and observations — listObservations, getObservation, plus schema-discovery tools (getObservationFieldSchema, getObservationFilterSchema, getObservationFilterValues) so an agent can work out what is filterable before it filters.
  • Prompt management — getPrompt, listPrompts, createTextPrompt, createChatPrompt, updatePromptLabels, and getPromptUnresolved for the raw content before dependency resolution.
  • Datasets and experiments — upsert datasets and items, create dataset run items, list and inspect runs.
  • Evaluation — listEvaluators, upsertEvaluator, and evaluation rules that attach an LLM judge or code evaluator to incoming observations.
  • Scores and score configs — record and query quality signals with typed definitions.
  • Metrics and models — queryMetrics for usage, cost, latency and performance; custom model definitions for cost tracking.
  • Annotation queues, comments, dashboards and alerts — the human-review and reporting side of the platform.
Connecting

Remote, region-scoped endpoints: https://cloud.langfuse.com/api/public/mcp (EU), https://us.cloud.langfuse.com/api/public/mcp (US), https://jp.cloud.langfuse.com/api/public/mcp (Japan), https://hipaa.cloud.langfuse.com/api/public/mcp (HIPAA US), or https://your-domain.com/api/public/mcp if you self-host. Authentication is Basic auth with a base64-encoded project-scoped public/secret key pair.

Langfuse also runs a separate documentation MCP with searchLangfuseDocs, getLangfuseDocsPage and getLangfuseOverview.

Worth knowing

Write tools are enabled by default, so an agent can create prompts, scores, evaluators and dashboards — not just read them. Scope the API key to the project you want touched, and treat prompt-version writes as production changes.

Related MCP Servers

New

Official MCP server for the Mux video API, built on a code-execution scheme: the agent writes TypeScript against the SDK and runs it in a Deno sandbox.

MCP: ripwire

by Red Hat

New

Red Hat's zero-dependency C++23 code-context engine — ranked call graphs and blast-radius analysis, indexing a repo in under half a second with no server and no database.

MCP: Graft

by Trail

New

Builds a searchable markdown graph of your repo so coding agents stop re-exploring it on every task — reported 42% fewer tokens and 46% fewer tool calls.

New

Expo's official remote MCP server — searches Expo docs, installs compatible SDK packages, triggers and monitors EAS builds, and drives iOS/Android simulators.

Browse all MCP servers →