Langfuse Mcp MCP Server

An MCP server that exposes the Langfuse REST API as tools, so Claude (or any MCP client) can query your traces, observations, sessions, scores, prompts, datasets, and metrics during a conversation.

Local serverstdioMIT

What is the Langfuse Mcp Server?

Langfuse Mcp is an MCP project maintained in the hugoles/langfuse-mcp repository. The maintainer describes its purpose as “An MCP server that exposes the Langfuse REST API as tools, so Claude (or any MCP client) can query your traces, observations, sessions, scores, prompts…”. Read the project documentation for the complete scope.

Installation

The documented npm package is langfuse-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URL. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
listTracesList traces with filters. Returns summary metadata.
getTraceFetch a single trace by id including the full observation tree.
listObservationsList spans, generations, and events with filters.
getObservationFetch a single observation by id.
listSessionsList sessions within a time range.
getSessionFetch a session by id, including its traces.
listScoresList scores with filters.
getScoreFetch a single score by id.
listScoreConfigsList score configurations (definitions, ranges, categories).
getScoreConfigFetch a score configuration by id.
listPromptsList prompt definitions, optionally filtered by name, label, or tag.
getPromptFetch a prompt by name, optionally pinned to a specific version or label.
listDatasetsList datasets configured in Langfuse.
getDatasetFetch a dataset by name.
listDatasetItemsList items in a dataset (inputs, expected outputs, metadata).
getDatasetItemFetch a single dataset item by id.
listDatasetRunsList evaluation runs for a dataset.
getDatasetRunFetch a specific dataset run by name.
getMetricsRun a custom metrics query (counts, latency, cost, token usage). Pass a JSON query string.
getDailyMetricsDaily aggregated usage / cost / count metrics.
listModelsList models known to Langfuse (for cost / token attribution).
getModelFetch a model definition by id.
listProjectsList projects accessible to the current API key.
listCommentsList comments attached to traces, observations, sessions, or prompts.
getCommentFetch a single comment by id.
getMediaFetch metadata for a media attachment (image, audio, file).
getHealthPing the Langfuse public health endpoint — useful for credential validation.

How to install the Langfuse Mcp Server

{
  "mcpServers": {
    "langfuse": {
      "command": "npx",
      "args": [
        "-y",
        "langfuse-mcp"
      ],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "YOUR_LANGFUSE_PUBLIC_KEY",
        "LANGFUSE_SECRET_KEY": "YOUR_LANGFUSE_SECRET_KEY",
        "LANGFUSE_BASE_URL": "https://cloud.langfuse.com"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
LANGFUSE_PUBLIC_KEYDeclared in the maintainer’s client configuration.Yes
LANGFUSE_SECRET_KEYDeclared in the maintainer’s client configuration.Yes
LANGFUSE_BASE_URLDeclared in the maintainer’s client configuration.Yes