Langfuse 提示管理 MCP 服务器
用于Langfuse 提示管理的模型上下文协议(MCP) 服务器。此服务器允许您通过模型上下文协议访问和管理您的 Langfuse 提示。
演示
Claude Desktop 中 Langfuse Prompts MCP 的快速演示(取消静音以进行画外音解释):
https://github.com/user-attachments/assets/61da79af-07c2-4f69-b28c-ca7c6e606405
Related MCP server: MCP Tools
特征
MCP 提示
该服务器实现了MCP Prompts 规范,用于提示发现和检索。
prompts/list:列出所有可用的提示可选的基于游标的分页
返回提示名称及其所需参数,限制:所有参数都被视为可选的,并且不包括描述,因为变量在 Langfuse 中没有规范
如果提示超过一页,则包含下一个分页光标
prompts/get:获取特定提示将 Langfuse 提示(文本和聊天)转换为 MCP 提示对象
使用提供的变量编译提示
工具
为了提高与不支持提示功能的其他 MCP 客户端的兼容性,服务器还导出复制 MCP 提示功能的工具。
get-prompts:列出可用的提示用于分页的可选
cursor参数返回提示及其参数的列表
get-prompt:检索并编译特定提示必需的
name参数:要检索的提示的名称可选
arguments:带有提示变量的 JSON 对象
发展
npm install
# build current file
npm run build
# test in mcp inspector
npx @modelcontextprotocol/inspector node ./build/index.js用法
步骤 1:构建
npm install
npm run build第 2 步:将服务器添加到您的 MCP 服务器:
克劳德桌面
通过编辑claude_desktop_config.json配置 Claude for Desktop
{
"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"
}
}
}
}确保将环境变量替换为你的实际 Langfuse API 密钥。现在就可以在 Claude Desktop 中使用服务器了。
光标
将新服务器添加到 Cursor:
名称:
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
限制
MCP 服务器仍在开发中,并且存在一些限制:
仅返回 Langfuse 中带有
production标签的提示所有参数都被视为可选的,并且不包含描述,因为变量在 Langfuse 中没有规范
列表操作需要在后台单独获取每个提示来提取参数,这种方法虽然有效,但效率不高
欢迎贡献!如果您有任何建议或反馈,请打开 issue 或 PR ( repo )。
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.