Langfuse MCP Servers
Available MCP servers
Server navigation
Langfuse Cloud MCP
Authenticated project-scoped MCP server for Langfuse Cloud projects.
https://cloud.langfuse.com/api/public/mcpCloud EU
https://cloud.langfuse.com/api/public/mcp
Cloud US
https://us.cloud.langfuse.com/api/public/mcp
Cloud Japan
https://jp.cloud.langfuse.com/api/public/mcp
HIPAA US
https://hipaa.cloud.langfuse.com/api/public/mcp
Self-Hosted
https://your-domain.com/api/public/mcp
Local Development
http://localhost:3000/api/public/mcp
Client setup
Cursor mcp.json
json
{
"mcpServers": {
"langfuse-cloud": {
"url": "https://cloud.langfuse.com/api/public/mcp",
"headers": {
"Authorization": "Basic <base64(LANGFUSE_PUBLIC_KEY:LANGFUSE_SECRET_KEY)>"
}
}
}
}Tools
getPrompt
Fetch a specific prompt by name with optional label or version parameter. Retrieval options: - label: Get prompt with specific label (e.g., 'production', 'staging') - version: Get specific version number (e.g., 1, 2, 3) - neither: Returns 'production' version by default Note: label and version are mutually exclusive. Returns full prompt content with resolved dependencies.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"label": {
"description": "Label to retrieve (e.g., \"production\", \"staging\"). Defaults to \"production\".",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"version": {
"description": "Specific version number to retrieve (e.g., 1, 2, 3)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"name"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getPrompt",
"arguments": {
"name": "string",
"label": "string",
"version": 1
}
}
}getPromptUnresolved
Fetch a specific prompt by name with optional label or version parameter WITHOUT resolving dependencies. Returns the raw prompt content with dependency tags intact. Useful for: - Understanding prompt composition/stacking before resolution - Debugging prompt dependencies - Analyzing the dependency graph structure Retrieval options: - label: Get prompt with specific label (e.g., 'production', 'staging') - version: Get specific version number (e.g., 1, 2, 3) - neither: Returns 'production' version by default Note: label and version are mutually exclusive. To get resolved prompts, use the 'getPrompt' tool instead.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"label": {
"description": "Label to retrieve (e.g., \"production\", \"staging\"). Defaults to \"production\".",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"version": {
"description": "Specific version number to retrieve (e.g., 1, 2, 3)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"name"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getPromptUnresolved",
"arguments": {
"name": "string",
"label": "string",
"version": 1
}
}
}listPrompts
List and filter prompts in the project. Returns metadata including versions, labels, tags, last updated timestamp, and prompt type. Optional filters: - name: Filter by exact prompt name - label: Filter by label on any version - tag: Filter by tag - fromUpdatedAt: Filter prompts updated at or after this timestamp - toUpdatedAt: Filter prompts updated at or before this timestamp Pagination: page (default: 1), limit (default: 50, max: 100)
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"description": "Filter by exact prompt name match",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"label": {
"description": "Filter by label (e.g., 'production', 'staging')",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"tag": {
"description": "Filter by tag (e.g., 'experimental', 'v1')",
"type": "string"
},
"fromUpdatedAt": {
"description": "Filter prompts updated at or after this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toUpdatedAt": {
"description": "Filter prompts updated at or before this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"page": {
"default": 1,
"description": "Page number for pagination (default: 1)",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"default": 50,
"description": "Number of items to return (1-100, default: 50)",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"page",
"limit"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listPrompts",
"arguments": {
"limit": 50,
"page": 1,
"fromUpdatedAt": "2026-05-15T12:00:00.000Z",
"label": "string",
"name": "string",
"tag": "string",
"toUpdatedAt": "2026-05-15T12:00:00.000Z"
}
}
}createTextPrompt
Create a new text prompt version in Langfuse. Important: - Prompts are immutable - cannot modify existing versions - To update content, create a new version - To promote to production, use updatePromptLabels - Labels are unique across versions - Use {{variable_name}} syntax for dynamic content Accepts: name, prompt (string), optional labels, config, tags, commitMessage
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"prompt": {
"type": "string",
"description": "The prompt text content (supports {{variables}})"
},
"labels": {
"description": "Labels to assign (e.g., ['production', 'staging'])",
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"description": "Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7})",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"tags": {
"description": "Optional tags for organization (e.g., ['experimental', 'v2'])",
"type": "array",
"items": {
"type": "string"
}
},
"commitMessage": {
"description": "Optional commit message describing the changes",
"type": "string"
}
},
"required": [
"name",
"prompt"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createTextPrompt",
"arguments": {
"name": "string",
"prompt": "string",
"commitMessage": "string",
"config": {
"property": {}
},
"labels": [
"string"
],
"tags": [
"string"
]
}
}
}createChatPrompt
Create a new chat prompt version in Langfuse. Chat prompts are arrays of messages with roles and content. Important: - Prompts are immutable - cannot modify existing versions - To update content, create a new version - To promote to production, use updatePromptLabels - Labels are unique across versions Message roles: system (instructions), user (input, can contain {{variables}}), assistant (examples) Accepts: name, prompt (array of {role, content}), optional labels, config, tags, commitMessage
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"prompt": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role (e.g., 'system', 'user', 'assistant')"
},
"content": {
"type": "string",
"description": "The message content"
}
},
"required": [
"role",
"content"
],
"additionalProperties": false
},
"description": "Array of chat messages with role and content"
},
"labels": {
"description": "Labels to assign (e.g., ['production', 'staging'])",
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"description": "Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7})",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"tags": {
"description": "Optional tags for organization (e.g., ['experimental', 'v2'])",
"type": "array",
"items": {
"type": "string"
}
},
"commitMessage": {
"description": "Optional commit message describing the changes",
"type": "string"
}
},
"required": [
"name",
"prompt"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createChatPrompt",
"arguments": {
"name": "string",
"prompt": [
{
"content": "string",
"role": "string"
}
],
"commitMessage": "string",
"config": {
"property": {}
},
"labels": [
"string"
],
"tags": [
"string"
]
}
}
}updatePromptLabels
Update labels for a specific prompt version. Important: - ONLY way to modify existing prompts (labels only) - Specified labels are added to the version (preserving others not mentioned) - Labels are unique across versions - setting a label on one version automatically removes it from others - 'latest' label is auto-managed and cannot be set manually - Cannot modify prompt content, type, or tags - use createTextPrompt or createChatPrompt for new versions Accepts: name, version (required), newLabels (array, can be empty to remove all labels)
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The version number to update (required)"
},
"newLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of new labels to assign to the prompt version (can be empty to remove all labels)"
}
},
"required": [
"name",
"version",
"newLabels"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "updatePromptLabels",
"arguments": {
"name": "string",
"newLabels": [
"string"
],
"version": 1
}
}
}Langfuse Docs MCP
Unauthenticated MCP server for Langfuse documentation search and retrieval.
https://langfuse.com/api/mcpClient setup
Cursor mcp.json
json
{
"mcpServers": {
"langfuse-docs": {
"url": "https://langfuse.com/api/mcp"
}
}
}Tools
searchLangfuseDocs
Semantic search (RAG) over the Langfuse documentation. Use this whenever the user asks a broader question that cannot be answered by a specific single page. Returns a concise answer synthesized from relevant docs. The raw provider response is included in _meta. Prefer this before guessing. If a specific page is needed call getLangfuseDocsPage first.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The user's question in natural language. Include helpful context like SDK/language (e.g., Python v3, JS v4), self-hosted vs cloud, and short error messages (trim long stack traces). Keep under ~600 characters."
}
},
"required": [
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchLangfuseDocs",
"arguments": {
"query": "string"
}
}
}getLangfuseDocsPage
Fetch the raw Markdown for a single Langfuse docs page. Accepts a docs path (e.g., /docs/observability/overview) or a full https://langfuse.com URL. Returns the exact Markdown (may include front matter). Use when you need a specific page content (Integration, Features, API, etc.) or code samples. Prefer searchLangfuseDocs for broader questions where there is not one specific page about it.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {
"pathOrUrl": {
"type": "string",
"description": "Docs path starting with \"/\" (e.g., /docs/observability/overview) or a full URL on https://langfuse.com. Do not include anchors (#...) or queries (?foo=bar) — they will be ignored."
}
},
"required": [
"pathOrUrl"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getLangfuseDocsPage",
"arguments": {
"pathOrUrl": "string"
}
}
}getLangfuseOverview
Get a high-level, machine-readable index by downloading https://langfuse.com/llms.txt. Use this at the start of a session when needed to discover key docs endpoints or to seed follow-up calls to searchLangfuseDocs or getLangfuseDocsPage. Returns the plain text contents of llms.txt. Avoid repeated calls within the same session.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getLangfuseOverview",
"arguments": {}
}
}