Langfuse Prompt Management MCP Server
by marcklingen
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.
What is Langfuse Prompt Management MCP Server
Langfuse Prompt Management MCP Server
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.
Demo
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
Features
MCP Prompt
This server implements the MCP Prompts specification for prompt discovery and retrieval.
-
prompts/list
: List all available prompts- Optional cursor-based pagination
- 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
- Includes next cursor for pagination if there's more than 1 page of prompts
-
prompts/get
: Get a specific prompt- Transforms Langfuse prompts (text and chat) into MCP prompt objects
- Compiles prompt with provided variables
Tools
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- Optional
cursor
parameter for pagination - Returns a list of prompts with their arguments
- Optional
-
get-prompt
: Retrieve and compile a specific prompt- Required
name
parameter: Name of the prompt to retrieve - Optional
arguments
parameter: JSON object with prompt variables
- Required
Development
npm install
# build current file
npm run build
# test in mcp inspector
npx @modelcontextprotocol/inspector node ./build/index.js
Usage
Step 1: Build
npm install
npm run build
Step 2: Add the server to your MCP servers:
Claude Desktop
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.
Cursor
Add new server to Cursor:
- Name:
Langfuse Prompts
- Type:
command
- 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
The MCP Server is a work in progress and has some limitations:
- Only prompts with a
production
label in Langfuse are returned - All arguments are assumed to be optional and do not include descriptions as variables do not have specification in Langfuse
- List operations require fetching each prompt individually in the background to extract the arguments, this works but is not efficient
Contributions are welcome! Please open an issue or a PR (repo) if you have any suggestions or feedback.
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
21st.dev Magic AI Agent
It's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
Requirements:
A Model Context Protocol Server for connecting with Adfin APIs
AgentQL MCP Server
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
AgentRPC
A universal RPC layer for AI agents. Connect to any function, any language, any framework, in minutes.
Aiven MCP Server
Model Context Protocol server for Aiven
IoTDB MCP Server
Apache IoTDB MCP Server
Apify Model Context Protocol (MCP) Server
Model Context Protocol (MCP) Server for Apify's Actors
APIMatic Validator MCP Server
APIMatic Validator MCP Server for validating OpenAPI specs via APIMatic's API with MCP
๐ Audiense Insights MCP Server
Audiense Insights MCP Server is a server based on the Model Context Protocol (MCP) that allows Claude and other MCP-compatible clients to interact with your Audiense Insights account
Bankless Onchain MCP Server
Bringing the bankless onchain API to MCP
Submit Your MCP Server
Share your MCP server with the community
Submit Now