by langfuse
Access and manage Langfuse prompts through the Model Context Protocol, enabling prompt discovery, retrieval, and compilation via MCP endpoints and compatible tool commands.
Provides an MCP‑compatible server that exposes Langfuse prompts as MCP Prompt resources and as legacy tools, allowing LLM clients (e.g., Claude Desktop, Cursor) to list, retrieve, and compile prompts directly from Langfuse.
npm install
npm run build
LANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEYLANGFUSE_BASEURLserverConfig (e.g., npx -y mcp-server-langfuse).prompts/list with optional cursor pagination, returning prompt names and inferred optional arguments.prompts/get that converts Langfuse text/chat prompts into MCP prompt objects and compiles them with supplied variables.get-prompts tool mirrors prompts/list for clients lacking native prompt support.get-prompt tool mirrors prompts/get for direct retrieval and compilation.Q: Which prompts are returned?
A: Only prompts tagged with the production label in Langfuse are exposed.
Q: Are prompt arguments required? A: All arguments are treated as optional; descriptions are unavailable because Langfuse does not store variable metadata.
Q: How does pagination work?
A: prompts/list supports a cursor parameter; the response includes a nextCursor when more pages exist.
Q: Can I use this with other MCP clients?
A: Yes. The server also provides legacy tools (get‑prompts and get‑prompt) for clients that do not support the Prompt capability.
Q: What are the performance considerations? A: Listing prompts fetches each prompt individually to infer arguments, which may be slower for large libraries.
Q: How do I contribute? A: Open an issue or submit a pull request on the GitHub repository.
Model Context Protocol (MCP) Server for Langfuse Prompt Management. This server allows you to access and manage your Langfuse prompts through the Model Context Protocol.
Quick demo of Langfuse Prompts MCP in Claude Desktop (unmute for voice-over explanations):
https://github.com/user-attachments/assets/61da79af-07c2-4f69-b28c-ca7c6e606405
This server implements the MCP Prompts specification for prompt discovery and retrieval.
prompts/list: List all available prompts
prompts/get: Get a specific prompt
To increase compatibility with other MCP clients that do not support the prompt capability, the server also exports tools that replicate the functionality of the MCP Prompts.
get-prompts: List available prompts
cursor parameter for paginationget-prompt: Retrieve and compile a specific prompt
name parameter: Name of the prompt to retrievearguments parameter: JSON object with prompt variablesnpm install
# build current file
npm run build
# test in mcp inspector
npx @modelcontextprotocol/inspector node ./build/index.js
npm install
npm run build
Configure Claude for Desktop by editing claude_desktop_config.json
{
"mcpServers": {
"langfuse": {
"command": "node",
"args": ["<absolute-path>/build/index.js"],
"env": {
"LANGFUSE_PUBLIC_KEY": "your-public-key",
"LANGFUSE_SECRET_KEY": "your-secret-key",
"LANGFUSE_BASEURL": "https://cloud.langfuse.com"
}
}
}
}
Make sure to replace the environment variables with your actual Langfuse API keys. The server will now be available to use in Claude Desktop.
Add new server to Cursor:
Langfuse PromptscommandLANGFUSE_PUBLIC_KEY="your-public-key" LANGFUSE_SECRET_KEY="your-secret-key" LANGFUSE_BASEURL="https://cloud.langfuse.com" node absolute-path/build/index.js
The MCP Server is a work in progress and has some limitations:
production label in Langfuse are returnedContributions are welcome! Please open an issue or a PR (repo) if you have any suggestions or feedback.
Please log in to share your review and rating for this MCP.
{
"mcpServers": {
"langfuse": {
"command": "npx",
"args": [
"-y",
"mcp-server-langfuse"
],
"env": {
"LANGFUSE_PUBLIC_KEY": "<YOUR_PUBLIC_KEY>",
"LANGFUSE_SECRET_KEY": "<YOUR_SECRET_KEY>",
"LANGFUSE_BASEURL": "https://cloud.langfuse.com"
}
}
}
}claude mcp add langfuse npx -y mcp-server-langfuseExplore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.