LM

langfuse/mcp-server-langfuse

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

176 stars 38 forks 품질 68 트렌드 17MIT

langfuse/mcp-server-langfuse는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

langfuse/mcp-server-langfuse는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

Langfuse 프롬프트 관리를 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 모델 컨텍스트 프로토콜을 통해 Langfuse 프롬프트에 접근하고 관리할 수 있게 해줍니다.

데모

Claude 데스크톱에서 Langfuse Prompts MCP의 빠른 데모 (음성 explanations_ _unmute):

https://github.com/user-attachments/assets/61da79af-07c2-4f69-b28c-ca7c6e606405

특징

MCP 프롬프트

이 서버는 프롬프트 발견 및 검색을 위한 MCP 프롬프트 명세를 구현합니다.

  • prompts/list: 모든 사용 가능한 프롬프트 목록

  • 선택적 커서 기반 페이지네이션

  • 프롬프트 이름과 필요한 인자를 반환함, 제한: 모든 인수는 선택 사항으로 간주되며, Langfuse에 명세가 없으므로 설명을 포함하지 않습니다

  • 프롬프트가 1페이지 이상 있을 경우 페이지 지정용 다음 커서 포함

  • prompts/get: 특정 프롬프트를 받아

  • Langfuse 프롬프트(텍스트 및 채팅)를 MCP 프롬프트 객체로 변환

  • 제공된 변수로 프롬프트 컴파일

도구

프롬프트 기능을 지원하지 않는 다른 MCP 클라이언트와의 호환성을 높이기 위해, 서버는 MCP 프롬프트의 기능을 복제하는 도구들도 내보냅니다.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

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
  • 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

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": ["/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
GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector node ./build/index.js
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "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" } } } }