Skip to content
Back to search

mcp-server-langfuse

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/langfuse--mcp-server-langfuse/badge.svg)](/listings/langfuse--mcp-server-langfuse)

HTML

<a href="/listings/langfuse--mcp-server-langfuse"><img src="/api/listings/langfuse--mcp-server-langfuse/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 105 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Langfuse Prompt Management MCP Server
  2. [Model Context Protocol](https://github.com/modelcontextprotocol) (MCP) Server for [Langfuse Prompt Management](https://langfuse.com/docs/prompts/get-started). This server allows you to access and manage your Langfuse prompts through the Model Context Protocol.
  3. ## Demo
  4. Quick demo of Langfuse Prompts MCP in Claude Desktop (_unmute for voice-over explanations_):
  5. https://github.com/user-attachments/assets/61da79af-07c2-4f69-b28c-ca7c6e606405
  6. ## Features
  7. ### MCP Prompt
  8. This server implements the [MCP Prompts specification](https://modelcontextprotocol.io/docs/concepts/prompts) for prompt discovery and retrieval.
  9. - `prompts/list`: List all available prompts
  10. - Optional cursor-based pagination
  11. - Returns prompt names and their required arguments, limitation: all arguments are assumed to be optional and do not include descriptions as variables do not have specification in Langfuse
  12. - Includes next cursor for pagination if there's more than 1 page of prompts
  13. - `prompts/get`: Get a specific prompt
  14. - Transforms Langfuse prompts (text and chat) into MCP prompt objects
  15. - Compiles prompt with provided variables
  16. ### Tools
  17. 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.
  18. - `get-prompts`: List available prompts
  19. - Optional `cursor` parameter for pagination
  20. - Returns a list of prompts with their arguments
  21. - `get-prompt`: Retrieve and compile a specific prompt
  22. - Required `name` parameter: Name of the prompt to retrieve
  23. - Optional `arguments` parameter: JSON object with prompt variables
  24. ## Development
  25. ```bash
  26. npm install
  27. # build current file
  28. npm run build
  29. # test in mcp inspector
  30. npx @modelcontextprotocol/inspector node ./build/index.js
  31. ```
  32. ## Usage
  33. ### Step 1: Build
  34. ```bash
  35. npm install
  36. npm run build
  37. ```
  38. ### Step 2: Add the server to your MCP servers:
  39. #### Claude Desktop
  40. Configure Claude for Desktop by editing `claude_desktop_config.json`
  41. ```json
  42. {
  43. "mcpServers": {
  44. "langfuse": {
  45. "command": "node",
  46. "args": ["<absolute-path>/build/index.js"],
  47. "env": {
  48. "LANGFUSE_PUBLIC_KEY": "your-public-key",
  49. "LANGFUSE_SECRET_KEY": "your-secret-key",
  50. "LANGFUSE_BASEURL": "https://cloud.langfuse.com"
  51. }
  52. }
  53. }
  54. }
  55. ```
  56. Make sure to replace the environment variables with your actual Langfuse API keys. The server will now be available to use in Claude Desktop.
  57. #### Cursor
  58. Add new server to Cursor:
  59. - Name: `Langfuse Prompts`
  60. - Type: `command`
  61. - Command:
  62. ```bash
  63. LANGFUSE_PUBLIC_KEY="your-public-key" LANGFUSE_SECRET_KEY="your-secret-key" LANGFUSE_BASEURL="https://cloud.langfuse.com" node absolute-path/build/index.js
  64. ```
  65. ## Limitations
  66. The MCP Server is a work in progress and has some limitations:
  67. - Only prompts with a `production` label in Langfuse are returned
  68. - All arguments are assumed to be optional and do not include descriptions as variables do not have specification in Langfuse
  69. - List operations require fetching each prompt individually in the background to extract the arguments, this works but is not efficient
  70. Contributions are welcome! Please open an issue or a PR ([repo](https://github.com/langfuse/mcp-server-langfuse)) if you have any suggestions or feedback.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.