SuperAPI AI Directory

mcp-server-langfuse

Access and manage LLM application prompts created with Langfuse Prompt Management.

Open website

About this tool

Langfuse Prompt Management MCP Server is a Model Context Protocol (MCP)-based server for accessing and managing prompts stored in Langfuse. It implements the MCP Prompts specification, supporting prompt discovery and retrieval.

Key capabilities:

  • prompts/list: Lists all available prompts, supports optional cursor-based pagination, returns prompt names and their required parameters (but all parameters are treated as optional and do not include descriptions, since variables in Langfuse have no defined specification), and includes the next-page cursor if the prompts exceed one page.
  • prompts/get: Retrieves a specific prompt, converts Langfuse text and chat prompts into MCP prompt objects, and compiles the prompt using the provided variables.
  • To increase compatibility with other MCP clients that do not support prompt capabilities, the server also exports the tools get-prompts and get-prompt, which replicate the above functionality respectively.

get-prompts: Lists available prompts, with an optional cursor parameter for pagination, returning the prompt list and their parameters. get-prompt: Retrieves and compiles a specific prompt, with the required parameter name (the name of the prompt to retrieve) and the optional parameter arguments (a JSON object containing the prompt variables).

Usage: The server can be added to Claude for Desktop by editing claude_desktop_config.json, replacing the environment variables with the actual Langfuse API keys. To add a new server in Cursor: name Langfuse Prompts, command LANGFUSE_PUBLIC_KEY="your-public-key" LANGFUSE_SECRET_KEY="your-secret-key" LANGFUSE_BASEURL="https://cloud.langfuse.com" node absolute-path/build/index.js.

Limitations: This MCP server is still under development and has some limitations: it only returns prompts in Langfuse with the production label; all parameters are treated as optional and do not include descriptions; list operations need to fetch each prompt one by one in the background to extract parameters, which is feasible but inefficient. Contributions are welcome; issues or PRs can be submitted in the repository.