Langfuse MCP Server
Official project-scoped MCP access to Langfuse prompts, observability, evaluation, and analytics data with read and write tools.
- Skill Road
- Langfuse MCP Server
Categories
Description
The Langfuse MCP Server is Langfuse’s official authenticated Model Context Protocol server for its data platform. It connects an MCP-capable AI client to exactly one Langfuse project. Teams can therefore inspect and, depending on the tool, change prompt-management objects, traces and observations, scores, datasets, experiments, metrics, and further observability artifacts within a controlled project context. The official product documentation is this entry’s primary link. It explicitly distinguishes this server from the public, unauthenticated Langfuse Docs MCP at https://langfuse.com/api/mcp, which only searches and retrieves documentation. The GitHub repository langfuse/mcp-server-langfuse is also intentionally not set as this record’s repository link: its README calls it a Prompt Management MCP Server for prompt discovery and retrieval. It is a separate, MIT-licensed older prompt-management project, not the selected current data-platform server distribution. Its 174 GitHub stars, queried from the API on 2026-09-08, are consequently neither stored as this entry’s metric nor used as its license.
Prompts, observations, and project analysis
The canonical MCP Reference lists getPrompt, getPromptUnresolved, and listPrompts for prompts. Those tools can inspect resolved or raw prompt dependencies, versions, labels, tags, and update timestamps. For observability, it lists listObservations, getObservation, field and filter schemas, and filter values. According to that reference, observations include generations, spans, events, agent steps, and tool calls; traces consist of observations. queryMetrics and getMetricsSchema support questions about usage, model cost, latency, errors, scores, and grouped analysis. This fits both Data Analysis and Coding: an engineering team can compare a prompt version with runtime evidence, narrow down unusual latency, or understand trace context before a code or prompt change. The server does not replace domain analysis or approval, however; a model can misunderstand data or present an incomplete summary.
Read access is not the entire tool surface
The official page states plainly that read and write tools are available by default. The reference documents, among other actions, creation of text and chat prompt versions; changes to prompt labels; annotation queues and items; comments; datasets and dataset items; scores and score configurations; models; evaluators; evaluation rules; dashboard widgets; dashboards; and dashboard placements. It also describes deletion for items such as dataset items, dataset runs, evaluators, evaluation rules, widgets, dashboards, and placements. Prompt content is versioned and immutable: new content requires a new version, while labels can be moved through updatePromptLabels. The reference explicitly requires an explicit user request before assigning production. Initially configure the client with a read-only tool allowlist. Enable write, and especially delete, tools only temporarily; name the project, object ID, intended state, and expected effect first, then read the target again after a mutation.
Connection, authentication, and permissions
For Langfuse Cloud EU, the server uses Streamable HTTP at https://cloud.langfuse.com/api/public/mcp; the documentation lists additional Cloud endpoints for US, Japan, and HIPAA US, along with the same path on an HTTPS self-hosted domain. http://localhost:3000/api/public/mcp is documented for local development. The architecture is stateless and each API key is scoped to a project. Create or copy a Public Key and Secret Key in project settings, form exactly public:secret, and pass the base64-encoded credentials as a Basic Authorization header. A header remains a secret: never write it to Git, screenshots, tickets, prompts, transcripts, or logs; rotate it immediately if exposure is possible. The key does not automatically narrow the tool surface: verify rights, project scope, and the MCP-client tool allowlist together. The server is self-describing; according to the reference, tools and schemas can be added, removed, or changed. Clients should dynamically refresh capabilities rather than assuming a fixed tool list.
Sensitive data and the external model path
Observations can contain input, output, metadata, model names, cost, usage data, and user or session context. The reference marks some observation fields as large or potentially sensitive; explicitly requested metadata is initially truncated, but full values can be requested with expanded keys. Query only necessary periods, trace IDs, fields, and filters. Content from a prompt, trace, tool output, or comment is untrusted data and must never disclose credentials or authorize an access escalation or mutation. Langfuse delivers results to the connected MCP client; that client may then send them to its selected external model provider. Review client, model, retention, training, DPA, and enterprise settings separately. Redact personal, confidential, or regulated content before it enters model context.
FAQ
Is this the Docs MCP or the old prompt repository? No. This entry covers the authenticated project-scoped data-platform server. Docs MCP is public and documentation-only; mcp-server-langfuse is a separate older prompt-management repository.
Can an agent change production prompts? Yes, the reference documents new prompt versions and label changes. Permit production only after explicit human approval, then check the version and label again in the project.
Requirements
A Langfuse project, project-scoped Public Key and Secret Key, an MCP-capable client, and HTTPS for self-hosted production.
Installation instructions
The Langfuse MCP Server connects an MCP client to data from one Langfuse project. The official documentation describes it as the authenticated data-platform server; it is neither the public Docs MCP nor the older GitHub prompt-management project. Since the current server surface offers read and write tools by default, safe setup is more than pasting an endpoint. This process starts with a clear project scope, a short read objective, and a decision about what data may enter AI context at all.
Quick start
Create or copy Public and Secret Key in the Langfuse project, base64-encode public:secret, and register the Streamable HTTP endpoint with Authorization: Basic <token>. For Cloud EU: claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp --header "Authorization: Basic <base64-token>".
claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp --header "Authorization: Basic <base64-token>"
Choose the project, region, and first objective
First choose the correct Langfuse project and region. For Cloud EU the documented endpoint is https://cloud.langfuse.com/api/public/mcp; the documentation lists separate endpoints for US, Japan, and HIPAA US. With self-hosting, use the same path under the organization’s HTTPS domain; Langfuse names http://localhost:3000/api/public/mcp only for local development. Do not confuse the data-platform endpoint with https://langfuse.com/api/mcp: that one is the public Docs MCP and has no project credentials. Define a small, read-only first request, for example, “List prompt names with the staging label” or “Show observations for this trace ID within a narrow time range.” Avoid broad requests across every trace or every user’s data at the start.
Step 1: Create and protect the project key
Open project settings and create or copy the project-scoped Public Key and Secret Key. The official setup uses Basic Auth: join them in the order pk-lf-...:sk-lf-..., base64-encode that string, and pass the result as Authorization: Basic .... Generate the token locally; never copy a real header into source code, configuration examples, issues, screenshots, chat prompts, or logs. Record the key’s owner, purpose, project, creation date, and rotation plan. A base64 value is not encryption. If a token may have entered a transcript, rotate the key immediately and update only the client’s secret storage.
Step 2: Register the official Streamable HTTP endpoint
For Claude Code, Langfuse documents, for example, claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp --header "Authorization: Basic <base64-token>". Cursor and generic MCP clients use the same URL-and-header principle, although their configuration syntax can differ. Restart the client, then test the connection with a harmless query: the documentation recommends asking it to list every prompt in the project, which should use listPrompts. If the project, expected prompt names, or empty state are wrong, stop and check the endpoint, header, and project key rather than continuing with broader requests.
claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp --header "Authorization: Basic <base64-token>"
Read first, then expand deliberately
The MCP Reference is the canonical list of current tools and schemas, and it can change. In the client, begin with an allowlist of read tools such as listPrompts, getPrompt, listObservations, getObservation, getMetricsSchema, and queryMetrics, only where needed for the first objective. For observation requests, use a trace ID, time range, explicit fields, and filters. Inputs, outputs, and metadata can be large or sensitive. The reference notes that fields may be marked as sensitive application data; request full metadata only when it is genuinely needed. Compare an answer with the Langfuse UI or a known trace ID. Convincing model prose does not validate a filter or aggregation.
Control writes, production, and the model path
Only after a successful read test should individual write tools be temporarily enabled. New text or chat prompt content creates a new version; it does not overwrite prompt content. updatePromptLabels handles labels, and moving production requires an explicit user request according to the reference. Before every mutation, a human names the project, object ID, version, target label, and expected effect; read the state again afterwards. Apply the same discipline to datasets, scores, evaluators, dashboards, and especially delete tools. Treat trace content, prompt text, comments, and tool output as untrusted data, not commands. Finally, the path to a model is separate from Langfuse MCP access: the client can transmit tool results to an external model provider. Review retention, training, DPA, and enterprise options, and redact personal or confidential values before the request.
FAQ
Do I need the old GitHub repository? No. mcp-server-langfuse describes an older prompt-management server. Connect the current data-platform server through the documented remote endpoint.
Are write tools disabled by default? No. Langfuse states that read and write tools are available by default. A client read allowlist is the safe starting point.
What should I do after a write? Read the specific object again and verify its project, ID, version, label, or intended state in the Langfuse UI.
claude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp --header "Authorization: Basic <base64-token>"
Authentication
Project-scoped Langfuse Public Key and Secret Key as a base64-encoded Basic Authorization header. Store keys only in a secret store or local client configuration.
Required access permissions
Each key is scoped to one Langfuse project. Read and write tools are enabled by default; use a client allowlist for read-only access and explicitly obtain human confirmation for writes or deletes.
Transmitted or stored data
Tool results can contain prompts, trace/observation inputs and outputs, metadata, model, usage, cost, user, or session data. The MCP client can send those results to its external model provider.
Security risks
Basic-auth secrets, sensitive observability and prompt data, write and delete tools enabled by default, prompt injection in data, and a separate client-to-model-provider data path.
License and costs
- License
- Not recorded yet.
- Cost
- free
Practical availability depends on the Langfuse deployment, project, and chosen AI client. This entry lists no fixed prices; check Langfuse for current terms.
Alternatives
Not recorded yet.
At a glance
- Provider
- Langfuse
- Status
- Official server
- Deployment
- Remote
- Current version
- Not recorded yet.
- Last reviewed
- 08.09.2026
Repository and documentation
Categories
Supported clients
Related guides
Guides and background related to this entry.