Langfuse MCP server

OfficialLangfuseConfig last verified Jun 1, 2026

Langfuse's official hosted MCP server: manage prompts, query traces and observations, run evals, and inspect LLM metrics from your agent.

The Langfuse MCP server is Langfuse's official integration for its open-source LLM engineering platform. Langfuse is where teams version prompts, trace LLM application runs, score outputs, and analyze cost and latency. This server exposes that whole surface to a coding agent so it can fetch and compile a production prompt, list and search observations to debug a failing trace, manage datasets and evaluation runs, create scores, and query usage and cost metrics — all inside its tool-calling loop instead of through the web UI.

The canonical deployment is the hosted server built directly into Langfuse at /api/public/mcp, using the streamable HTTP transport with no build step. The endpoint is region-specific — https://cloud.langfuse.com/api/public/mcp for the EU data region, https://us.cloud.langfuse.com/api/public/mcp for the US region, or your own domain when self-hosting. Authentication uses your project-scoped public and secret API keys sent as HTTP Basic Auth in the Authorization header, so each connection is scoped to a single Langfuse project. Both read and write tools are enabled by default, covering prompt management, observations, annotation queues, comments, datasets, scores and score configs, analytics, model definitions, and utility health and media tools.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "langfuse": {
      "type": "http",
      "url": "https://cloud.langfuse.com/api/public/mcp",
      "headers": {
        "Authorization": "Bearer <LANGFUSE_AUTH_HEADER>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp

Available tools

ToolDescription
getPromptRetrieve a prompt by name, with an optional label or version, compiled and ready to use.
getPromptUnresolvedFetch a prompt without resolving dependencies, returning its raw template.
listPromptsList and filter prompts with their metadata.
createTextPromptCreate a new text prompt version.
createChatPromptCreate a new chat prompt version with OpenAI-style messages.
updatePromptLabelsUpdate the labels for a prompt version.
listObservationsFind observations such as generations, spans, and events with filtering.
getObservationRetrieve a single observation by ID.
getObservationFieldSchemaShow the available fields on an observation.
getObservationFilterSchemaShow the filterable fields and the operators available for filtering observations.
getObservationFilterValuesList the available values for a given observation filter field.
listAnnotationQueuesList the annotation worklists in the project.
createAnnotationQueueCreate a new annotation queue.
getAnnotationQueueRetrieve an annotation queue by ID.
listAnnotationQueueItemsList the items in an annotation queue with their status.
getAnnotationQueueItemGet a single annotation queue item.
createAnnotationQueueItemAdd an item to an annotation queue.
updateAnnotationQueueItemUpdate an annotation queue item's review status.
deleteAnnotationQueueItemRemove an item from an annotation queue.
createAnnotationQueueAssignmentAssign a user to an annotation queue.
deleteAnnotationQueueAssignmentUnassign a user from an annotation queue.
createCommentCreate a comment on a trace, observation, session, or prompt.
listCommentsList comments with optional filters.
getCommentRetrieve a comment by ID.
upsertDatasetCreate or update a dataset.
listDatasetsList datasets with pagination.
getDatasetRetrieve a dataset by ID.
upsertDatasetItemCreate or update a dataset example item.
listDatasetItemsList the items in a dataset.
getDatasetItemRetrieve a dataset item by ID.
deleteDatasetItemDelete a dataset item and its run items.
createDatasetRunItemLink a dataset item to a trace or observation within a run.
listDatasetRunItemsList the run items (results) of a dataset run.
listDatasetRunsList the experiment and evaluation runs for a dataset.
getDatasetRunRetrieve a dataset run and its items.
deleteDatasetRunDelete a dataset run and enqueue deletion of its run items.
listScoresFind quality and feedback scores.
getScoreRetrieve a score by ID.
createScoreCreate a score (with eventual consistency).
listScoreConfigsList score configuration templates.
getScoreConfigRetrieve a score config by ID.
createScoreConfigCreate a numeric, categorical, boolean, or text score config.
updateScoreConfigModify a score config's settings.
deleteScoreConfigArchive a score config.
queryMetricsAnalyze usage, costs, latency, and scores aggregated by dimensions.
getMetricsSchemaDiscover the queryable metrics and aggregations available.
listModelsList the model definitions used for cost and token accounting.
createModelCreate a custom model definition for cost and tokenization.
getModelRetrieve a model definition by ID.
deleteModelRemove a custom model definition.
getHealthCheck the API health and database availability.
getMediaFetch a media asset's metadata and download URL.

Required configuration

  • LANGFUSE_AUTH_HEADERRequired

    HTTP Basic Auth header value 'Basic <base64(publicKey:secretKey)>' built from your project-scoped Langfuse public and secret keys. Required.

What you can do with it

Manage prompts without leaving the editor

The agent fetches the production version of a prompt with getPrompt, iterates on it, and ships a new version via createTextPrompt or createChatPrompt — keeping prompt history versioned in Langfuse while you stay in your coding tool.

Debug traces and analyze cost

When an LLM feature misbehaves, the agent uses listObservations and getObservation to inspect generations and spans, creates a score on the bad output, and runs queryMetrics to see how cost and latency trend across the project.

FAQ

Is it free?
Langfuse is open source (MIT) and free to self-host, and Langfuse Cloud has a free tier; the MCP server is built into Langfuse at no extra cost. You authenticate with your existing project API keys, and any paid usage follows your Langfuse plan.
Does it support remote/OAuth?
It is a hosted remote server over streamable HTTP at /api/public/mcp on your region's Langfuse host (EU, US, or self-hosted). Authentication is HTTP Basic Auth using your project's public and secret keys in the Authorization header rather than OAuth, which scopes each connection to one project.
← Browse all ai-ml servers