{"query":"Langfuse Docs MCP Server]","answer":"{\"content\": [{\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/api-and-data-platform/features/mcp-server\", \"title\": \"Langfuse MCP Server\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"MCP Server - Langfuse\\n[Docs](/docs)\\n[API & Data Platform](/docs/api-and-data-platform/overview)\\n[Features](/docs/api-and-data-platform/features/agent-skill)\\n[MCP Server](/docs/api-and-data-platform/features/mcp-server)\\n# Langfuse MCP Server\\nLangfuse includes a native [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that enables AI assistants and agents to interact with your Langfuse data programmatically.\\nIf you have feedback or ideas for new tools, please [share them on GitHub](https://github.com/orgs/langfuse/discussions/10605).\\nIf you are running AI agents in an environment where you can install CLI tools and run bash commands, we recommend using the [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) instead of the MCP server.\\nThis is the authenticated MCP server for the Langfuse data platform. There is also a public MCP server for the Langfuse documentation ([docs](/docs/docs-mcp)).\\n## MCP Reference\\nThe [MCP Reference](https://mcp.reference.langfuse.com) is the canonical source for current Langfuse MCP servers, setup snippets, tools, input schemas, and generated request examples.\\n**Both read and write tools are available by default.** If you only want to use read-only tools, configure your MCP client with an allowlist to restrict access to write operations. For a full list of tools, see the [MCP Reference](https://mcp.reference.langfuse.com).\\n## Set up\\nThe Langfuse MCP server uses a stateless architecture where each API key is scoped to a specific project. Use the following configuration to connect to the MCP server:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n  * Endpoint: `https://cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://us.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\"}, {\"type\": \"text\", \"text\": \"\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://jp.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://hipaa.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://your-domain.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * For reverse-proxy deployments, and when [Halo](/self-hosting/configuration/halo#langfuse-mcp)'s worker calls MCP via an internal Docker or Kubernetes hostname, make sure the public `Host` header is preserved, or set `LANGFUSE_MCP_ALLOWED_HOSTS` to a comma-separated list of exact additional hostnames or origins accepted by the MCP endpoint. Otherwise, you get a `403` error.\\n### Get Authentication Header\\n  1. Navigate to your project settings and create or copy a **project-scoped API key** : \\n    * Public Key: `pk-lf-...`\\n    * Secret Key: `sk-lf-...`\\n  2. Encode the credentials to base64 format: \\nyour-base64-token\\n    \\n```\\necho -n \\\"pk-lf-your-public-key:sk-lf-your-secret-key\\\" | base64\\n```\\n### Client Setup\\nClaude CodeCodexCursorPi AgentOther MCP Clients\\n  1. Register the Langfuse MCP server with a single command, replace `{your-base64-token}` with your encoded credentials:\\nterminal\\n    \\n```\\n///# Langfuse Cloud (EU)\\nclaude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (US)\\nclaude mcp add --transport http langfuse https://us.cloud.langfuse.com/api/public/mcp \\\\\"}, {\"type\": \"text\", \"text\": \"\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (Japan)\\nclaude mcp add --transport http langfuse https://jp.cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (HIPAA)\\nclaude mcp add --transport http langfuse https://hipaa.cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Self-Hosted (HTTPS required)\\nclaude mcp add --transport http langfuse https://your-domain.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Local Development\\nclaude mcp add --transport http langfuse http://localhost:3000/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n```\\n  2. Verify the connection by asking Claude Code to `list all prompts in the project`. Claude Code should use the `listPrompts` tool to return the list of prompts.\\n  1. Add the Langfuse MCP server to `~/.codex/config.toml`, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://us.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\"}, {\"type\": \"text\", \"text\": \"\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://your-domain.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n  2. Restart Codex and run `codex mcp list` to confirm the server is registered.\\n  3. Verify the connection by asking Codex to `list all prompts in the project`. Codex should use the `listPrompts` tool to return the list of prompts.\\n  1. Open Cursor Settings (`Cmd/Ctrl + Shift + J`)\\n  2. Navigate to **Tools & Integrations** tab\\n  3. Click **\\\"Add Custom MCP\\\"**\\n  4. Add your Langfuse MCP server configuration, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://us.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://your-domain.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\n  5. Save the file and restart Cursor\\n  6. The server should appear in the MCP settings with a green dot indicating it's active\"}, {\"type\": \"text\", \"text\": \"\\n[Pi](https://pi.dev) does not ship with built-in MCP support. Use the community-maintained [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) extension, which exposes MCP servers to Pi through a single proxy tool.\\n  1. Install the extension and restart Pi:\\n    \\n```\\npi install npm:pi-mcp-adapter\\n```\\n  2. Add the Langfuse MCP server to `~/.pi/agent/mcp.json`, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://us.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://your-domain.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n  3. Restart Pi and verify the connection by asking Pi to `list all prompts in the project`. Pi should use the `listPrompts` tool via the MCP proxy to return the list of prompts.\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header \\n    * `Authorization: Basic {your-base64-token}`\"}, {\"type\": \"text\", \"text\": \"\\n## Filter logical root observations\\nThe observation tools distinguish logical roots from physical parentage:\\n  * `listObservations` accepts the optional boolean `isRootObservation` filter. Set it to `true` to match observations without a physical parent or observations explicitly marked as application roots by the SDK.\\n  * Physical-parent filtering remains separate. An application-root observation can match `isRootObservation: true` even when it has a physical parent.\\n  * `isRootObservation` is included in the default observation fields returned by `listObservations`.\\n  * `getObservationFilterValues` supports `isRootObservation` as a filter-value column, so you can discover and combine logical-root values with other observation filters.\\nFor the complete tool schemas and request examples, see the [MCP Reference](https://mcp.reference.langfuse.com).\\n## Feedback\\nWe'd love to hear about your experience with the Langfuse MCP server. Share your feedback, ideas, and use cases in our [GitHub Discussion](https://github.com/orgs/langfuse/discussions/10605).\\n## Related Documentation\\n  * [MCP Reference](https://mcp.reference.langfuse.com) \\\\- Reference for MCP servers, setup snippets, tools, schemas, and requests\\n  * [Agentic Prompt Management](/docs/prompt-management/features/agentic-access) \\\\- Use agents to retrieve, create, migrate, and update prompts\\n  * [Prompt Management Overview](/docs/prompt-management/overview) \\\\- Learn about Langfuse prompt management\\n  * [Public API](/docs/api-and-data-platform/features/public-api) \\\\- REST API for programmatic access\\n  * [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) \\\\- Use Langfuse features from your coding agent\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/docs-mcp\", \"title\": \"Langfuse Docs MCP Server\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"Docs MCP Server - Langfuse\\n[Docs](/docs)\\n[Docs MCP Server](/docs/docs-mcp)\\n# Langfuse Docs MCP Server\\nThe Langfuse Docs MCP server exposes the Langfuse docs to AI agents.\\nCore use case: Use Cursor (or other AI Coding Agent) to automatically integrate Langfuse Tracing into your codebase, see [get started](/docs/get-started) for detailed instructions and an example prompt.\\nThis is the public MCP server for the Langfuse documentation. There is also an authenticated MCP server to integrate with the rest of the Langfuse data platform ([docs](/docs/api-and-data-platform/features/mcp-server)).\\n### Pair with the Agent Skill\\nYou'll get better results when your agent also has the [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) installed, next to the MCP server.\\nInstall it from [GitHub](https://github.com/langfuse/skills) or follow the [Agent Skill setup](/docs/api-and-data-platform/features/agent-skill).\\n## Install\\nClaude CodeCodexCursorWindsurfCopilot (in VSCode)Other MCP Clients\\nAdd Langfuse Docs MCP to Claude Code via the CLI:\\n    \\n    \\n```\\nclaude mcp add \\\\\\n --transport http \\\\\\n langfuse-docs \\\\\\n https://langfuse.com/api/mcp \\\\\\n --scope user\\n```\\nManual configuration\\nAlternatively, add the following to your settings file:\\n  * **User scope** : `~/.claude/settings.json`\\n  * **Project scope** : `your-repo/.claude/settings.json`\\n  * **Local scope** : `your-repo/.claude/settings.local.json`\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"transportType\\\": \\\"http\\\",\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\",\\n \\\"verifySsl\\\": true\\n }\\n }\\n}\\n```\\n **One-liner JSON import**\\n    \\n    \\n```\\nclaude mcp add-json langfuse-docs \\\\\\n '{\\\"type\\\":\\\"http\\\",\\\"url\\\":\\\"https://langfuse.com/api/mcp\\\"}'\\n```\\nOnce added, start a Claude Code session (`claude`) and type `/mcp` to confirm the connection.\\nAdd Langfuse Docs MCP to Codex via the CLI:\\n    \\n    \\n```\\ncodex mcp add langfuse-docs --url https://langfuse.com/api/mcp\\n```\\nManual configuration\"}, {\"type\": \"text\", \"text\": \"\\nAlternatively, add the following to `~/.codex/config.toml`:\\n    \\n    \\n```\\n[mcp_servers.langfuse-docs]\\nurl = \\\"https://langfuse.com/api/mcp\\\"\\n```\\nStart a new Codex session, then run `codex mcp list` to confirm the server is registered.\\nAdd Langfuse Docs MCP to Cursor via the one-click install:\\n[Install MCP Server in Cursor\\n](https://cursor.com/en/install-mcp?name=langfuse-docs&config=eyJ1cmwiOiJodHRwczovL2xhbmdmdXNlLmNvbS9hcGkvbWNwIn0%3D)\\nManual configuration\\nAdd the following to your `mcp.json`:\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\"\\n }\\n }\\n}\\n```\\nAdd Langfuse Docs MCP to Windsurf via the following steps:\\n  1. Open Command Palette (\\u2318+Shift+P)\\n  2. Open \\\"MCP Configuration Panel\\\"\\n  3. Select `Add custom server`\\n  4. Add the following configuration:\\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"command\\\": \\\"npx\\\",\\n \\\"args\\\": [\\\"mcp-remote\\\", \\\"https://langfuse.com/api/mcp\\\"]\\n }\\n }\\n}\\n```\\nAdd Langfuse Docs MCP to Copilot in VSCode via the one-click install:\\n[Install MCP Server in VS Code\\n](vscode:mcp/install?%7B%22name%22%3A%22langfuse-docs%22%2C%22url%22%3A%22https%3A%2F%2Flangfuse.com%2Fapi%2Fmcp%22%7D)\\nManual configuration\\nAdd Langfuse Docs MCP to Copilot in VSCode via the following steps:\\n  1. Open Command Palette (\\u2318+Shift+P)\\n  2. Open \\\"MCP: Add Server...\\\"\\n  3. Select `HTTP`\\n  4. Paste `https://langfuse.com/api/mcp`\\n  5. Select name (e.g. `langfuse-docs`) and whether to save in user or workspace settings\\n  6. You're all set! The MCP server is now available in Agent mode\\nLangfuse uses the `streamableHttp` protocol to communicate with the MCP server. This is supported by most clients.\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\"}, {\"type\": \"text\", \"text\": \"\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\"\\n }\\n }\\n}\\n```\\nIf you use a client that does not support `streamableHttp` (e.g. Windsurf), you can use the `mcp-remote` command as a local proxy.\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"command\\\": \\\"npx\\\",\\n \\\"args\\\": [\\\"mcp-remote\\\", \\\"https://langfuse.com/api/mcp\\\"]\\n }\\n }\\n}\\n```\\n## About\\n  * Endpoint: `https://langfuse.com/api/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: None\\nThe [MCP Reference](https://mcp.reference.langfuse.com) is the canonical source for current Docs MCP tools, input schemas, and generated request examples.\\n## References\\n  * Implementation of the MCP server: [route.ts](https://github.com/langfuse/langfuse-docs/blob/main/app/api/mcp/route.ts)\\n  * [MCP Reference](https://mcp.reference.langfuse.com): reference for MCP servers, setup snippets, tools, schemas, and requests\\n  * [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill): playbook that teaches coding agents how to use the Docs MCP server\\n  * [Agentic Onboarding](/docs/get-started) powered by the MCP server\\n  * [Ask AI](/docs/ask-ai): RAG chat with the Langfuse docs to get answers to your questions\\n  * [langfuse.com/llms.txt](https://langfuse.com/llms.txt): concise overview with page titles and links to detailed sub-files ([llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt))\\n## REST Endpoint\\nThe underlying docs search (`searchLangfuseDocs` tool) is also available independently as a REST API at `https://langfuse.com/api/search-docs`.\\n    \\n    \\n```\"}, {\"type\": \"text\", \"text\": \"\\ncurl \\\"https://langfuse.com/api/search-docs?query=Langfuse+Docs+MCP+Server\\\"\\n```\\nUse this endpoint directly when you need lightweight semantic search outside of MCP.\\n## WebMCP\\nlangfuse.com also registers the read-only docs tools (`searchLangfuseDocs`, `getLangfuseDocsPage`, `getLangfuseOverview`) with [WebMCP](https://github.com/webmachinelearning/webmcp). Browser agents can call them on any page of the site without connecting to the MCP endpoint. `submitFeedback` is only available through the MCP server.\\nWebMCP is an early web standard. Only browsers and agents that implement it see the tools; see the [implementation status](https://github.com/webmachinelearning/webmcp/blob/main/implementation-status.md).\\n* * *\\n* * *\\nLast updated on 10/30/2026\\n\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/metrics/features/custom-dashboards\", \"title\": \"Custom Dashboards\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"\\n  * **MCP server** : The [Langfuse MCP server](/docs/api-and-data-platform/features/mcp-server) exposes the same operations as tools, letting AI agents build and edit dashboards with human-in-the-loop approval for changes. The same tools power [Halo](/docs/api-and-data-platform/features/halo), the Langfuse assistant, in the UI.\\nThese endpoints and MCP tools are **unstable** and may change while the dashboard and widget contract is being finalized.\\n\\n## Use Cases and Examples\\n### Production Monitoring Dashboard\\nMonitor the health and performance of your LLM application in real-time:\\n  * **Error Rate Tracking** : Monitor failed requests and error patterns\\n  * **Latency Analysis** : Track P95 and P99 response times across different endpoints\\n  * **Throughput Monitoring** : Visualize request volume and capacity utilization\\n  * **Model Performance** : Compare accuracy and quality metrics across model versions\\n  * **Tool Usage & Latency**: Track how often each external tool (e.g. API calls, database queries) is invoked and its latency\\n### Cost Optimization Dashboard\\nUnderstand and optimize your LLM usage costs:\\n  * **Token Usage Trends** : Track input/output token consumption over time\\n  * **Cost per User** : Identify high-usage users and optimize pricing strategies\\n  * **Model Cost Comparison** : Compare costs across different LLM providers and models\\n  * **Feature Cost Analysis** : Understand which application features drive the highest costs\\n### Quality and User Experience Dashboard\\nMonitor the quality and user satisfaction of your LLM application:\\n  * **User Feedback Trends** : Track thumbs up/down ratings and detailed feedback\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/metrics/features/custom-dashboards\", \"title\": \"Custom Dashboards\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"\\n### Data Export and Integration\\nDashboards > Langfuse Cost Dashboard. Open the \\u201c\\u22ef\\u201d menu of the \\u201cTotal costs\\u201d widget and click \\u201cDownload data as CSV\\u201d.\\nExport your dashboard data for further analysis or integration with external tools. See the [Export Data](/docs/api-and-data-platform/overview) guide for comprehensive export options including:\\n  * CSV export of dashboard data\\n  * Integration with external analytics tools\\n  * Programmatic access via the [Metrics API](/docs/metrics/features/metrics-api)\\n### Manage Dashboards via API, CLI, and MCP\\nBeyond the dashboard editor in the UI, you can create and manage dashboards, their tile placements, and reusable widgets programmatically:\\n  * **Public API** : Endpoints under `/api/public/unstable` cover dashboards, placements, and widgets. See the [dashboards](https://api.reference.langfuse.com/#tag/unstabledashboards) and [dashboard widgets](https://api.reference.langfuse.com/#tag/unstabledashboardwidgets) API references.\\n  * **Langfuse CLI** : The [CLI](/docs/api-and-data-platform/features/cli) picks up these endpoints automatically, so you can keep dashboard definitions in version control and apply them across projects and environments.\\n  * **MCP server** : The [Langfuse MCP server](/docs/api-and-data-platform/features/mcp-server) exposes the same operations as tools, letting AI agents build and edit dashboards with human-in-the-loop approval for changes. The same tools power [Halo](/docs/api-and-data-platform/features/halo), the Langfuse assistant, in the UI.\\nThese endpoints and MCP tools are **unstable** and may change while the dashboard and widget contract is being finalized.\"}, {\"type\": \"text\", \"text\": \"\\n## Use Cases and Examples\\n### Production Monitoring Dashboard\\nMonitor the health and performance of your LLM application in real-time:\\n  * **Error Rate Tracking** : Monitor failed requests and error patterns\\n  * **Latency Analysis** : Track P95 and P99 response times across different endpoints\\n  * **Throughput Monitoring** : Visualize request volume and capacity utilization\\n  * **Model Performance** : Compare accuracy and quality metrics across model versions\\n  * **Tool Usage & Latency**: Track how often each external tool (e.g. API calls, database queries) is invoked and its latency\\n### Cost Optimization Dashboard\\nUnderstand and optimize your LLM usage costs:\\n  * **Token Usage Trends** : Track input/output token consumption over time\\n  * **Cost per User** : Identify high-usage users and optimize pricing strategies\\n  * **Model Cost Comparison** : Compare costs across different LLM providers and models\\n  * **Feature Cost Analysis** : Understand which application features drive the highest costs\\n### Quality and User Experience Dashboard\\nMonitor the quality and user satisfaction of your LLM application:\\n  * **User Feedback Trends** : Track thumbs up/down ratings and detailed feedback\\n  * **Score Distribution** : Visualize the distribution of quality scores over time\\n  * **User Behavior Analysis** : Understand how users interact with different features\\n  * **A/B Test Results** : Compare quality metrics between different model versions or prompts\\n## GitHub Discussions\"}, {\"type\": \"text\", \"text\": \"\\n[Feature Request: Advanced Customization for Dashboards (Custom Links, Custom Layouts, and Tabular Operational Metrics)](https://github.com/orgs/langfuse/discussions/15293 \\\"Langfuse Ideas: Feature Request: Advanced Customization for Dashboards \\\\(Custom Links, Custom Layouts, and Tabular Operational Metrics\\\\)\\\")\\n[Dashboard widget / metrics: count sessions with trace count > N](https://github.com/orgs/langfuse/discussions/13729 \\\"Langfuse Ideas: Dashboard widget / metrics: count sessions with trace count > N\\\")\\n[Ability to filter cache creation/read tokens in the Dashboard](https://github.com/orgs/langfuse/discussions/12016 \\\"Langfuse Ideas: Ability to filter cache creation/read tokens in the Dashboard\\\")\\n[Organization Consumption Chart](https://github.com/orgs/langfuse/discussions/11748 \\\"Langfuse Ideas: Organization Consumption Chart\\\")\\n[Ability to display scores by prompt in Dashboard like in prompt metrics](https://github.com/orgs/langfuse/discussions/11732 \\\"Langfuse Ideas: Ability to display scores by prompt in Dashboard like in prompt metrics\\\")\\n[Add \\\"Sessions\\\" as a Data Source in Dashboard Widgets](https://github.com/orgs/langfuse/discussions/11707 \\\"Langfuse Ideas: Add \\\"Sessions\\\" as a Data Source in Dashboard Widgets\\\")\\n[Output (when structured) as Dimension for Dashboarding](https://github.com/orgs/langfuse/discussions/11690 \\\"Langfuse Ideas: Output \\\\(when structured\\\\) as Dimension for Dashboarding\\\")\\n[Can give slicing options and filters on dashboard.](https://github.com/orgs/langfuse/discussions/11608 \\\"Langfuse Ideas: Can give slicing options and filters on dashboard.\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Organization usage & uptake analytics (adoption insights)](https://github.com/orgs/langfuse/discussions/11469 \\\"Langfuse Ideas: Organization usage & uptake analytics \\\\(adoption insights\\\\)\\\")\\n[Add option to show TTFT in Model Latencies chart on the Home Page](https://github.com/orgs/langfuse/discussions/11433 \\\"Langfuse Ideas: Add option to show TTFT in Model Latencies chart on the Home Page\\\")\\n[Aggregate unique tags per trace (independent tag counting) for charts](https://github.com/orgs/langfuse/discussions/11424 \\\"Langfuse Ideas: Aggregate unique tags per trace \\\\(independent tag counting\\\\) for charts\\\")\\n[Dashboard visibility into public API usage](https://github.com/orgs/langfuse/discussions/11410 \\\"Langfuse Ideas: Dashboard visibility into public API usage\\\")\\n[Tool Evaluation & Analytics](https://github.com/orgs/langfuse/discussions/11289 \\\"Langfuse Ideas: Tool Evaluation & Analytics\\\")\\n[Easier way to duplicate widgets on Dashboards](https://github.com/orgs/langfuse/discussions/11105 \\\"Langfuse Ideas: Easier way to duplicate widgets on Dashboards\\\")\\n[Trace Success and Failure Rate Chart](https://github.com/orgs/langfuse/discussions/11099 \\\"Langfuse Ideas: Trace Success and Failure Rate Chart\\\")\\n[[Feature Request/Discussion] Dashboard Analytics Roadmap: Complex Joins & Raw SQL Editor](https://github.com/orgs/langfuse/discussions/10971 \\\"Langfuse Ideas: \\\\[Feature Request/Discussion\\\\] Dashboard Analytics Roadmap: Complex Joins & Raw SQL Editor\\\")\\n[Allow Line-Chart X-Axis to Use Day-Level Labels Instead of Date+Time](https://github.com/orgs/langfuse/discussions/10858 \\\"Langfuse Ideas: Allow Line-Chart X-Axis to Use Day-Level Labels Instead of Date+Time\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Home Dashboard Charts: Control time aggregation / bucketing (to make data meaningful)](https://github.com/orgs/langfuse/discussions/10840 \\\"Langfuse Ideas: Home Dashboard Charts: Control time aggregation / bucketing \\\\(to make data meaningful\\\\)\\\")\\n[Allow Trace Metadata Fields to be Used as Dashboard Widget Dimensions (Axis & Breakdown)](https://github.com/orgs/langfuse/discussions/10833 \\\"Langfuse Ideas: Allow Trace Metadata Fields to be Used as Dashboard Widget Dimensions \\\\(Axis & Breakdown\\\\)\\\")\\n[Persist Dashboard Filters or Implement \\\"Saved Views\\\"](https://github.com/orgs/langfuse/discussions/10714 \\\"Langfuse Ideas: Persist Dashboard Filters or Implement \\\"Saved Views\\\"\\\")\\n[I need a graph that shows me my aggregated cost by prompt and not by model in my dashboard.](https://github.com/orgs/langfuse/discussions/10615 \\\"Langfuse Ideas: I need a graph that shows me my aggregated cost by prompt and not by model in my dashboard.\\\")\\n[Dashboard: allow for custom styling and colors of dashboard widgets](https://github.com/orgs/langfuse/discussions/10596 \\\"Langfuse Ideas: Dashboard: allow for custom styling and colors of dashboard widgets\\\")\\n[Add OR logic between filter groups in Dashboard and Widget filters](https://github.com/orgs/langfuse/discussions/10383 \\\"Langfuse Ideas: Add OR logic between filter groups in Dashboard and Widget filters\\\")\\n[session score inherits user_id](https://github.com/orgs/langfuse/discussions/10193 \\\"Langfuse Ideas: session score inherits user_id\\\")\\n[Add total results count to Scores and Traces views](https://github.com/orgs/langfuse/discussions/10132 \\\"Langfuse Ideas: Add total results count to Scores and Traces views\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[advanced widget creation](https://github.com/orgs/langfuse/discussions/10108 \\\"Langfuse Ideas: advanced widget creation\\\")\\n[Error Rate Metric](https://github.com/orgs/langfuse/discussions/10106 \\\"Langfuse Ideas: Error Rate Metric\\\")\\n[More flexible and exportable dashboards](https://github.com/orgs/langfuse/discussions/9860 \\\"Langfuse Ideas: More flexible and exportable dashboards\\\")\\n[Dashboard: Metrics deep link to trace/observation/scores table](https://github.com/orgs/langfuse/discussions/9695 \\\"Langfuse Ideas: Dashboard: Metrics deep link to trace/observation/scores table\\\")\\n[Dashboards: null values are plotted identically to 0 values.](https://github.com/orgs/langfuse/discussions/9650 \\\"Langfuse Ideas: Dashboards: null values are plotted identically to 0 values.\\\")\\n[request: dashboard filters should behave like trace filters and add query params to url](https://github.com/orgs/langfuse/discussions/9557 \\\"Langfuse Ideas: request: dashboard filters should behave like trace filters and add query params to url\\\")\\n[Dashboard widget: Break usage down by type](https://github.com/orgs/langfuse/discussions/9519 \\\"Langfuse Ideas: Dashboard widget: Break usage down by type\\\")\\n[Feature Request: Organization-level trace visibility](https://github.com/orgs/langfuse/discussions/9428 \\\"Langfuse Ideas: Feature Request: Organization-level trace visibility\\\")\\n[Dashboard Widgets: Break down by Week](https://github.com/orgs/langfuse/discussions/9417 \\\"Langfuse Ideas: Dashboard Widgets: Break down by Week\\\")\\n[[Feature Request] Dataset with more flexible views](https://github.com/orgs/langfuse/discussions/9266 \\\"Langfuse Ideas: \\\\[Feature Request\\\\] Dataset with more flexible views\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Being able to breakdown by metadata in dashboards](https://github.com/orgs/langfuse/discussions/9079 \\\"Langfuse Ideas: Being able to breakdown by metadata in dashboards\\\")\\n[Filter/chart by cached tokens in dashboard builder](https://github.com/orgs/langfuse/discussions/9025 \\\"Langfuse Ideas: Filter/chart by cached tokens in dashboard builder\\\")\\n[Metadata values as new Widget Breakdown Dimension](https://github.com/orgs/langfuse/discussions/8971 \\\"Langfuse Ideas: Metadata values as new Widget Breakdown Dimension\\\")\\n[Dashboards and Widgets via API](https://github.com/orgs/langfuse/discussions/8819 \\\"Langfuse Ideas: Dashboards and Widgets via API\\\")\\n[Dashboard feature suggestions (Comparison, Altering, Metadata Grouping)](https://github.com/orgs/langfuse/discussions/8729 \\\"Langfuse Ideas: Dashboard feature suggestions \\\\(Comparison, Altering, Metadata Grouping\\\\)\\\")\\n[Support percentage metric for custom widget: show what proportion of total falls into a selected range](https://github.com/orgs/langfuse/discussions/8691 \\\"Langfuse Ideas: Support percentage metric for custom widget: show what proportion of total falls into a selected range\\\")\\n[Dashboards: Replicate Dashboard Components in other Langfuse Projects](https://github.com/orgs/langfuse/discussions/8663 \\\"Langfuse Ideas: Dashboards: Replicate Dashboard Components in other Langfuse Projects\\\")\\n[Dashboard Pie Chart Widget: Permanently show legend](https://github.com/orgs/langfuse/discussions/8660 \\\"Langfuse Ideas: Dashboard Pie Chart Widget: Permanently show legend\\\")\\n[Better Widgets - Legends, Data Labels, etc](https://github.com/orgs/langfuse/discussions/8483 \\\"Langfuse Ideas: Better Widgets - Legends, Data Labels, etc\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Dashboard: Big number count for total users (and sessions)](https://github.com/orgs/langfuse/discussions/8468 \\\"Langfuse Ideas: Dashboard: Big number count for total users \\\\(and sessions\\\\)\\\")\\n[Dashboard OR for Multiple Filters](https://github.com/orgs/langfuse/discussions/8407 \\\"Langfuse Ideas: Dashboard OR for Multiple Filters\\\")\\n[Capture all filters in URL](https://github.com/orgs/langfuse/discussions/8271 \\\"Langfuse Ideas: Capture all filters in URL\\\")\\n[Add Support for Scatter Plot as a Chart Type](https://github.com/orgs/langfuse/discussions/8161 \\\"Langfuse Ideas: Add Support for Scatter Plot as a Chart Type\\\")\\n[Shareable link to the dashboard](https://github.com/orgs/langfuse/discussions/8065 \\\"Langfuse Ideas: Shareable link to the dashboard\\\")\\n[Dashboard Widget: Break down by Generation Input / Output](https://github.com/orgs/langfuse/discussions/8023 \\\"Langfuse Ideas: Dashboard Widget: Break down by Generation Input / Output\\\")\\n[Allow session-duration filters in custom dashboards](https://github.com/orgs/langfuse/discussions/7999 \\\"Langfuse Ideas: Allow session-duration filters in custom dashboards\\\")\\n[feat (dashboards) : Add Session in view data selection](https://github.com/orgs/langfuse/discussions/7881 \\\"Langfuse Ideas: feat \\\\(dashboards\\\\) : Add Session in view data selection\\\")\\n[feat(dashboards): support aggregation and filtering of session-level scores by trace-level properties](https://github.com/orgs/langfuse/discussions/7803 \\\"Langfuse Ideas: feat\\\\(dashboards\\\\): support aggregation and filtering of session-level scores by trace-level properties\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[[Langfuse Cloud] Ability to duplicate/fork a widget](https://github.com/orgs/langfuse/discussions/7788 \\\"Langfuse Ideas: \\\\[Langfuse Cloud\\\\] Ability to duplicate/fork a widget\\\")\\n[Add option to breakdown by metadata in widgets](https://github.com/orgs/langfuse/discussions/7755 \\\"Langfuse Ideas: Add option to breakdown by metadata in widgets\\\")\\n[Dashboards for error tracking](https://github.com/orgs/langfuse/discussions/7426 \\\"Langfuse Ideas: Dashboards for error tracking\\\")\\n[Implement User Customizable Dashboard Views with ClickHouse Query Transformer](https://github.com/orgs/langfuse/discussions/7372 \\\"Langfuse Ideas: Implement User Customizable Dashboard Views with ClickHouse Query Transformer\\\")\\n[Time spent by user](https://github.com/orgs/langfuse/discussions/7189 \\\"Langfuse Ideas: Time spent by user\\\")\\n[Add ability to filter by date range](https://github.com/orgs/langfuse/discussions/7070 \\\"Langfuse Ideas: Add ability to filter by date range\\\")\\n[Trace cost percentiles](https://github.com/orgs/langfuse/discussions/6812 \\\"Langfuse Ideas: Trace cost percentiles\\\")\\n[average trace latency](https://github.com/orgs/langfuse/discussions/6769 \\\"Langfuse Ideas: average trace latency\\\")\\n[Allow *OR* condition on filters](https://github.com/orgs/langfuse/discussions/6689 \\\"Langfuse Ideas: Allow *OR* condition on filters\\\")\\n[Dashboard: Breakdown per additional dimensions (e.g. tag-based or using custom columns)](https://github.com/orgs/langfuse/discussions/6675 \\\"Langfuse Ideas: Dashboard: Breakdown per additional dimensions \\\\(e.g. tag-based or using custom columns\\\\)\\\")\\n[[Custom Dashboard] - Display % run pass block in DIfy](https://github.com/orgs/langfuse/discussions/6582 \\\"Langfuse Ideas: \\\\[Custom Dashboard\\\\] - Display % run pass block in DIfy\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Possible to add metadata fields in dashboard filters](https://github.com/orgs/langfuse/discussions/6564 \\\"Langfuse Ideas: Possible to add metadata fields in dashboard filters\\\")\\n[Add more filter options to the dashboard](https://github.com/orgs/langfuse/discussions/6487 \\\"Langfuse Ideas: Add more filter options to the dashboard\\\")\\n[allow custom dashboard which can be share with secure link](https://github.com/orgs/langfuse/discussions/6425 \\\"Langfuse Ideas: allow custom dashboard which can be share with secure link\\\")\\n[Adding filter to Scores Analytics](https://github.com/orgs/langfuse/discussions/6243 \\\"Langfuse Ideas: Adding filter to Scores Analytics\\\")\\n[Add Session Duration Metric to Dashboard](https://github.com/orgs/langfuse/discussions/5981 \\\"Langfuse Ideas: Add Session Duration Metric to Dashboard\\\")\\n[dashboard improvement ideas](https://github.com/orgs/langfuse/discussions/5829 \\\"Langfuse Ideas: dashboard improvement ideas\\\")\\n[Add chart for cost tracking by any metadata item. for example merchantName so we can keep track of who is using how much.](https://github.com/orgs/langfuse/discussions/5701 \\\"Langfuse Ideas: Add chart for cost tracking by any metadata item. for example merchantName so we can keep track of who is using how much.\\\")\\n[Support Metadata Filtering within the Dashboards](https://github.com/orgs/langfuse/discussions/5627 \\\"Langfuse Ideas: Support Metadata Filtering within the Dashboards\\\")\\n[chart request - mirror score functionality but after filtering within trace or observation panes](https://github.com/orgs/langfuse/discussions/5426 \\\"Langfuse Ideas: chart request - mirror score functionality but after filtering within trace or observation panes\\\")\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"site\", \"url\": \"https://langfuse.com/llms.txt\", \"title\": \"\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"---\\n\\n    \\n    \\n```\\n///# Langfuse\\n> Langfuse is an **open-source LLM engineering platform** ([GitHub](https://github.com/langfuse/langfuse)) that helps teams collaboratively debug, analyze, and iterate on their LLM applications. All platform features are natively integrated to accelerate the development workflow.\\n## Langfuse Docs MCP Server\\nConnect to the Langfuse Docs MCP server to access documentation directly in your AI editor:\\n- **Endpoint**: `https://langfuse.com/api/mcp`\\n- **Transport**: `streamableHttp`\\n- **Documentation**: [Langfuse Docs MCP Server](https://langfuse.com/docs/docs-mcp)\\nThe MCP server provides tools to search Langfuse documentation, GitHub issues, and discussions. See the [installation guide](https://langfuse.com/docs/docs-mcp) for setup instructions in Cursor, VS Code, Claude Desktop, and other MCP clients.\\n## Docs\\n- [Docs](https://langfuse.com/docs)\\n- [Audit Logs](https://langfuse.com/docs/administration/audit-logs)\\n- [Authentication And Sso](https://langfuse.com/docs/administration/authentication-and-sso)\\n- [Data Deletion](https://langfuse.com/docs/administration/data-deletion)\\n- [Data Retention](https://langfuse.com/docs/administration/data-retention)\\n- [Llm Connection](https://langfuse.com/docs/administration/llm-connection)\\n- [Rbac](https://langfuse.com/docs/administration/rbac)\\n- [Scim And Org Api](https://langfuse.com/docs/administration/scim-and-org-api)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/administration/troubleshooting-and-faq)\\n- [Usage Alerts](https://langfuse.com/docs/administration/usage-alerts)\\n- [Export From Ui](https://langfuse.com/docs/api-and-data-platform/features/export-from-ui)\\n- [Export To Blob Storage](https://langfuse.com/docs/api-and-data-platform/features/export-to-blob-storage)\\n- [Fine Tuning](https://langfuse.com/docs/api-and-data-platform/features/fine-tuning)\"}, {\"type\": \"text\", \"text\": \"\\n- [Public Api](https://langfuse.com/docs/api-and-data-platform/features/public-api)\\n- [Query Via Sdk](https://langfuse.com/docs/api-and-data-platform/features/query-via-sdk)\\n- [Overview](https://langfuse.com/docs/api-and-data-platform/overview)\\n- [Ask Ai](https://langfuse.com/docs/ask-ai)\\n- [Demo](https://langfuse.com/docs/demo)\\n- [Docs Mcp](https://langfuse.com/docs/docs-mcp)\\n- [Data Model](https://langfuse.com/docs/evaluation/dataset-runs/data-model)\\n- [Datasets](https://langfuse.com/docs/evaluation/dataset-runs/datasets)\\n- [Native Run](https://langfuse.com/docs/evaluation/dataset-runs/native-run)\\n- [Remote Run](https://langfuse.com/docs/evaluation/dataset-runs/remote-run)\\n- [Annotation](https://langfuse.com/docs/evaluation/evaluation-methods/annotation)\\n- [Custom Scores](https://langfuse.com/docs/evaluation/evaluation-methods/custom-scores)\\n- [Data Model](https://langfuse.com/docs/evaluation/evaluation-methods/data-model)\\n- [Llm As A Judge](https://langfuse.com/docs/evaluation/evaluation-methods/llm-as-a-judge)\\n- [Overview](https://langfuse.com/docs/evaluation/overview)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/evaluation/troubleshooting-and-faq)\\n- [Custom Dashboards](https://langfuse.com/docs/metrics/features/custom-dashboards)\\n- [Metrics Api](https://langfuse.com/docs/metrics/features/metrics-api)\\n- [Overview](https://langfuse.com/docs/metrics/overview)\\n- [Data Model](https://langfuse.com/docs/observability/data-model)\\n- [Agent Graphs](https://langfuse.com/docs/observability/features/agent-graphs)\\n- [Comments](https://langfuse.com/docs/observability/features/comments)\\n- [Environments](https://langfuse.com/docs/observability/features/environments)\"}, {\"type\": \"text\", \"text\": \"\\n- [Setup](https://langfuse.com/docs/observability/sdk/python/setup)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/sdk/python/troubleshooting-and-faq)\\n- [Upgrade Path](https://langfuse.com/docs/observability/sdk/python/upgrade-path)\\n- [Advanced Usage](https://langfuse.com/docs/observability/sdk/typescript/advanced-usage)\\n- [Instrumentation](https://langfuse.com/docs/observability/sdk/typescript/instrumentation)\\n- [Overview](https://langfuse.com/docs/observability/sdk/typescript/overview)\\n- [Setup](https://langfuse.com/docs/observability/sdk/typescript/setup)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/sdk/typescript/troubleshooting-and-faq)\\n- [Upgrade Path](https://langfuse.com/docs/observability/sdk/typescript/upgrade-path)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/troubleshooting-and-faq)\\n- [Data Model](https://langfuse.com/docs/prompt-management/data-model)\\n- [A B Testing](https://langfuse.com/docs/prompt-management/features/a-b-testing)\\n- [Caching](https://langfuse.com/docs/prompt-management/features/caching)\\n- [Composability](https://langfuse.com/docs/prompt-management/features/composability)\\n- [Config](https://langfuse.com/docs/prompt-management/features/config)\\n- [Folders](https://langfuse.com/docs/prompt-management/features/folders)\\n- [Github Integration](https://langfuse.com/docs/prompt-management/features/github-integration)\\n- [Guaranteed Availability](https://langfuse.com/docs/prompt-management/features/guaranteed-availability)\\n- [Link To Traces](https://langfuse.com/docs/prompt-management/features/link-to-traces)\\n- [Mcp Server](https://langfuse.com/docs/prompt-management/features/mcp-server)\"}, {\"type\": \"text\", \"text\": \"\\n- [Message Placeholders](https://langfuse.com/docs/prompt-management/features/message-placeholders)\\n- [N8n Node](https://langfuse.com/docs/prompt-management/features/n8n-node)\\n- [Playground](https://langfuse.com/docs/prompt-management/features/playground)\\n- [Prompt Version Control](https://langfuse.com/docs/prompt-management/features/prompt-version-control)\\n- [Webhooks Slack Integrations](https://langfuse.com/docs/prompt-management/features/webhooks-slack-integrations)\\n- [Get Started](https://langfuse.com/docs/prompt-management/get-started)\\n- [Overview](https://langfuse.com/docs/prompt-management/overview)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/prompt-management/troubleshooting-and-faq)\\n- [Roadmap](https://langfuse.com/docs/roadmap)\\n- [Security And Guardrails](https://langfuse.com/docs/security-and-guardrails)\\n## Optional\\n- [Self Hosting](https://langfuse.com/self-hosting)\\n- [Administration](https://langfuse.com/self-hosting/administration)\\n- [Automated Access Provisioning](https://langfuse.com/self-hosting/administration/automated-access-provisioning)\\n- [Headless Initialization](https://langfuse.com/self-hosting/administration/headless-initialization)\\n- [Organization Creators](https://langfuse.com/self-hosting/administration/organization-creators)\\n- [Organization Management Api](https://langfuse.com/self-hosting/administration/organization-management-api)\\n- [Ui Customization](https://langfuse.com/self-hosting/administration/ui-customization)\\n- [Configuration](https://langfuse.com/self-hosting/configuration)\\n- [Backups](https://langfuse.com/self-hosting/configuration/backups)\\n- [Caching](https://langfuse.com/self-hosting/configuration/caching)\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"site\", \"url\": \"https://langfuse.com/changelog/2025-06-28-agentic-onboarding-and-docs-mcp\", \"title\": \"Agentic Onboarding & Docs MCP Server - Langfuse\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"---\\n\\n[TypeScript SDK v4 GA \\u2192Langfuse TypeScript SDK v4 is here \\u2192](/changelog/2025-08-28-typescript-sdk-v4-ga)\\n\\n---\\n\\n[HIRING](/careers)\\n[17K](https://github.com/langfuse/langfuse \\\"GitHub Repository\\\")\\n\\n---\\n\\n[\\u2190 Back to changelog](/changelog#2025-06-28-agentic-onboarding-and-docs-mcp)\\nJune 28, 2025\\n# Agentic Onboarding & Docs MCP Server\\n[Marc Klingen](https://twitter.com/marcklingen)\\nIntegrate Langfuse into your existing codebase using AI agents like Cursor, Claude Code, GitHub Copilot, and Windsurf. Powered by the new Langfuse Docs MCP server.\\n\\n---\\n\\nTo make the Langfuse docs more accessible to AI agents, we\\u2019ve added a new [MCP Server](/docs/docs-mcp). This server exposes relevant context from the Langfuse docs, GitHub Issues, and GitHub Discussions to your agent.\\n\\n---\\n\\nInstead of manually integrating Langfuse into your existing codebase, you can now use agents like Cursor, Claude Code, GitHub Copilot, and Windsurf to automatically add tracing to your LLM applications.\\n\\n---\\n\\nThank you [@JohnRichardEnders](https://github.com/JohnRichardEnders) for your contribution to this!\\n\\n---\\n\\n## Getting started\\n\\n---\\n\\nOn the [Get Started page](/docs/get-started), you\\u2019ll now find a new \\u201d\\u2728 Agentic\\u201d tab that provides:\\n\\n---\\n\\n  * One-click MCP server installation for popular editors\\n  * Step-by-step setup instructions for Cursor, GitHub Copilot in VSCode, Windsurf, and other MCP clients\\n  * A ready-to-use prompt that you can copy and paste into your agent\\n\\n---\\n\\nThe agent will automatically:\\n\\n---\\n\\n  * Detect which LLM libraries you\\u2019re using (OpenAI, Anthropic, LangChain, etc.)\\n  * Choose the appropriate Langfuse integration method\\n  * Add the necessary imports and configuration\\n  * Wrap your existing LLM calls with Langfuse tracing\\n\\n---\\n\\n## Try it out\\n\\n---\\n\"}, {\"type\": \"text\", \"text\": \"\\nThis feature is experimental, so results may vary depending on your codebase complexity. We\\u2019d love to hear your feedback and experiences on [GitHub](https://github.com/langfuse/langfuse/issues).\\n\\n---\\n\\n## Learn more\\n\\n---\\n\\n  * [Agentic Onboarding Guide](/docs/get-started)\\n  * [Langfuse Docs MCP Server](/docs/docs-mcp)\\n\\n---\\n\\nLast updated on June 30, 2025\\n\\n---\\n\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"github_issue\", \"url\": \"https://github.com/langfuse/langfuse/issues/12738\", \"title\": \"MCP Server: Support SSO/OIDC authentication as alternative to static API keys\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"Github Issue by @DrFaust92 created on March 23, 2026. The current state of the issue is: open\\n\\n## Feature Request\\n\\n### Problem\\n\\nThe current MCP server implementation only supports HTTP Basic Authentication with static project-scoped API key pairs (`pk-lf-xxx` / `sk-lf-xxx`). For self-hosted enterprise deployments, this poses challenges:\\n\\n- **No SSO integration** \\u2014 Teams cannot leverage their existing Identity Provider (IdP) for MCP client authentication\\n- **Static token management burden** \\u2014 API keys must be manually distributed, rotated, and revoked\\n- **Limited auditability** \\u2014 Requests are tied to API keys, not individual user identities\\n- **Security risk** \\u2014 Long-lived static tokens are a common target in credential theft scenarios\\n\\n### Proposed Solution\\n\\nAdd support for **OIDC/OAuth2-based authentication** for the MCP server endpoints, alongside the existing BasicAuth mechanism. This would allow self-hosted users to:\\n\\n1. Authenticate MCP clients via their existing IdP (Okta, Azure AD, Keycloak, etc.)\\n2. Map authenticated user identities to Langfuse project access\\n3. Eliminate static token distribution to end users\\n4. Get per-user audit trails for MCP operations\\n\\n### Suggested Approach\\n\\nThe MCP server architecture (`mcpServer.ts`, `transport.ts`, `core/validation.ts`) is already modular with a clear separation between authentication and server logic via `ServerContext`. A possible implementation:\\n\\n- Add an OIDC token validation path in the auth layer (alongside existing BasicAuth)\\n- Validate JWT bearer tokens against a configured OIDC issuer\\n- Map OIDC claims (e.g., groups/roles) to Langfuse project permissions\\n- Configuration via environment variables (`MCP_AUTH_OIDC_ISSUER`, `MCP_AUTH_OIDC_AUDIENCE`, etc.)\\n\\n### Current Workaround\\n\"}, {\"type\": \"text\", \"text\": \"\\nDeploying a reverse proxy (OAuth2 Proxy, Pomerium) in front of the MCP endpoint that handles SSO and injects BasicAuth headers. This works but adds operational complexity and doesn't provide per-user identity within Langfuse.\\n\\n### Environment\\n\\n- Self-hosted deployment\\n- Applies to the Streamable HTTP MCP transport at `/api/mcp`\\n---\\nComment #1 by @24na7igor:\\n\\nStatic API key pairs become a real bottleneck in enterprise self-hosted setups, especially when you need per-agent or per-environment scoping without rotating a single shared secret. One pattern worth considering: treat the MCP auth layer separately from the tracing ingestion auth. That way you can plug in OIDC/SAML at the MCP boundary while keeping the internal trace pipeline stable. The operational headache usually isn't the auth protocol itself but key rotation propagation across agent fleets. What's your current deployment topology, single instance or federated across teams?\\n---\\nComment #2 by @24na7igor:\\n\\nWorth noting that static API keys aren't just an auth ergonomics problem here. When you're running multiple agent pipelines hitting the same MCP server, rotating keys across environments without short-circuiting active sessions is the harder half of the problem. OIDC or service account tokens with short TTLs sidestep that rotation coupling entirely. We ran into this in a multi-tenant setup where key sprawl became the actual audit liability before the auth mechanism itself. What's your current strategy for key rotation across running agent sessions?\\n---\\nComment #3 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth vs mTLS) and credential scope (project-level vs user-level vs role-based). Static API key pairs break down fast in enterprise self-hosted setups not just because of security posture, but because rotation becomes a manual ops nightmare when you have 20+ agents hitting the same MCP server. One pattern that works well is short-lived tokens issued by your existing IdP with project claims embedded, so you get SSO compliance without changing the MCP surface. Are you running into this primarily because of an internal policy on credential rotation, or is it more about user-level attribution in the audit logs?\\n---\\nComment #4 by @24na7igor:\\n\\nWorth considering: static API keys at the MCP layer are usually just the surface problem. The deeper issue in self-hosted enterprise setups is that you need per-session identity propagation so your audit logs actually tie back to the human or agent that initiated the trace, not just 'which service connected.' OAuth/OIDC solves auth, but if the token context doesn't flow through to your trace metadata, you still can't answer 'who decided what and when' in a compliance review. Are you planning to carry the identity claims downstream into trace context, or just gate the connection?\\n---\\nComment #5 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth/OIDC) and token scoping. Static API keys break down fast in multi-tenant self-hosted setups not just because of rotation overhead but because you lose per-session auditability. One pattern that's worked well is short-lived JWT bearer tokens issued by your IdP, scoped to a session or agent run rather than the project. That way your auth logs give you a natural decision timeline per agent invocation. Are you hitting this mostly because of secret rotation policy, or is the auditability gap the bigger driver for your compliance team?\\n---\\nComment #6 by @24na7igor:\\n\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth vs mTLS) and credential scope. Static project-scoped keys are actually fine for many enterprise setups if you add key rotation and per-service scoping on top. The bigger pain in self-hosted ent deployments is usually audit trail around *which service used which key to trigger which action* \\u2014 Basic Auth with rotating short-lived tokens can satisfy most compliance requirements without the full OAuth dance. Have you mapped out which specific compliance framework is driving this requirement?\\n---\\nComment #7 by @24na7igor:\\n\\nWorth separating two distinct problems here: authentication (who is calling the MCP server) and authorization (what can they do once in). Static API keys fail both in enterprise contexts, but the harder one is usually authorization scope \\u2014 especially when multiple teams share one self-hosted instance and you need per-team audit trails, not just per-project keys. OIDC/SAML solves the authn side, but scoped service accounts with fine-grained resource policies solve the audit side. Have you mapped out what your compliance team actually needs to see in the access logs when something goes wrong?\\n---\"}, {\"type\": \"text\", \"text\": \"\\nComment #8 by @24na7igor:\\n\\nWorth considering: static API key pairs become a bottleneck not just for auth rotation but for audit trails too. When you have multiple services hitting the same MCP endpoint with the same key, you lose per-caller attribution in your logs. OIDC/JWT with short-lived tokens solves the rotation problem but also gives you a subject claim per caller for free. Have you mapped out how many distinct services or agents would be authenticating against this endpoint in your setup?\\n---\\nComment #9 by @24na7igor:\\n\\nWorth considering OAuth 2.0 client credentials flow here instead of just OIDC/SAML. The static API key problem in enterprise self-hosted setups usually isn't just about SSO identity federation, it's about key rotation and scoped service account access across multiple internal teams hitting the same instance. JWT-based service tokens with short TTLs solve the rotation problem without requiring a full IdP integration for every service-to-service call. Have you looked at whether your enterprise users are hitting this from a human auth path or machine-to-machine between internal services?\\n---\\nComment #10 by @24na7igor:\\n\\nWorth noting that static API keys at the MCP layer are actually a symptom of a deeper problem in self-hosted enterprise setups: you end up with a flat auth model that can't distinguish between agents, users, or services calling the same endpoint. OIDC/SAML federation helps, but the real win is per-caller identity so your audit logs can trace which principal triggered which trace. We ran into this trying to correlate agent decisions back to the service account that initiated them. Are you hitting this for compliance traceability specifically, or more for operational access control?\\n---\\nComment #11 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nStatic API keys on MCP servers become a real problem once you have multiple agent pipelines hitting the same Langfuse instance with different trust levels. One pattern worth considering: treat the MCP server as a service principal and layer short-lived tokens on top via your IdP (OIDC client credentials flow), rather than baking auth into the MCP spec itself. Keeps rotation out of your agent config entirely. Are you running multiple isolated agent environments against a single self-hosted instance, or is this more about key rotation/revocation velocity?\\n---\\nComment #12 by @24na7igor:\\n\\nWorth separating the auth layer concern here: static API key pairs per project become a real problem when you need per-agent identity and audit trails, not just access control. OIDC/JWT with short-lived tokens also lets you scope permissions per deployment environment without rotating long-lived secrets manually. The tricky part is usually the token refresh flow inside the MCP server lifecycle. Have you looked at how this intersects with your agent session boundaries, or is the main driver here human operator access?\\n---\\nComment #13 by @24na7igor:\\n\\nWorth considering: static API keys aren't just an auth UX problem in self-hosted enterprise setups. The deeper issue is that key rotation in prod agents is painful because the key is often baked into orchestration configs at deploy time, not resolved at runtime. OIDC or service account tokens with short TTLs solve this more cleanly than key pair management. One pattern I've seen work well is treating the MCP server as a resource server in an OAuth2 flow, where the agent runtime exchanges a scoped token per session. Are you targeting a specific IdP here, or looking for a more IdP-agnostic interface?\\n---\\nComment #14 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth *transport* (Basic vs OAuth vs mTLS) and auth *scope* (project-key vs user-token vs service-account). Most MCP implementations conflate them and end up rebuilding IAM from scratch. If you're targeting enterprise self-hosted, JWT with short-lived tokens + a token exchange endpoint is usually the path that satisfies both SSO requirements and audit log attribution without touching the core MCP protocol. What auth provider are they actually trying to integrate with, SAML-based SSO or something like OIDC?\\n---\\nComment #15 by @24na7igor:\\n\\nWorth separating two auth concerns here: identity (who is calling) vs. scope (what project/environment they can touch). Static API key pairs conflate both, which breaks down fast in multi-tenant or per-agent deployments. JWT with claims works well for identity, but you still need a way to bind a token to a specific trace context without leaking cross-tenant data through the MCP surface. Have you looked at how you'd handle token rotation mid-session without dropping in-flight trace continuity?\\n---\\nComment #16 by @24na7igor:\\n\\nWorth separating two concerns here: authn (who is calling) and authz (what they can see/do). Basic auth with static keys solves authn but makes authz coarse-grained. If you're moving toward OAuth or OIDC, you get scoped tokens for free, which lets you tie MCP access to existing RBAC roles rather than managing a parallel key namespace. One thing I'd think hard about: do you want the MCP server to be token-aware at the project level or the trace level? That changes the implementation significantly. What's your primary driver here, multi-tenant isolation or SSO/enterprise IdP integration?\\n---\\nComment #17 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs Bearer/JWT) and credential scope (project vs user vs service account). HTTP Basic with static keys breaks down fast in self-hosted enterprise because rotation becomes a manual coordination problem across multiple consumers. A token exchange pattern where short-lived JWTs are issued against a long-lived service identity tends to survive real SOC2 audits better than rotating static keys. Have you mapped out whether the primary driver is credential rotation policy or RBAC granularity at the MCP request level?\\n---\\nComment #18 by @24na7igor:\\n\\nWorth separating two distinct auth concerns here: identity (who is calling the MCP server) and authorization (what project/scope they can access). Basic auth with static keys conflates both, which is why rotating or scoping becomes painful. mTLS or short-lived JWT bearer tokens solve the identity layer cleanly and integrate better with most enterprise IdPs without requiring changes to the project key model itself. Have you looked at whether the MCP server sits behind an API gateway in your self-hosted setup, because that changes the implementation surface significantly?\\n---\\nComment #19 by @24na7igor:\\n\\nHave you considered using OAuth2 or JWTs for more dynamic authentication flows? Static API key pairs can be limiting and might pose security risks if mishandled. In a setup with evolving infrastructure, dynamic authentication is often more robust and scalable. Also, how do your current setups manage key rotation and revocation?\\n---\\nComment #20 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism and token scope. Even if you add OAuth or short-lived tokens, the real enterprise blocker is usually that a single compromised MCP session can exfiltrate trace data across all projects. Scoping tokens to specific trace IDs or time windows at the MCP layer (not just project level) gives you containment without rebuilding auth entirely. Have you looked at whether the current session model exposes cross-project data if a key is leaked?\\n---\\nComment #21 by @24na7igor:\\n\\nI've dealt with similar auth limitations. Consider segmenting your API keys by scope and applying rotation policies. This can help manage access control better and reduce risk. Another approach might be integrating OAuth2 for more granular control over permissions. Have you explored alternative auth mechanisms in similar scenarios before?\\n---\\nComment #22 by @24na7igor:\\n\\nConsider using token-based authentication as an alternative. It can enhance security by granting time-limited and scoped access, reducing the risks associated with static keys. This might also streamline the integration process for contributors who need varied access levels. Have you explored using OAuth2 for managing these access controls?\\n---\\nComment #23 by @24na7igor:\\n\\nHave you considered implementing OAuth2 for your MCP server? It scales better with multiple projects and user roles, offering more flexibility and security than static keys. It could also simplify token management across environments. How would you handle token expiration or refresh in your current setup?\\n---\\nComment #24 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nConsider leveraging OAuth 2.0 for a more scalable authentication solution. It allows for flexible token management and delegation, fitting nicely into environments requiring dynamic access controls. This might reduce the overhead of API key distribution and lifecycle management. Have you thought about the implications of transitioning to a more robust authentication protocol like OAuth?\\n---\\nComment #25 by @24na7igor:\\n\\nHave you considered using mutual TLS to improve authentication security in your self-hosted environment? It helps mitigate static key exposure by ensuring both client and server authentication. You may also look into rotating credentials automatically. How do you handle credential management in your current setup?\\n---\\nComment #26 by @24na7igor:\\n\\nHave you considered using OAuth 2.0 for token-based authentication in your MCP server? It might simplify key management by using time-limited access tokens instead of static API keys. This could also enhance security by enabling more granular permissions and reducing exposure to credential leaks. What kind of challenges have you faced when trying to implement more dynamic authorization methods?\\n---\\nComment #27 by @24na7igor:\\n\\nI see the challenge with using static API keys for authentication in a dynamic environment. One approach is to implement OAuth with token expiration to enhance security and flexibility over basic auth methods. Have you considered leveraging a token-based system for self-hosted deployments to minimize risk and improve scalability?\\n---\\nComment #28 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nHave you thought about using mutual TLS instead of static API keys? It provides strong client authentication and can massively improve security for self-hosted environments. Static keys are too easy to leak or misuse, especially in CI/CD pipelines. How are you planning to handle secrets in different environments?\\n---\\nComment #29 by @24na7igor:\\n\\nInteresting challenge you\\u2019ve laid out with the current MCP server\\u2019s reliance on static API keys for authentication. Have you explored the possibility of integrating OAuth2 for a more dynamic and secure authentication mechanism? Not only would it improve security, but it may also simplify scaling. Curious, what authentication flow did you envision for self-hosted environments?\\n---\\nComment #30 by @24na7igor:\\n\\nSwitching from HTTP Basic Auth to token-based auth could be a game changer for security and flexibility. Integrating OAuth2 or JWTs provides dynamic control over session-level access. Consider the added complexity in session management as an acceptable trade-off for enhanced security. Have you explored the overhead of maintaining session states?\\n---\\nComment #31 by @24na7igor:\\n\\nHandling authentication with static API key pairs is a security risk and limits flexibility, especially in dynamic environments. Consider leveraging OAuth2 or JWT for more robust, granular access control that can integrate with existing identity providers. How are you currently managing key rotations and revocations in your setup?\\n---\\nComment #32 by @24na7igor:\\n\\nHave you thought about adding OAuth 2.0 for enhanced security in self-hosted environments? It can offer token-based authentication that scales better and reduces the risk inherent in static API keys. How are you currently managing key rotation and endpoint security with your existing setup?\\n---\\nComment #33 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nHey @DrFaust92, have you considered using OAuth2 for more dynamic access control in your MCP server? It might offer better flexibility over static API keys, especially for self-hosted setups. Also, implementing token expiration could enhance security. How do you currently manage key rotation or invalidation?\\n---\\nComment #34 by @24na7igor:\\n\\nOne approach that could add flexibility while enhancing security is integrating OAuth2 with fine-grained token scopes. Each service agent could obtain scoped tokens dynamically, reducing reliance on static credentials prone to leakage. Have you considered token-based authentication that allows granular permissions for each action an agent can perform?\\n---\\nComment #35 by @24na7igor:\\n\\nConsider implementing token-based authentication with a dynamic token lifecycle. This will allow more granular access control and reduce the risk of API keys being compromised. It could integrate well with your existing permission structures while improving security. Did you explore more robust auth mechanisms for scaling and security beyond static pairs?\\n---\\nComment #36 by @24na7igor:\\n\\nHey @DrFaust92, something to think about: have you considered implementing OAuth 2.0 or JWTs for a more secure and scalable authentication system? Static API keys aren't the best when scaling or complying with stricter security norms. How are you managing key rotation in your current setup?\\n---\\nComment #37 by @24na7igor:\\n\"}], \"type\": \"content\"}}]}","metadata":{"id":"inkeep-chatcmpl-310ecef6-51bc-42b4-aa6d-ccf7c3843cb0","model":"inkeep-rag","choices":[{"finish_reason":"stop","log_probs":null,"index":0,"message":{"content":"{\"content\": [{\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/api-and-data-platform/features/mcp-server\", \"title\": \"Langfuse MCP Server\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"MCP Server - Langfuse\\n[Docs](/docs)\\n[API & Data Platform](/docs/api-and-data-platform/overview)\\n[Features](/docs/api-and-data-platform/features/agent-skill)\\n[MCP Server](/docs/api-and-data-platform/features/mcp-server)\\n# Langfuse MCP Server\\nLangfuse includes a native [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that enables AI assistants and agents to interact with your Langfuse data programmatically.\\nIf you have feedback or ideas for new tools, please [share them on GitHub](https://github.com/orgs/langfuse/discussions/10605).\\nIf you are running AI agents in an environment where you can install CLI tools and run bash commands, we recommend using the [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) instead of the MCP server.\\nThis is the authenticated MCP server for the Langfuse data platform. There is also a public MCP server for the Langfuse documentation ([docs](/docs/docs-mcp)).\\n## MCP Reference\\nThe [MCP Reference](https://mcp.reference.langfuse.com) is the canonical source for current Langfuse MCP servers, setup snippets, tools, input schemas, and generated request examples.\\n**Both read and write tools are available by default.** If you only want to use read-only tools, configure your MCP client with an allowlist to restrict access to write operations. For a full list of tools, see the [MCP Reference](https://mcp.reference.langfuse.com).\\n## Set up\\nThe Langfuse MCP server uses a stateless architecture where each API key is scoped to a specific project. Use the following configuration to connect to the MCP server:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n  * Endpoint: `https://cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://us.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\"}, {\"type\": \"text\", \"text\": \"\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://jp.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://hipaa.cloud.langfuse.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * Endpoint: `https://your-domain.com/api/public/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header\\n  * For reverse-proxy deployments, and when [Halo](/self-hosting/configuration/halo#langfuse-mcp)'s worker calls MCP via an internal Docker or Kubernetes hostname, make sure the public `Host` header is preserved, or set `LANGFUSE_MCP_ALLOWED_HOSTS` to a comma-separated list of exact additional hostnames or origins accepted by the MCP endpoint. Otherwise, you get a `403` error.\\n### Get Authentication Header\\n  1. Navigate to your project settings and create or copy a **project-scoped API key** : \\n    * Public Key: `pk-lf-...`\\n    * Secret Key: `sk-lf-...`\\n  2. Encode the credentials to base64 format: \\nyour-base64-token\\n    \\n```\\necho -n \\\"pk-lf-your-public-key:sk-lf-your-secret-key\\\" | base64\\n```\\n### Client Setup\\nClaude CodeCodexCursorPi AgentOther MCP Clients\\n  1. Register the Langfuse MCP server with a single command, replace `{your-base64-token}` with your encoded credentials:\\nterminal\\n    \\n```\\n///# Langfuse Cloud (EU)\\nclaude mcp add --transport http langfuse https://cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (US)\\nclaude mcp add --transport http langfuse https://us.cloud.langfuse.com/api/public/mcp \\\\\"}, {\"type\": \"text\", \"text\": \"\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (Japan)\\nclaude mcp add --transport http langfuse https://jp.cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Langfuse Cloud (HIPAA)\\nclaude mcp add --transport http langfuse https://hipaa.cloud.langfuse.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Self-Hosted (HTTPS required)\\nclaude mcp add --transport http langfuse https://your-domain.com/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n///# Local Development\\nclaude mcp add --transport http langfuse http://localhost:3000/api/public/mcp \\\\\\n --header \\\"Authorization: Basic {your-base64-token}\\\"\\n```\\n  2. Verify the connection by asking Claude Code to `list all prompts in the project`. Claude Code should use the `listPrompts` tool to return the list of prompts.\\n  1. Add the Langfuse MCP server to `~/.codex/config.toml`, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://us.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\"}, {\"type\": \"text\", \"text\": \"\\n~/.codex/config.toml\\n    \\n    \\n```\\n[mcp_servers.langfuse]\\nurl = \\\"https://your-domain.com/api/public/mcp\\\"\\nhttp_headers = { \\\"Authorization\\\" = \\\"Basic {your-base64-token}\\\" }\\n```\\n  2. Restart Codex and run `codex mcp list` to confirm the server is registered.\\n  3. Verify the connection by asking Codex to `list all prompts in the project`. Codex should use the `listPrompts` tool to return the list of prompts.\\n  1. Open Cursor Settings (`Cmd/Ctrl + Shift + J`)\\n  2. Navigate to **Tools & Integrations** tab\\n  3. Click **\\\"Add Custom MCP\\\"**\\n  4. Add your Langfuse MCP server configuration, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://us.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\nmcp.json\\n    \\n    \\n```\\n{\\n \\\"mcp\\\": {\\n \\\"servers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://your-domain.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n }\\n}\\n```\\n  5. Save the file and restart Cursor\\n  6. The server should appear in the MCP settings with a green dot indicating it's active\"}, {\"type\": \"text\", \"text\": \"\\n[Pi](https://pi.dev) does not ship with built-in MCP support. Use the community-maintained [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) extension, which exposes MCP servers to Pi through a single proxy tool.\\n  1. Install the extension and restart Pi:\\n    \\n```\\npi install npm:pi-mcp-adapter\\n```\\n  2. Add the Langfuse MCP server to `~/.pi/agent/mcp.json`, replace `{your-base64-token}` with your encoded credentials:\\nCloud EUCloud USCloud JapanHIPAA USSelf-Hosted\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://us.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://jp.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://hipaa.cloud.langfuse.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n~/.pi/agent/mcp.json\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse\\\": {\\n \\\"url\\\": \\\"https://your-domain.com/api/public/mcp\\\",\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic {your-base64-token}\\\"\\n }\\n }\\n }\\n}\\n```\\n  3. Restart Pi and verify the connection by asking Pi to `list all prompts in the project`. Pi should use the `listPrompts` tool via the MCP proxy to return the list of prompts.\\n  * Transport: `streamableHttp`\\n  * Authentication: Basic Auth via authorization header \\n    * `Authorization: Basic {your-base64-token}`\"}, {\"type\": \"text\", \"text\": \"\\n## Filter logical root observations\\nThe observation tools distinguish logical roots from physical parentage:\\n  * `listObservations` accepts the optional boolean `isRootObservation` filter. Set it to `true` to match observations without a physical parent or observations explicitly marked as application roots by the SDK.\\n  * Physical-parent filtering remains separate. An application-root observation can match `isRootObservation: true` even when it has a physical parent.\\n  * `isRootObservation` is included in the default observation fields returned by `listObservations`.\\n  * `getObservationFilterValues` supports `isRootObservation` as a filter-value column, so you can discover and combine logical-root values with other observation filters.\\nFor the complete tool schemas and request examples, see the [MCP Reference](https://mcp.reference.langfuse.com).\\n## Feedback\\nWe'd love to hear about your experience with the Langfuse MCP server. Share your feedback, ideas, and use cases in our [GitHub Discussion](https://github.com/orgs/langfuse/discussions/10605).\\n## Related Documentation\\n  * [MCP Reference](https://mcp.reference.langfuse.com) \\\\- Reference for MCP servers, setup snippets, tools, schemas, and requests\\n  * [Agentic Prompt Management](/docs/prompt-management/features/agentic-access) \\\\- Use agents to retrieve, create, migrate, and update prompts\\n  * [Prompt Management Overview](/docs/prompt-management/overview) \\\\- Learn about Langfuse prompt management\\n  * [Public API](/docs/api-and-data-platform/features/public-api) \\\\- REST API for programmatic access\\n  * [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) \\\\- Use Langfuse features from your coding agent\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/docs-mcp\", \"title\": \"Langfuse Docs MCP Server\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"Docs MCP Server - Langfuse\\n[Docs](/docs)\\n[Docs MCP Server](/docs/docs-mcp)\\n# Langfuse Docs MCP Server\\nThe Langfuse Docs MCP server exposes the Langfuse docs to AI agents.\\nCore use case: Use Cursor (or other AI Coding Agent) to automatically integrate Langfuse Tracing into your codebase, see [get started](/docs/get-started) for detailed instructions and an example prompt.\\nThis is the public MCP server for the Langfuse documentation. There is also an authenticated MCP server to integrate with the rest of the Langfuse data platform ([docs](/docs/api-and-data-platform/features/mcp-server)).\\n### Pair with the Agent Skill\\nYou'll get better results when your agent also has the [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill) installed, next to the MCP server.\\nInstall it from [GitHub](https://github.com/langfuse/skills) or follow the [Agent Skill setup](/docs/api-and-data-platform/features/agent-skill).\\n## Install\\nClaude CodeCodexCursorWindsurfCopilot (in VSCode)Other MCP Clients\\nAdd Langfuse Docs MCP to Claude Code via the CLI:\\n    \\n    \\n```\\nclaude mcp add \\\\\\n --transport http \\\\\\n langfuse-docs \\\\\\n https://langfuse.com/api/mcp \\\\\\n --scope user\\n```\\nManual configuration\\nAlternatively, add the following to your settings file:\\n  * **User scope** : `~/.claude/settings.json`\\n  * **Project scope** : `your-repo/.claude/settings.json`\\n  * **Local scope** : `your-repo/.claude/settings.local.json`\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"transportType\\\": \\\"http\\\",\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\",\\n \\\"verifySsl\\\": true\\n }\\n }\\n}\\n```\\n **One-liner JSON import**\\n    \\n    \\n```\\nclaude mcp add-json langfuse-docs \\\\\\n '{\\\"type\\\":\\\"http\\\",\\\"url\\\":\\\"https://langfuse.com/api/mcp\\\"}'\\n```\\nOnce added, start a Claude Code session (`claude`) and type `/mcp` to confirm the connection.\\nAdd Langfuse Docs MCP to Codex via the CLI:\\n    \\n    \\n```\\ncodex mcp add langfuse-docs --url https://langfuse.com/api/mcp\\n```\\nManual configuration\"}, {\"type\": \"text\", \"text\": \"\\nAlternatively, add the following to `~/.codex/config.toml`:\\n    \\n    \\n```\\n[mcp_servers.langfuse-docs]\\nurl = \\\"https://langfuse.com/api/mcp\\\"\\n```\\nStart a new Codex session, then run `codex mcp list` to confirm the server is registered.\\nAdd Langfuse Docs MCP to Cursor via the one-click install:\\n[Install MCP Server in Cursor\\n](https://cursor.com/en/install-mcp?name=langfuse-docs&config=eyJ1cmwiOiJodHRwczovL2xhbmdmdXNlLmNvbS9hcGkvbWNwIn0%3D)\\nManual configuration\\nAdd the following to your `mcp.json`:\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\"\\n }\\n }\\n}\\n```\\nAdd Langfuse Docs MCP to Windsurf via the following steps:\\n  1. Open Command Palette (\\u2318+Shift+P)\\n  2. Open \\\"MCP Configuration Panel\\\"\\n  3. Select `Add custom server`\\n  4. Add the following configuration:\\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"command\\\": \\\"npx\\\",\\n \\\"args\\\": [\\\"mcp-remote\\\", \\\"https://langfuse.com/api/mcp\\\"]\\n }\\n }\\n}\\n```\\nAdd Langfuse Docs MCP to Copilot in VSCode via the one-click install:\\n[Install MCP Server in VS Code\\n](vscode:mcp/install?%7B%22name%22%3A%22langfuse-docs%22%2C%22url%22%3A%22https%3A%2F%2Flangfuse.com%2Fapi%2Fmcp%22%7D)\\nManual configuration\\nAdd Langfuse Docs MCP to Copilot in VSCode via the following steps:\\n  1. Open Command Palette (\\u2318+Shift+P)\\n  2. Open \\\"MCP: Add Server...\\\"\\n  3. Select `HTTP`\\n  4. Paste `https://langfuse.com/api/mcp`\\n  5. Select name (e.g. `langfuse-docs`) and whether to save in user or workspace settings\\n  6. You're all set! The MCP server is now available in Agent mode\\nLangfuse uses the `streamableHttp` protocol to communicate with the MCP server. This is supported by most clients.\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\"}, {\"type\": \"text\", \"text\": \"\\n \\\"url\\\": \\\"https://langfuse.com/api/mcp\\\"\\n }\\n }\\n}\\n```\\nIf you use a client that does not support `streamableHttp` (e.g. Windsurf), you can use the `mcp-remote` command as a local proxy.\\n    \\n    \\n```\\n{\\n \\\"mcpServers\\\": {\\n \\\"langfuse-docs\\\": {\\n \\\"command\\\": \\\"npx\\\",\\n \\\"args\\\": [\\\"mcp-remote\\\", \\\"https://langfuse.com/api/mcp\\\"]\\n }\\n }\\n}\\n```\\n## About\\n  * Endpoint: `https://langfuse.com/api/mcp`\\n  * Transport: `streamableHttp`\\n  * Authentication: None\\nThe [MCP Reference](https://mcp.reference.langfuse.com) is the canonical source for current Docs MCP tools, input schemas, and generated request examples.\\n## References\\n  * Implementation of the MCP server: [route.ts](https://github.com/langfuse/langfuse-docs/blob/main/app/api/mcp/route.ts)\\n  * [MCP Reference](https://mcp.reference.langfuse.com): reference for MCP servers, setup snippets, tools, schemas, and requests\\n  * [Langfuse Agent Skill](/docs/api-and-data-platform/features/agent-skill): playbook that teaches coding agents how to use the Docs MCP server\\n  * [Agentic Onboarding](/docs/get-started) powered by the MCP server\\n  * [Ask AI](/docs/ask-ai): RAG chat with the Langfuse docs to get answers to your questions\\n  * [langfuse.com/llms.txt](https://langfuse.com/llms.txt): concise overview with page titles and links to detailed sub-files ([llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt))\\n## REST Endpoint\\nThe underlying docs search (`searchLangfuseDocs` tool) is also available independently as a REST API at `https://langfuse.com/api/search-docs`.\\n    \\n    \\n```\"}, {\"type\": \"text\", \"text\": \"\\ncurl \\\"https://langfuse.com/api/search-docs?query=Langfuse+Docs+MCP+Server\\\"\\n```\\nUse this endpoint directly when you need lightweight semantic search outside of MCP.\\n## WebMCP\\nlangfuse.com also registers the read-only docs tools (`searchLangfuseDocs`, `getLangfuseDocsPage`, `getLangfuseOverview`) with [WebMCP](https://github.com/webmachinelearning/webmcp). Browser agents can call them on any page of the site without connecting to the MCP endpoint. `submitFeedback` is only available through the MCP server.\\nWebMCP is an early web standard. Only browsers and agents that implement it see the tools; see the [implementation status](https://github.com/webmachinelearning/webmcp/blob/main/implementation-status.md).\\n* * *\\n* * *\\nLast updated on 10/30/2026\\n\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/metrics/features/custom-dashboards\", \"title\": \"Custom Dashboards\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"\\n  * **MCP server** : The [Langfuse MCP server](/docs/api-and-data-platform/features/mcp-server) exposes the same operations as tools, letting AI agents build and edit dashboards with human-in-the-loop approval for changes. The same tools power [Halo](/docs/api-and-data-platform/features/halo), the Langfuse assistant, in the UI.\\nThese endpoints and MCP tools are **unstable** and may change while the dashboard and widget contract is being finalized.\\n\\n## Use Cases and Examples\\n### Production Monitoring Dashboard\\nMonitor the health and performance of your LLM application in real-time:\\n  * **Error Rate Tracking** : Monitor failed requests and error patterns\\n  * **Latency Analysis** : Track P95 and P99 response times across different endpoints\\n  * **Throughput Monitoring** : Visualize request volume and capacity utilization\\n  * **Model Performance** : Compare accuracy and quality metrics across model versions\\n  * **Tool Usage & Latency**: Track how often each external tool (e.g. API calls, database queries) is invoked and its latency\\n### Cost Optimization Dashboard\\nUnderstand and optimize your LLM usage costs:\\n  * **Token Usage Trends** : Track input/output token consumption over time\\n  * **Cost per User** : Identify high-usage users and optimize pricing strategies\\n  * **Model Cost Comparison** : Compare costs across different LLM providers and models\\n  * **Feature Cost Analysis** : Understand which application features drive the highest costs\\n### Quality and User Experience Dashboard\\nMonitor the quality and user satisfaction of your LLM application:\\n  * **User Feedback Trends** : Track thumbs up/down ratings and detailed feedback\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"documentation\", \"url\": \"https://langfuse.com/docs/metrics/features/custom-dashboards\", \"title\": \"Custom Dashboards\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"\\n### Data Export and Integration\\nDashboards > Langfuse Cost Dashboard. Open the \\u201c\\u22ef\\u201d menu of the \\u201cTotal costs\\u201d widget and click \\u201cDownload data as CSV\\u201d.\\nExport your dashboard data for further analysis or integration with external tools. See the [Export Data](/docs/api-and-data-platform/overview) guide for comprehensive export options including:\\n  * CSV export of dashboard data\\n  * Integration with external analytics tools\\n  * Programmatic access via the [Metrics API](/docs/metrics/features/metrics-api)\\n### Manage Dashboards via API, CLI, and MCP\\nBeyond the dashboard editor in the UI, you can create and manage dashboards, their tile placements, and reusable widgets programmatically:\\n  * **Public API** : Endpoints under `/api/public/unstable` cover dashboards, placements, and widgets. See the [dashboards](https://api.reference.langfuse.com/#tag/unstabledashboards) and [dashboard widgets](https://api.reference.langfuse.com/#tag/unstabledashboardwidgets) API references.\\n  * **Langfuse CLI** : The [CLI](/docs/api-and-data-platform/features/cli) picks up these endpoints automatically, so you can keep dashboard definitions in version control and apply them across projects and environments.\\n  * **MCP server** : The [Langfuse MCP server](/docs/api-and-data-platform/features/mcp-server) exposes the same operations as tools, letting AI agents build and edit dashboards with human-in-the-loop approval for changes. The same tools power [Halo](/docs/api-and-data-platform/features/halo), the Langfuse assistant, in the UI.\\nThese endpoints and MCP tools are **unstable** and may change while the dashboard and widget contract is being finalized.\"}, {\"type\": \"text\", \"text\": \"\\n## Use Cases and Examples\\n### Production Monitoring Dashboard\\nMonitor the health and performance of your LLM application in real-time:\\n  * **Error Rate Tracking** : Monitor failed requests and error patterns\\n  * **Latency Analysis** : Track P95 and P99 response times across different endpoints\\n  * **Throughput Monitoring** : Visualize request volume and capacity utilization\\n  * **Model Performance** : Compare accuracy and quality metrics across model versions\\n  * **Tool Usage & Latency**: Track how often each external tool (e.g. API calls, database queries) is invoked and its latency\\n### Cost Optimization Dashboard\\nUnderstand and optimize your LLM usage costs:\\n  * **Token Usage Trends** : Track input/output token consumption over time\\n  * **Cost per User** : Identify high-usage users and optimize pricing strategies\\n  * **Model Cost Comparison** : Compare costs across different LLM providers and models\\n  * **Feature Cost Analysis** : Understand which application features drive the highest costs\\n### Quality and User Experience Dashboard\\nMonitor the quality and user satisfaction of your LLM application:\\n  * **User Feedback Trends** : Track thumbs up/down ratings and detailed feedback\\n  * **Score Distribution** : Visualize the distribution of quality scores over time\\n  * **User Behavior Analysis** : Understand how users interact with different features\\n  * **A/B Test Results** : Compare quality metrics between different model versions or prompts\\n## GitHub Discussions\"}, {\"type\": \"text\", \"text\": \"\\n[Feature Request: Advanced Customization for Dashboards (Custom Links, Custom Layouts, and Tabular Operational Metrics)](https://github.com/orgs/langfuse/discussions/15293 \\\"Langfuse Ideas: Feature Request: Advanced Customization for Dashboards \\\\(Custom Links, Custom Layouts, and Tabular Operational Metrics\\\\)\\\")\\n[Dashboard widget / metrics: count sessions with trace count > N](https://github.com/orgs/langfuse/discussions/13729 \\\"Langfuse Ideas: Dashboard widget / metrics: count sessions with trace count > N\\\")\\n[Ability to filter cache creation/read tokens in the Dashboard](https://github.com/orgs/langfuse/discussions/12016 \\\"Langfuse Ideas: Ability to filter cache creation/read tokens in the Dashboard\\\")\\n[Organization Consumption Chart](https://github.com/orgs/langfuse/discussions/11748 \\\"Langfuse Ideas: Organization Consumption Chart\\\")\\n[Ability to display scores by prompt in Dashboard like in prompt metrics](https://github.com/orgs/langfuse/discussions/11732 \\\"Langfuse Ideas: Ability to display scores by prompt in Dashboard like in prompt metrics\\\")\\n[Add \\\"Sessions\\\" as a Data Source in Dashboard Widgets](https://github.com/orgs/langfuse/discussions/11707 \\\"Langfuse Ideas: Add \\\"Sessions\\\" as a Data Source in Dashboard Widgets\\\")\\n[Output (when structured) as Dimension for Dashboarding](https://github.com/orgs/langfuse/discussions/11690 \\\"Langfuse Ideas: Output \\\\(when structured\\\\) as Dimension for Dashboarding\\\")\\n[Can give slicing options and filters on dashboard.](https://github.com/orgs/langfuse/discussions/11608 \\\"Langfuse Ideas: Can give slicing options and filters on dashboard.\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Organization usage & uptake analytics (adoption insights)](https://github.com/orgs/langfuse/discussions/11469 \\\"Langfuse Ideas: Organization usage & uptake analytics \\\\(adoption insights\\\\)\\\")\\n[Add option to show TTFT in Model Latencies chart on the Home Page](https://github.com/orgs/langfuse/discussions/11433 \\\"Langfuse Ideas: Add option to show TTFT in Model Latencies chart on the Home Page\\\")\\n[Aggregate unique tags per trace (independent tag counting) for charts](https://github.com/orgs/langfuse/discussions/11424 \\\"Langfuse Ideas: Aggregate unique tags per trace \\\\(independent tag counting\\\\) for charts\\\")\\n[Dashboard visibility into public API usage](https://github.com/orgs/langfuse/discussions/11410 \\\"Langfuse Ideas: Dashboard visibility into public API usage\\\")\\n[Tool Evaluation & Analytics](https://github.com/orgs/langfuse/discussions/11289 \\\"Langfuse Ideas: Tool Evaluation & Analytics\\\")\\n[Easier way to duplicate widgets on Dashboards](https://github.com/orgs/langfuse/discussions/11105 \\\"Langfuse Ideas: Easier way to duplicate widgets on Dashboards\\\")\\n[Trace Success and Failure Rate Chart](https://github.com/orgs/langfuse/discussions/11099 \\\"Langfuse Ideas: Trace Success and Failure Rate Chart\\\")\\n[[Feature Request/Discussion] Dashboard Analytics Roadmap: Complex Joins & Raw SQL Editor](https://github.com/orgs/langfuse/discussions/10971 \\\"Langfuse Ideas: \\\\[Feature Request/Discussion\\\\] Dashboard Analytics Roadmap: Complex Joins & Raw SQL Editor\\\")\\n[Allow Line-Chart X-Axis to Use Day-Level Labels Instead of Date+Time](https://github.com/orgs/langfuse/discussions/10858 \\\"Langfuse Ideas: Allow Line-Chart X-Axis to Use Day-Level Labels Instead of Date+Time\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Home Dashboard Charts: Control time aggregation / bucketing (to make data meaningful)](https://github.com/orgs/langfuse/discussions/10840 \\\"Langfuse Ideas: Home Dashboard Charts: Control time aggregation / bucketing \\\\(to make data meaningful\\\\)\\\")\\n[Allow Trace Metadata Fields to be Used as Dashboard Widget Dimensions (Axis & Breakdown)](https://github.com/orgs/langfuse/discussions/10833 \\\"Langfuse Ideas: Allow Trace Metadata Fields to be Used as Dashboard Widget Dimensions \\\\(Axis & Breakdown\\\\)\\\")\\n[Persist Dashboard Filters or Implement \\\"Saved Views\\\"](https://github.com/orgs/langfuse/discussions/10714 \\\"Langfuse Ideas: Persist Dashboard Filters or Implement \\\"Saved Views\\\"\\\")\\n[I need a graph that shows me my aggregated cost by prompt and not by model in my dashboard.](https://github.com/orgs/langfuse/discussions/10615 \\\"Langfuse Ideas: I need a graph that shows me my aggregated cost by prompt and not by model in my dashboard.\\\")\\n[Dashboard: allow for custom styling and colors of dashboard widgets](https://github.com/orgs/langfuse/discussions/10596 \\\"Langfuse Ideas: Dashboard: allow for custom styling and colors of dashboard widgets\\\")\\n[Add OR logic between filter groups in Dashboard and Widget filters](https://github.com/orgs/langfuse/discussions/10383 \\\"Langfuse Ideas: Add OR logic between filter groups in Dashboard and Widget filters\\\")\\n[session score inherits user_id](https://github.com/orgs/langfuse/discussions/10193 \\\"Langfuse Ideas: session score inherits user_id\\\")\\n[Add total results count to Scores and Traces views](https://github.com/orgs/langfuse/discussions/10132 \\\"Langfuse Ideas: Add total results count to Scores and Traces views\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[advanced widget creation](https://github.com/orgs/langfuse/discussions/10108 \\\"Langfuse Ideas: advanced widget creation\\\")\\n[Error Rate Metric](https://github.com/orgs/langfuse/discussions/10106 \\\"Langfuse Ideas: Error Rate Metric\\\")\\n[More flexible and exportable dashboards](https://github.com/orgs/langfuse/discussions/9860 \\\"Langfuse Ideas: More flexible and exportable dashboards\\\")\\n[Dashboard: Metrics deep link to trace/observation/scores table](https://github.com/orgs/langfuse/discussions/9695 \\\"Langfuse Ideas: Dashboard: Metrics deep link to trace/observation/scores table\\\")\\n[Dashboards: null values are plotted identically to 0 values.](https://github.com/orgs/langfuse/discussions/9650 \\\"Langfuse Ideas: Dashboards: null values are plotted identically to 0 values.\\\")\\n[request: dashboard filters should behave like trace filters and add query params to url](https://github.com/orgs/langfuse/discussions/9557 \\\"Langfuse Ideas: request: dashboard filters should behave like trace filters and add query params to url\\\")\\n[Dashboard widget: Break usage down by type](https://github.com/orgs/langfuse/discussions/9519 \\\"Langfuse Ideas: Dashboard widget: Break usage down by type\\\")\\n[Feature Request: Organization-level trace visibility](https://github.com/orgs/langfuse/discussions/9428 \\\"Langfuse Ideas: Feature Request: Organization-level trace visibility\\\")\\n[Dashboard Widgets: Break down by Week](https://github.com/orgs/langfuse/discussions/9417 \\\"Langfuse Ideas: Dashboard Widgets: Break down by Week\\\")\\n[[Feature Request] Dataset with more flexible views](https://github.com/orgs/langfuse/discussions/9266 \\\"Langfuse Ideas: \\\\[Feature Request\\\\] Dataset with more flexible views\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Being able to breakdown by metadata in dashboards](https://github.com/orgs/langfuse/discussions/9079 \\\"Langfuse Ideas: Being able to breakdown by metadata in dashboards\\\")\\n[Filter/chart by cached tokens in dashboard builder](https://github.com/orgs/langfuse/discussions/9025 \\\"Langfuse Ideas: Filter/chart by cached tokens in dashboard builder\\\")\\n[Metadata values as new Widget Breakdown Dimension](https://github.com/orgs/langfuse/discussions/8971 \\\"Langfuse Ideas: Metadata values as new Widget Breakdown Dimension\\\")\\n[Dashboards and Widgets via API](https://github.com/orgs/langfuse/discussions/8819 \\\"Langfuse Ideas: Dashboards and Widgets via API\\\")\\n[Dashboard feature suggestions (Comparison, Altering, Metadata Grouping)](https://github.com/orgs/langfuse/discussions/8729 \\\"Langfuse Ideas: Dashboard feature suggestions \\\\(Comparison, Altering, Metadata Grouping\\\\)\\\")\\n[Support percentage metric for custom widget: show what proportion of total falls into a selected range](https://github.com/orgs/langfuse/discussions/8691 \\\"Langfuse Ideas: Support percentage metric for custom widget: show what proportion of total falls into a selected range\\\")\\n[Dashboards: Replicate Dashboard Components in other Langfuse Projects](https://github.com/orgs/langfuse/discussions/8663 \\\"Langfuse Ideas: Dashboards: Replicate Dashboard Components in other Langfuse Projects\\\")\\n[Dashboard Pie Chart Widget: Permanently show legend](https://github.com/orgs/langfuse/discussions/8660 \\\"Langfuse Ideas: Dashboard Pie Chart Widget: Permanently show legend\\\")\\n[Better Widgets - Legends, Data Labels, etc](https://github.com/orgs/langfuse/discussions/8483 \\\"Langfuse Ideas: Better Widgets - Legends, Data Labels, etc\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Dashboard: Big number count for total users (and sessions)](https://github.com/orgs/langfuse/discussions/8468 \\\"Langfuse Ideas: Dashboard: Big number count for total users \\\\(and sessions\\\\)\\\")\\n[Dashboard OR for Multiple Filters](https://github.com/orgs/langfuse/discussions/8407 \\\"Langfuse Ideas: Dashboard OR for Multiple Filters\\\")\\n[Capture all filters in URL](https://github.com/orgs/langfuse/discussions/8271 \\\"Langfuse Ideas: Capture all filters in URL\\\")\\n[Add Support for Scatter Plot as a Chart Type](https://github.com/orgs/langfuse/discussions/8161 \\\"Langfuse Ideas: Add Support for Scatter Plot as a Chart Type\\\")\\n[Shareable link to the dashboard](https://github.com/orgs/langfuse/discussions/8065 \\\"Langfuse Ideas: Shareable link to the dashboard\\\")\\n[Dashboard Widget: Break down by Generation Input / Output](https://github.com/orgs/langfuse/discussions/8023 \\\"Langfuse Ideas: Dashboard Widget: Break down by Generation Input / Output\\\")\\n[Allow session-duration filters in custom dashboards](https://github.com/orgs/langfuse/discussions/7999 \\\"Langfuse Ideas: Allow session-duration filters in custom dashboards\\\")\\n[feat (dashboards) : Add Session in view data selection](https://github.com/orgs/langfuse/discussions/7881 \\\"Langfuse Ideas: feat \\\\(dashboards\\\\) : Add Session in view data selection\\\")\\n[feat(dashboards): support aggregation and filtering of session-level scores by trace-level properties](https://github.com/orgs/langfuse/discussions/7803 \\\"Langfuse Ideas: feat\\\\(dashboards\\\\): support aggregation and filtering of session-level scores by trace-level properties\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[[Langfuse Cloud] Ability to duplicate/fork a widget](https://github.com/orgs/langfuse/discussions/7788 \\\"Langfuse Ideas: \\\\[Langfuse Cloud\\\\] Ability to duplicate/fork a widget\\\")\\n[Add option to breakdown by metadata in widgets](https://github.com/orgs/langfuse/discussions/7755 \\\"Langfuse Ideas: Add option to breakdown by metadata in widgets\\\")\\n[Dashboards for error tracking](https://github.com/orgs/langfuse/discussions/7426 \\\"Langfuse Ideas: Dashboards for error tracking\\\")\\n[Implement User Customizable Dashboard Views with ClickHouse Query Transformer](https://github.com/orgs/langfuse/discussions/7372 \\\"Langfuse Ideas: Implement User Customizable Dashboard Views with ClickHouse Query Transformer\\\")\\n[Time spent by user](https://github.com/orgs/langfuse/discussions/7189 \\\"Langfuse Ideas: Time spent by user\\\")\\n[Add ability to filter by date range](https://github.com/orgs/langfuse/discussions/7070 \\\"Langfuse Ideas: Add ability to filter by date range\\\")\\n[Trace cost percentiles](https://github.com/orgs/langfuse/discussions/6812 \\\"Langfuse Ideas: Trace cost percentiles\\\")\\n[average trace latency](https://github.com/orgs/langfuse/discussions/6769 \\\"Langfuse Ideas: average trace latency\\\")\\n[Allow *OR* condition on filters](https://github.com/orgs/langfuse/discussions/6689 \\\"Langfuse Ideas: Allow *OR* condition on filters\\\")\\n[Dashboard: Breakdown per additional dimensions (e.g. tag-based or using custom columns)](https://github.com/orgs/langfuse/discussions/6675 \\\"Langfuse Ideas: Dashboard: Breakdown per additional dimensions \\\\(e.g. tag-based or using custom columns\\\\)\\\")\\n[[Custom Dashboard] - Display % run pass block in DIfy](https://github.com/orgs/langfuse/discussions/6582 \\\"Langfuse Ideas: \\\\[Custom Dashboard\\\\] - Display % run pass block in DIfy\\\")\"}, {\"type\": \"text\", \"text\": \"\\n[Possible to add metadata fields in dashboard filters](https://github.com/orgs/langfuse/discussions/6564 \\\"Langfuse Ideas: Possible to add metadata fields in dashboard filters\\\")\\n[Add more filter options to the dashboard](https://github.com/orgs/langfuse/discussions/6487 \\\"Langfuse Ideas: Add more filter options to the dashboard\\\")\\n[allow custom dashboard which can be share with secure link](https://github.com/orgs/langfuse/discussions/6425 \\\"Langfuse Ideas: allow custom dashboard which can be share with secure link\\\")\\n[Adding filter to Scores Analytics](https://github.com/orgs/langfuse/discussions/6243 \\\"Langfuse Ideas: Adding filter to Scores Analytics\\\")\\n[Add Session Duration Metric to Dashboard](https://github.com/orgs/langfuse/discussions/5981 \\\"Langfuse Ideas: Add Session Duration Metric to Dashboard\\\")\\n[dashboard improvement ideas](https://github.com/orgs/langfuse/discussions/5829 \\\"Langfuse Ideas: dashboard improvement ideas\\\")\\n[Add chart for cost tracking by any metadata item. for example merchantName so we can keep track of who is using how much.](https://github.com/orgs/langfuse/discussions/5701 \\\"Langfuse Ideas: Add chart for cost tracking by any metadata item. for example merchantName so we can keep track of who is using how much.\\\")\\n[Support Metadata Filtering within the Dashboards](https://github.com/orgs/langfuse/discussions/5627 \\\"Langfuse Ideas: Support Metadata Filtering within the Dashboards\\\")\\n[chart request - mirror score functionality but after filtering within trace or observation panes](https://github.com/orgs/langfuse/discussions/5426 \\\"Langfuse Ideas: chart request - mirror score functionality but after filtering within trace or observation panes\\\")\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"site\", \"url\": \"https://langfuse.com/llms.txt\", \"title\": \"\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"---\\n\\n    \\n    \\n```\\n///# Langfuse\\n> Langfuse is an **open-source LLM engineering platform** ([GitHub](https://github.com/langfuse/langfuse)) that helps teams collaboratively debug, analyze, and iterate on their LLM applications. All platform features are natively integrated to accelerate the development workflow.\\n## Langfuse Docs MCP Server\\nConnect to the Langfuse Docs MCP server to access documentation directly in your AI editor:\\n- **Endpoint**: `https://langfuse.com/api/mcp`\\n- **Transport**: `streamableHttp`\\n- **Documentation**: [Langfuse Docs MCP Server](https://langfuse.com/docs/docs-mcp)\\nThe MCP server provides tools to search Langfuse documentation, GitHub issues, and discussions. See the [installation guide](https://langfuse.com/docs/docs-mcp) for setup instructions in Cursor, VS Code, Claude Desktop, and other MCP clients.\\n## Docs\\n- [Docs](https://langfuse.com/docs)\\n- [Audit Logs](https://langfuse.com/docs/administration/audit-logs)\\n- [Authentication And Sso](https://langfuse.com/docs/administration/authentication-and-sso)\\n- [Data Deletion](https://langfuse.com/docs/administration/data-deletion)\\n- [Data Retention](https://langfuse.com/docs/administration/data-retention)\\n- [Llm Connection](https://langfuse.com/docs/administration/llm-connection)\\n- [Rbac](https://langfuse.com/docs/administration/rbac)\\n- [Scim And Org Api](https://langfuse.com/docs/administration/scim-and-org-api)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/administration/troubleshooting-and-faq)\\n- [Usage Alerts](https://langfuse.com/docs/administration/usage-alerts)\\n- [Export From Ui](https://langfuse.com/docs/api-and-data-platform/features/export-from-ui)\\n- [Export To Blob Storage](https://langfuse.com/docs/api-and-data-platform/features/export-to-blob-storage)\\n- [Fine Tuning](https://langfuse.com/docs/api-and-data-platform/features/fine-tuning)\"}, {\"type\": \"text\", \"text\": \"\\n- [Public Api](https://langfuse.com/docs/api-and-data-platform/features/public-api)\\n- [Query Via Sdk](https://langfuse.com/docs/api-and-data-platform/features/query-via-sdk)\\n- [Overview](https://langfuse.com/docs/api-and-data-platform/overview)\\n- [Ask Ai](https://langfuse.com/docs/ask-ai)\\n- [Demo](https://langfuse.com/docs/demo)\\n- [Docs Mcp](https://langfuse.com/docs/docs-mcp)\\n- [Data Model](https://langfuse.com/docs/evaluation/dataset-runs/data-model)\\n- [Datasets](https://langfuse.com/docs/evaluation/dataset-runs/datasets)\\n- [Native Run](https://langfuse.com/docs/evaluation/dataset-runs/native-run)\\n- [Remote Run](https://langfuse.com/docs/evaluation/dataset-runs/remote-run)\\n- [Annotation](https://langfuse.com/docs/evaluation/evaluation-methods/annotation)\\n- [Custom Scores](https://langfuse.com/docs/evaluation/evaluation-methods/custom-scores)\\n- [Data Model](https://langfuse.com/docs/evaluation/evaluation-methods/data-model)\\n- [Llm As A Judge](https://langfuse.com/docs/evaluation/evaluation-methods/llm-as-a-judge)\\n- [Overview](https://langfuse.com/docs/evaluation/overview)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/evaluation/troubleshooting-and-faq)\\n- [Custom Dashboards](https://langfuse.com/docs/metrics/features/custom-dashboards)\\n- [Metrics Api](https://langfuse.com/docs/metrics/features/metrics-api)\\n- [Overview](https://langfuse.com/docs/metrics/overview)\\n- [Data Model](https://langfuse.com/docs/observability/data-model)\\n- [Agent Graphs](https://langfuse.com/docs/observability/features/agent-graphs)\\n- [Comments](https://langfuse.com/docs/observability/features/comments)\\n- [Environments](https://langfuse.com/docs/observability/features/environments)\"}, {\"type\": \"text\", \"text\": \"\\n- [Setup](https://langfuse.com/docs/observability/sdk/python/setup)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/sdk/python/troubleshooting-and-faq)\\n- [Upgrade Path](https://langfuse.com/docs/observability/sdk/python/upgrade-path)\\n- [Advanced Usage](https://langfuse.com/docs/observability/sdk/typescript/advanced-usage)\\n- [Instrumentation](https://langfuse.com/docs/observability/sdk/typescript/instrumentation)\\n- [Overview](https://langfuse.com/docs/observability/sdk/typescript/overview)\\n- [Setup](https://langfuse.com/docs/observability/sdk/typescript/setup)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/sdk/typescript/troubleshooting-and-faq)\\n- [Upgrade Path](https://langfuse.com/docs/observability/sdk/typescript/upgrade-path)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/observability/troubleshooting-and-faq)\\n- [Data Model](https://langfuse.com/docs/prompt-management/data-model)\\n- [A B Testing](https://langfuse.com/docs/prompt-management/features/a-b-testing)\\n- [Caching](https://langfuse.com/docs/prompt-management/features/caching)\\n- [Composability](https://langfuse.com/docs/prompt-management/features/composability)\\n- [Config](https://langfuse.com/docs/prompt-management/features/config)\\n- [Folders](https://langfuse.com/docs/prompt-management/features/folders)\\n- [Github Integration](https://langfuse.com/docs/prompt-management/features/github-integration)\\n- [Guaranteed Availability](https://langfuse.com/docs/prompt-management/features/guaranteed-availability)\\n- [Link To Traces](https://langfuse.com/docs/prompt-management/features/link-to-traces)\\n- [Mcp Server](https://langfuse.com/docs/prompt-management/features/mcp-server)\"}, {\"type\": \"text\", \"text\": \"\\n- [Message Placeholders](https://langfuse.com/docs/prompt-management/features/message-placeholders)\\n- [N8n Node](https://langfuse.com/docs/prompt-management/features/n8n-node)\\n- [Playground](https://langfuse.com/docs/prompt-management/features/playground)\\n- [Prompt Version Control](https://langfuse.com/docs/prompt-management/features/prompt-version-control)\\n- [Webhooks Slack Integrations](https://langfuse.com/docs/prompt-management/features/webhooks-slack-integrations)\\n- [Get Started](https://langfuse.com/docs/prompt-management/get-started)\\n- [Overview](https://langfuse.com/docs/prompt-management/overview)\\n- [Troubleshooting And Faq](https://langfuse.com/docs/prompt-management/troubleshooting-and-faq)\\n- [Roadmap](https://langfuse.com/docs/roadmap)\\n- [Security And Guardrails](https://langfuse.com/docs/security-and-guardrails)\\n## Optional\\n- [Self Hosting](https://langfuse.com/self-hosting)\\n- [Administration](https://langfuse.com/self-hosting/administration)\\n- [Automated Access Provisioning](https://langfuse.com/self-hosting/administration/automated-access-provisioning)\\n- [Headless Initialization](https://langfuse.com/self-hosting/administration/headless-initialization)\\n- [Organization Creators](https://langfuse.com/self-hosting/administration/organization-creators)\\n- [Organization Management Api](https://langfuse.com/self-hosting/administration/organization-management-api)\\n- [Ui Customization](https://langfuse.com/self-hosting/administration/ui-customization)\\n- [Configuration](https://langfuse.com/self-hosting/configuration)\\n- [Backups](https://langfuse.com/self-hosting/configuration/backups)\\n- [Caching](https://langfuse.com/self-hosting/configuration/caching)\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"site\", \"url\": \"https://langfuse.com/changelog/2025-06-28-agentic-onboarding-and-docs-mcp\", \"title\": \"Agentic Onboarding & Docs MCP Server - Langfuse\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"---\\n\\n[TypeScript SDK v4 GA \\u2192Langfuse TypeScript SDK v4 is here \\u2192](/changelog/2025-08-28-typescript-sdk-v4-ga)\\n\\n---\\n\\n[HIRING](/careers)\\n[17K](https://github.com/langfuse/langfuse \\\"GitHub Repository\\\")\\n\\n---\\n\\n[\\u2190 Back to changelog](/changelog#2025-06-28-agentic-onboarding-and-docs-mcp)\\nJune 28, 2025\\n# Agentic Onboarding & Docs MCP Server\\n[Marc Klingen](https://twitter.com/marcklingen)\\nIntegrate Langfuse into your existing codebase using AI agents like Cursor, Claude Code, GitHub Copilot, and Windsurf. Powered by the new Langfuse Docs MCP server.\\n\\n---\\n\\nTo make the Langfuse docs more accessible to AI agents, we\\u2019ve added a new [MCP Server](/docs/docs-mcp). This server exposes relevant context from the Langfuse docs, GitHub Issues, and GitHub Discussions to your agent.\\n\\n---\\n\\nInstead of manually integrating Langfuse into your existing codebase, you can now use agents like Cursor, Claude Code, GitHub Copilot, and Windsurf to automatically add tracing to your LLM applications.\\n\\n---\\n\\nThank you [@JohnRichardEnders](https://github.com/JohnRichardEnders) for your contribution to this!\\n\\n---\\n\\n## Getting started\\n\\n---\\n\\nOn the [Get Started page](/docs/get-started), you\\u2019ll now find a new \\u201d\\u2728 Agentic\\u201d tab that provides:\\n\\n---\\n\\n  * One-click MCP server installation for popular editors\\n  * Step-by-step setup instructions for Cursor, GitHub Copilot in VSCode, Windsurf, and other MCP clients\\n  * A ready-to-use prompt that you can copy and paste into your agent\\n\\n---\\n\\nThe agent will automatically:\\n\\n---\\n\\n  * Detect which LLM libraries you\\u2019re using (OpenAI, Anthropic, LangChain, etc.)\\n  * Choose the appropriate Langfuse integration method\\n  * Add the necessary imports and configuration\\n  * Wrap your existing LLM calls with Langfuse tracing\\n\\n---\\n\\n## Try it out\\n\\n---\\n\"}, {\"type\": \"text\", \"text\": \"\\nThis feature is experimental, so results may vary depending on your codebase complexity. We\\u2019d love to hear your feedback and experiences on [GitHub](https://github.com/langfuse/langfuse/issues).\\n\\n---\\n\\n## Learn more\\n\\n---\\n\\n  * [Agentic Onboarding Guide](/docs/get-started)\\n  * [Langfuse Docs MCP Server](/docs/docs-mcp)\\n\\n---\\n\\nLast updated on June 30, 2025\\n\\n---\\n\"}], \"type\": \"content\"}}, {\"type\": \"document\", \"record_type\": \"github_issue\", \"url\": \"https://github.com/langfuse/langfuse/issues/12738\", \"title\": \"MCP Server: Support SSO/OIDC authentication as alternative to static API keys\", \"source\": {\"content\": [{\"type\": \"text\", \"text\": \"Github Issue by @DrFaust92 created on March 23, 2026. The current state of the issue is: open\\n\\n## Feature Request\\n\\n### Problem\\n\\nThe current MCP server implementation only supports HTTP Basic Authentication with static project-scoped API key pairs (`pk-lf-xxx` / `sk-lf-xxx`). For self-hosted enterprise deployments, this poses challenges:\\n\\n- **No SSO integration** \\u2014 Teams cannot leverage their existing Identity Provider (IdP) for MCP client authentication\\n- **Static token management burden** \\u2014 API keys must be manually distributed, rotated, and revoked\\n- **Limited auditability** \\u2014 Requests are tied to API keys, not individual user identities\\n- **Security risk** \\u2014 Long-lived static tokens are a common target in credential theft scenarios\\n\\n### Proposed Solution\\n\\nAdd support for **OIDC/OAuth2-based authentication** for the MCP server endpoints, alongside the existing BasicAuth mechanism. This would allow self-hosted users to:\\n\\n1. Authenticate MCP clients via their existing IdP (Okta, Azure AD, Keycloak, etc.)\\n2. Map authenticated user identities to Langfuse project access\\n3. Eliminate static token distribution to end users\\n4. Get per-user audit trails for MCP operations\\n\\n### Suggested Approach\\n\\nThe MCP server architecture (`mcpServer.ts`, `transport.ts`, `core/validation.ts`) is already modular with a clear separation between authentication and server logic via `ServerContext`. A possible implementation:\\n\\n- Add an OIDC token validation path in the auth layer (alongside existing BasicAuth)\\n- Validate JWT bearer tokens against a configured OIDC issuer\\n- Map OIDC claims (e.g., groups/roles) to Langfuse project permissions\\n- Configuration via environment variables (`MCP_AUTH_OIDC_ISSUER`, `MCP_AUTH_OIDC_AUDIENCE`, etc.)\\n\\n### Current Workaround\\n\"}, {\"type\": \"text\", \"text\": \"\\nDeploying a reverse proxy (OAuth2 Proxy, Pomerium) in front of the MCP endpoint that handles SSO and injects BasicAuth headers. This works but adds operational complexity and doesn't provide per-user identity within Langfuse.\\n\\n### Environment\\n\\n- Self-hosted deployment\\n- Applies to the Streamable HTTP MCP transport at `/api/mcp`\\n---\\nComment #1 by @24na7igor:\\n\\nStatic API key pairs become a real bottleneck in enterprise self-hosted setups, especially when you need per-agent or per-environment scoping without rotating a single shared secret. One pattern worth considering: treat the MCP auth layer separately from the tracing ingestion auth. That way you can plug in OIDC/SAML at the MCP boundary while keeping the internal trace pipeline stable. The operational headache usually isn't the auth protocol itself but key rotation propagation across agent fleets. What's your current deployment topology, single instance or federated across teams?\\n---\\nComment #2 by @24na7igor:\\n\\nWorth noting that static API keys aren't just an auth ergonomics problem here. When you're running multiple agent pipelines hitting the same MCP server, rotating keys across environments without short-circuiting active sessions is the harder half of the problem. OIDC or service account tokens with short TTLs sidestep that rotation coupling entirely. We ran into this in a multi-tenant setup where key sprawl became the actual audit liability before the auth mechanism itself. What's your current strategy for key rotation across running agent sessions?\\n---\\nComment #3 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth vs mTLS) and credential scope (project-level vs user-level vs role-based). Static API key pairs break down fast in enterprise self-hosted setups not just because of security posture, but because rotation becomes a manual ops nightmare when you have 20+ agents hitting the same MCP server. One pattern that works well is short-lived tokens issued by your existing IdP with project claims embedded, so you get SSO compliance without changing the MCP surface. Are you running into this primarily because of an internal policy on credential rotation, or is it more about user-level attribution in the audit logs?\\n---\\nComment #4 by @24na7igor:\\n\\nWorth considering: static API keys at the MCP layer are usually just the surface problem. The deeper issue in self-hosted enterprise setups is that you need per-session identity propagation so your audit logs actually tie back to the human or agent that initiated the trace, not just 'which service connected.' OAuth/OIDC solves auth, but if the token context doesn't flow through to your trace metadata, you still can't answer 'who decided what and when' in a compliance review. Are you planning to carry the identity claims downstream into trace context, or just gate the connection?\\n---\\nComment #5 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth/OIDC) and token scoping. Static API keys break down fast in multi-tenant self-hosted setups not just because of rotation overhead but because you lose per-session auditability. One pattern that's worked well is short-lived JWT bearer tokens issued by your IdP, scoped to a session or agent run rather than the project. That way your auth logs give you a natural decision timeline per agent invocation. Are you hitting this mostly because of secret rotation policy, or is the auditability gap the bigger driver for your compliance team?\\n---\\nComment #6 by @24na7igor:\\n\\nWorth separating two concerns here: auth mechanism (Basic vs OAuth vs mTLS) and credential scope. Static project-scoped keys are actually fine for many enterprise setups if you add key rotation and per-service scoping on top. The bigger pain in self-hosted ent deployments is usually audit trail around *which service used which key to trigger which action* \\u2014 Basic Auth with rotating short-lived tokens can satisfy most compliance requirements without the full OAuth dance. Have you mapped out which specific compliance framework is driving this requirement?\\n---\\nComment #7 by @24na7igor:\\n\\nWorth separating two distinct problems here: authentication (who is calling the MCP server) and authorization (what can they do once in). Static API keys fail both in enterprise contexts, but the harder one is usually authorization scope \\u2014 especially when multiple teams share one self-hosted instance and you need per-team audit trails, not just per-project keys. OIDC/SAML solves the authn side, but scoped service accounts with fine-grained resource policies solve the audit side. Have you mapped out what your compliance team actually needs to see in the access logs when something goes wrong?\\n---\"}, {\"type\": \"text\", \"text\": \"\\nComment #8 by @24na7igor:\\n\\nWorth considering: static API key pairs become a bottleneck not just for auth rotation but for audit trails too. When you have multiple services hitting the same MCP endpoint with the same key, you lose per-caller attribution in your logs. OIDC/JWT with short-lived tokens solves the rotation problem but also gives you a subject claim per caller for free. Have you mapped out how many distinct services or agents would be authenticating against this endpoint in your setup?\\n---\\nComment #9 by @24na7igor:\\n\\nWorth considering OAuth 2.0 client credentials flow here instead of just OIDC/SAML. The static API key problem in enterprise self-hosted setups usually isn't just about SSO identity federation, it's about key rotation and scoped service account access across multiple internal teams hitting the same instance. JWT-based service tokens with short TTLs solve the rotation problem without requiring a full IdP integration for every service-to-service call. Have you looked at whether your enterprise users are hitting this from a human auth path or machine-to-machine between internal services?\\n---\\nComment #10 by @24na7igor:\\n\\nWorth noting that static API keys at the MCP layer are actually a symptom of a deeper problem in self-hosted enterprise setups: you end up with a flat auth model that can't distinguish between agents, users, or services calling the same endpoint. OIDC/SAML federation helps, but the real win is per-caller identity so your audit logs can trace which principal triggered which trace. We ran into this trying to correlate agent decisions back to the service account that initiated them. Are you hitting this for compliance traceability specifically, or more for operational access control?\\n---\\nComment #11 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nStatic API keys on MCP servers become a real problem once you have multiple agent pipelines hitting the same Langfuse instance with different trust levels. One pattern worth considering: treat the MCP server as a service principal and layer short-lived tokens on top via your IdP (OIDC client credentials flow), rather than baking auth into the MCP spec itself. Keeps rotation out of your agent config entirely. Are you running multiple isolated agent environments against a single self-hosted instance, or is this more about key rotation/revocation velocity?\\n---\\nComment #12 by @24na7igor:\\n\\nWorth separating the auth layer concern here: static API key pairs per project become a real problem when you need per-agent identity and audit trails, not just access control. OIDC/JWT with short-lived tokens also lets you scope permissions per deployment environment without rotating long-lived secrets manually. The tricky part is usually the token refresh flow inside the MCP server lifecycle. Have you looked at how this intersects with your agent session boundaries, or is the main driver here human operator access?\\n---\\nComment #13 by @24na7igor:\\n\\nWorth considering: static API keys aren't just an auth UX problem in self-hosted enterprise setups. The deeper issue is that key rotation in prod agents is painful because the key is often baked into orchestration configs at deploy time, not resolved at runtime. OIDC or service account tokens with short TTLs solve this more cleanly than key pair management. One pattern I've seen work well is treating the MCP server as a resource server in an OAuth2 flow, where the agent runtime exchanges a scoped token per session. Are you targeting a specific IdP here, or looking for a more IdP-agnostic interface?\\n---\\nComment #14 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth *transport* (Basic vs OAuth vs mTLS) and auth *scope* (project-key vs user-token vs service-account). Most MCP implementations conflate them and end up rebuilding IAM from scratch. If you're targeting enterprise self-hosted, JWT with short-lived tokens + a token exchange endpoint is usually the path that satisfies both SSO requirements and audit log attribution without touching the core MCP protocol. What auth provider are they actually trying to integrate with, SAML-based SSO or something like OIDC?\\n---\\nComment #15 by @24na7igor:\\n\\nWorth separating two auth concerns here: identity (who is calling) vs. scope (what project/environment they can touch). Static API key pairs conflate both, which breaks down fast in multi-tenant or per-agent deployments. JWT with claims works well for identity, but you still need a way to bind a token to a specific trace context without leaking cross-tenant data through the MCP surface. Have you looked at how you'd handle token rotation mid-session without dropping in-flight trace continuity?\\n---\\nComment #16 by @24na7igor:\\n\\nWorth separating two concerns here: authn (who is calling) and authz (what they can see/do). Basic auth with static keys solves authn but makes authz coarse-grained. If you're moving toward OAuth or OIDC, you get scoped tokens for free, which lets you tie MCP access to existing RBAC roles rather than managing a parallel key namespace. One thing I'd think hard about: do you want the MCP server to be token-aware at the project level or the trace level? That changes the implementation significantly. What's your primary driver here, multi-tenant isolation or SSO/enterprise IdP integration?\\n---\\nComment #17 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism (Basic vs Bearer/JWT) and credential scope (project vs user vs service account). HTTP Basic with static keys breaks down fast in self-hosted enterprise because rotation becomes a manual coordination problem across multiple consumers. A token exchange pattern where short-lived JWTs are issued against a long-lived service identity tends to survive real SOC2 audits better than rotating static keys. Have you mapped out whether the primary driver is credential rotation policy or RBAC granularity at the MCP request level?\\n---\\nComment #18 by @24na7igor:\\n\\nWorth separating two distinct auth concerns here: identity (who is calling the MCP server) and authorization (what project/scope they can access). Basic auth with static keys conflates both, which is why rotating or scoping becomes painful. mTLS or short-lived JWT bearer tokens solve the identity layer cleanly and integrate better with most enterprise IdPs without requiring changes to the project key model itself. Have you looked at whether the MCP server sits behind an API gateway in your self-hosted setup, because that changes the implementation surface significantly?\\n---\\nComment #19 by @24na7igor:\\n\\nHave you considered using OAuth2 or JWTs for more dynamic authentication flows? Static API key pairs can be limiting and might pose security risks if mishandled. In a setup with evolving infrastructure, dynamic authentication is often more robust and scalable. Also, how do your current setups manage key rotation and revocation?\\n---\\nComment #20 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nWorth separating two concerns here: auth mechanism and token scope. Even if you add OAuth or short-lived tokens, the real enterprise blocker is usually that a single compromised MCP session can exfiltrate trace data across all projects. Scoping tokens to specific trace IDs or time windows at the MCP layer (not just project level) gives you containment without rebuilding auth entirely. Have you looked at whether the current session model exposes cross-project data if a key is leaked?\\n---\\nComment #21 by @24na7igor:\\n\\nI've dealt with similar auth limitations. Consider segmenting your API keys by scope and applying rotation policies. This can help manage access control better and reduce risk. Another approach might be integrating OAuth2 for more granular control over permissions. Have you explored alternative auth mechanisms in similar scenarios before?\\n---\\nComment #22 by @24na7igor:\\n\\nConsider using token-based authentication as an alternative. It can enhance security by granting time-limited and scoped access, reducing the risks associated with static keys. This might also streamline the integration process for contributors who need varied access levels. Have you explored using OAuth2 for managing these access controls?\\n---\\nComment #23 by @24na7igor:\\n\\nHave you considered implementing OAuth2 for your MCP server? It scales better with multiple projects and user roles, offering more flexibility and security than static keys. It could also simplify token management across environments. How would you handle token expiration or refresh in your current setup?\\n---\\nComment #24 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nConsider leveraging OAuth 2.0 for a more scalable authentication solution. It allows for flexible token management and delegation, fitting nicely into environments requiring dynamic access controls. This might reduce the overhead of API key distribution and lifecycle management. Have you thought about the implications of transitioning to a more robust authentication protocol like OAuth?\\n---\\nComment #25 by @24na7igor:\\n\\nHave you considered using mutual TLS to improve authentication security in your self-hosted environment? It helps mitigate static key exposure by ensuring both client and server authentication. You may also look into rotating credentials automatically. How do you handle credential management in your current setup?\\n---\\nComment #26 by @24na7igor:\\n\\nHave you considered using OAuth 2.0 for token-based authentication in your MCP server? It might simplify key management by using time-limited access tokens instead of static API keys. This could also enhance security by enabling more granular permissions and reducing exposure to credential leaks. What kind of challenges have you faced when trying to implement more dynamic authorization methods?\\n---\\nComment #27 by @24na7igor:\\n\\nI see the challenge with using static API keys for authentication in a dynamic environment. One approach is to implement OAuth with token expiration to enhance security and flexibility over basic auth methods. Have you considered leveraging a token-based system for self-hosted deployments to minimize risk and improve scalability?\\n---\\nComment #28 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nHave you thought about using mutual TLS instead of static API keys? It provides strong client authentication and can massively improve security for self-hosted environments. Static keys are too easy to leak or misuse, especially in CI/CD pipelines. How are you planning to handle secrets in different environments?\\n---\\nComment #29 by @24na7igor:\\n\\nInteresting challenge you\\u2019ve laid out with the current MCP server\\u2019s reliance on static API keys for authentication. Have you explored the possibility of integrating OAuth2 for a more dynamic and secure authentication mechanism? Not only would it improve security, but it may also simplify scaling. Curious, what authentication flow did you envision for self-hosted environments?\\n---\\nComment #30 by @24na7igor:\\n\\nSwitching from HTTP Basic Auth to token-based auth could be a game changer for security and flexibility. Integrating OAuth2 or JWTs provides dynamic control over session-level access. Consider the added complexity in session management as an acceptable trade-off for enhanced security. Have you explored the overhead of maintaining session states?\\n---\\nComment #31 by @24na7igor:\\n\\nHandling authentication with static API key pairs is a security risk and limits flexibility, especially in dynamic environments. Consider leveraging OAuth2 or JWT for more robust, granular access control that can integrate with existing identity providers. How are you currently managing key rotations and revocations in your setup?\\n---\\nComment #32 by @24na7igor:\\n\\nHave you thought about adding OAuth 2.0 for enhanced security in self-hosted environments? It can offer token-based authentication that scales better and reduces the risk inherent in static API keys. How are you currently managing key rotation and endpoint security with your existing setup?\\n---\\nComment #33 by @24na7igor:\\n\"}, {\"type\": \"text\", \"text\": \"\\nHey @DrFaust92, have you considered using OAuth2 for more dynamic access control in your MCP server? It might offer better flexibility over static API keys, especially for self-hosted setups. Also, implementing token expiration could enhance security. How do you currently manage key rotation or invalidation?\\n---\\nComment #34 by @24na7igor:\\n\\nOne approach that could add flexibility while enhancing security is integrating OAuth2 with fine-grained token scopes. Each service agent could obtain scoped tokens dynamically, reducing reliance on static credentials prone to leakage. Have you considered token-based authentication that allows granular permissions for each action an agent can perform?\\n---\\nComment #35 by @24na7igor:\\n\\nConsider implementing token-based authentication with a dynamic token lifecycle. This will allow more granular access control and reduce the risk of API keys being compromised. It could integrate well with your existing permission structures while improving security. Did you explore more robust auth mechanisms for scaling and security beyond static pairs?\\n---\\nComment #36 by @24na7igor:\\n\\nHey @DrFaust92, something to think about: have you considered implementing OAuth 2.0 or JWTs for a more secure and scalable authentication system? Static API keys aren't the best when scaling or complying with stricter security norms. How are you managing key rotation in your current setup?\\n---\\nComment #37 by @24na7igor:\\n\"}], \"type\": \"content\"}}]}","role":"assistant","tool_calls":null,"function_call":null}}],"usage":{"prompt_tokens":6,"completion_tokens":16450,"total_tokens":16456},"system_fingerprint":"inkeep-fp-268ef33c-cc29-4876-a951-9103f076ac81","object":"chat.completion","service_tier":null,"created":1795528478}}