Skip to main content
Glama
langfuse

Langfuse Prompt Management MCP Server

Official
by langfuse

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 )。

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/langfuse/mcp-server-langfuse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server