# Langfuse MCP Servers

Generated at 2026-05-18T09:46:53.311Z.

Connect MCP clients to Langfuse Cloud for project-scoped prompt management and to Langfuse Docs for public documentation search and retrieval.

This is an hourly regenerated snapshot. It documents configured MCP servers, connection variants, setup snippets, and discovered tools while serving cached output between regenerations.

## Servers

### Langfuse Cloud MCP

Authenticated project-scoped MCP server for Langfuse Cloud projects.

- Server ID: `langfuse-cloud`
- Canonical endpoint: `https://cloud.langfuse.com/api/public/mcp`
- Authentication: Basic Auth using LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY
- Discovered tools: 6

#### Connection Variants

| Variant | URL |
| --- | --- |
| Cloud 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: 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)>"
      }
    }
  }
}
```

##### Claude Code: Claude Code CLI

```bash
export LANGFUSE_PUBLIC_KEY=pk-lf-your-public-key
export LANGFUSE_SECRET_KEY=sk-lf-your-secret-key
claude mcp add --transport http langfuse-cloud https://cloud.langfuse.com/api/public/mcp \
  --header "Authorization: Basic $(printf '%s:%s' "$LANGFUSE_PUBLIC_KEY" "$LANGFUSE_SECRET_KEY" | base64)"
```

##### Generic MCP client: Streamable HTTP JSON

```json
{
  "servers": {
    "langfuse-cloud": {
      "transport": {
        "type": "streamable-http",
        "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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:

```json
{
  "$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
}
```

Generated example request:

```json
{
  "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.

- Server ID: `langfuse-docs`
- Canonical endpoint: `https://langfuse.com/api/mcp`
- Authentication: None
- Discovered tools: 3

#### Client Setup

##### Cursor: Cursor mcp.json

```json
{
  "mcpServers": {
    "langfuse-docs": {
      "url": "https://langfuse.com/api/mcp"
    }
  }
}
```

##### VS Code Copilot: VS Code settings.json

```json
{
  "mcp": {
    "servers": {
      "langfuse-docs": {
        "type": "http",
        "url": "https://langfuse.com/api/mcp"
      }
    }
  }
}
```

##### Claude Code: Claude Code CLI

```bash
claude mcp add --transport http langfuse-docs https://langfuse.com/api/mcp
```

##### Windsurf: Proxy command

```json
{
  "mcpServers": {
    "langfuse-docs": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://langfuse.com/api/mcp"
      ]
    }
  }
}
```

##### Generic MCP client: Streamable HTTP JSON

```json
{
  "servers": {
    "langfuse-docs": {
      "transport": {
        "type": "streamable-http",
        "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:

```json
{
  "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#"
}
```

Generated example request:

```json
{
  "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:

```json
{
  "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#"
}
```

Generated example request:

```json
{
  "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:

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```

Generated example request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "getLangfuseOverview",
    "arguments": {}
  }
}
```

