Langfuse Prompt Management

Langfuse Prompt Management

Open-source tool for collaborative editing, versioning, evaluating, and releasing prompts.

148
Stars
37
Forks
2
Releases

Overview

This MCP server implements the Model Context Protocol (MCP) for Langfuse Prompt Management. It enables discovery and retrieval of Langfuse prompts through MCP endpoints and mirrors Langfuse prompts as MCP prompt objects. The server exposes prompts/list to enumerate available prompts and prompts/get to fetch a specific prompt and compile it with user-provided variables. It also exports non-MCP tools: get-prompts (list prompts) and get-prompt (retrieve and compile a prompt) to maximize compatibility with MCP clients that do not implement the prompt capability. The prompts endpoints support optional cursor-based pagination; listing returns prompt names and their arguments, with a next cursor when more results exist. Note that in Langfuse, arguments are treated as optional and there are no per-variable descriptions. The server is a work in progress with limitations: only prompts labeled production are returned, and listing requires background per-prompt argument extraction which is not the most efficient. The repository provides build and integration steps for Claude Desktop and Cursor.

Details

Owner
langfuse
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

MCP Prompts compliance

Implements the MCP Prompts specification for discovery and retrieval of prompts.

prompts/list endpoint

Lists all available prompts with optional cursor-based pagination; returns names and required arguments (arguments treated as optional) and a next cursor if more results exist.

prompts/get endpoint

Retrieves a specific prompt by transforming Langfuse prompts (text and chat) into MCP prompt objects and compiling with provided variables.

get-prompts tool

Non-MCP tool to list available prompts; supports optional cursor-based pagination and returns prompts with their arguments.

get-prompt tool

Non-MCP tool to retrieve and compile a specific prompt by name; accepts optional arguments as a JSON object.

Development and integration workflow

Build, test, and run the server locally; verify with MCP inspector and integrate with clients like Claude Desktop or Cursor.

Audience

DevelopersUse MCP to access and manage Langfuse prompts in applications.
MCP clientsIntegrate Langfuse prompts into MCP-based workflows.
Prompt engineersTransform and compile Langfuse prompts for MCP consumption.

Tags

MCPModel Context ProtocolPromptsPrompt ManagementLangfuseprompt discoveryprompt retrievalcursor-based paginationtoolsget-promptsget-prompt