Langfuse MCP Server – LLM Observability and Prompts
Langfuse provides native Model Context Protocol servers for authenticated, project-scoped access to Langfuse Cloud data and unauthenticated access to Langfuse documentation. AI agents can use the MCP integration to inspect and manage prompt management resources, observations, datasets, scores, metrics, models, evaluators, and related project context.
Overview
Langfuse is an open source LLM engineering platform for tracing, prompt management, evaluation, datasets, metrics, and debugging AI applications. Its native MCP server lets MCP-capable clients connect directly to Langfuse project data without installing a separate local server. Langfuse also provides a public documentation MCP endpoint for agents that need to search or retrieve Langfuse documentation while implementing tracing or prompt workflows.
What the MCP server enables
The authenticated Langfuse Cloud MCP server is project-scoped and exposes tools for working with Langfuse data. The current reference includes prompt management tools such as getPrompt, listPrompts, createTextPrompt, createChatPrompt, and updatePromptLabels; observability tools such as listObservations, getObservation, and schema/filter helpers; annotation queue tools; dataset and dataset run tools; score and score configuration tools; metrics querying; model tools; media access; evaluator and evaluation rule tools; comments; and a health check. The public docs MCP server exposes documentation search and page retrieval tools for agentic onboarding and implementation support.
When to use it
Use the Langfuse MCP server when an AI agent needs live Langfuse context instead of relying on static model knowledge. Practical workflows include listing prompt templates in a project, fetching a production prompt by label, creating a new prompt version, moving a prompt label between versions, inspecting observations or datasets, querying metrics, or using docs search while instrumenting an application with Langfuse tracing. Langfuse recommends using the Langfuse Agent Skill instead when the agent can install CLI tools and run shell commands; the MCP server is most useful for MCP clients that need hosted HTTP tool access.
Connection and authentication
The authenticated server is built into Langfuse at /api/public/mcp and uses Streamable HTTP. Langfuse Cloud provides regional endpoints for EU, US, Japan, and HIPAA US. Authentication uses an Authorization header with HTTP Basic credentials encoded from a project public key and secret key. Each API key is scoped to a specific Langfuse project. The public documentation server is available at https://langfuse.com/api/mcp and does not require authentication.
Key considerations
Both read and write tools are available by default on the authenticated MCP server. If an agent should only read data, configure the MCP client with an allowlist that excludes write tools. The server is self-describing, and Langfuse states that clients should dynamically inspect available tools and schemas because tools and fields may evolve over time. Store encoded credentials in a secret manager or environment variable, rotate project keys when needed, and avoid granting agents broader write access than the workflow requires.
Supported Transports
streamable_http
URL: https://cloud.langfuse.com/api/public/mcp
streamable_http
URL: https://us.cloud.langfuse.com/api/public/mcp
streamable_http
URL: https://jp.cloud.langfuse.com/api/public/mcp
streamable_http
URL: https://hipaa.cloud.langfuse.com/api/public/mcp
streamable_http
URL: https://langfuse.com/api/mcp
Frequently Asked Questions
- When should an AI agent use the Langfuse MCP server?
- Use it when an agent needs project-scoped Langfuse context, such as listing prompts, fetching a labeled prompt version, creating or updating prompt versions, inspecting observations, working with datasets, querying metrics, or managing evaluation-related resources from an MCP client.
- What does the Langfuse MCP server add to an AI agent's capabilities?
- It gives the agent live access to Langfuse Cloud project data through MCP tools rather than relying on static knowledge. The Langfuse reference lists tools for prompts, observations, annotation queues, comments, datasets, dataset runs, scores, metrics, models, media, evaluators, evaluation rules, and health checks.
- What can the AI agent access through the public Langfuse Docs MCP server?
- The public documentation MCP server is unauthenticated and exposes tools for semantic search over Langfuse documentation, fetching a raw Markdown documentation page, and retrieving a Langfuse overview. It is intended for documentation search and retrieval, not for accessing private project data.
- How is authentication configured for the authenticated Langfuse MCP server?
- Create or copy a project-scoped Langfuse API key pair, combine the public key and secret key in the form public-key:secret-key, base64-encode that value, and send it in the Authorization header as HTTP Basic credentials. Store the encoded value in LANGFUSE_BASIC_AUTH or another secret-managed variable rather than committing it to configuration files.
- Which transport should be used for Langfuse MCP?
- Use the Streamable HTTP endpoints documented by Langfuse. The authenticated Langfuse Cloud MCP endpoints are regional and require Basic authentication, while the public docs endpoint at https://langfuse.com/api/mcp is also Streamable HTTP and does not require authentication. No local stdio server is required for the native Langfuse MCP server.