Skip to main content
Glama
MCP Server for langfuse

MCP Server for langfuse

by z9905080

langfuse 用 MCP サーバー

npmバージョン

AI アシスタントを Langfuse ワークスペースに統合するためのモデル コンテキスト プロトコル (MCP) サーバー実装。

概要

このパッケージは、AIアシスタントがLangfuseワークスペースと連携できるようにするMCPサーバーを提供します。これにより、AIモデルは以下のことが可能になります。

  • 時間範囲による LLM メトリクスのクエリ

Related MCP server: langfuse-mcp-extended

インストール

# Install from npm
npm install shouting-mcp-langfuse

# Or install globally
npm install -g shouting-mcp-langfuse

パッケージはnpmで見つかります: shouting-mcp-langfuse

前提条件

サーバーを使用する前に、Langfuseプロジェクトを作成し、プロジェクトの公開鍵と秘密鍵を取得する必要があります。これらの鍵はLangfuseダッシュボードで確認できます。

  1. Langfuseプロジェクトを立ち上げる

  2. 公開鍵と秘密鍵を取得する

  3. 環境変数を設定する

構成

サーバーには次の環境変数が必要です。

  • LANGFUSE_DOMAIN : Langfuse ドメイン (デフォルト: https://api.langfuse.com )

  • LANGFUSE_PUBLIC_KEY : Langfuseプロジェクトの公開鍵

  • LANGFUSE_PRIVATE_KEY : Langfuseプロジェクトの秘密鍵

使用法

CLIツールとして実行

# Set environment variables
export LANGFUSE_DOMAIN="https://api.langfuse.com"
export LANGFUSE_PUBLIC_KEY="your-public-key"
export LANGFUSE_PRIVATE_KEY="your-private

# Run the server
mcp-server-langfuse

コード内での使用

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { langfuseClient } from "shouting-mcp-langfuse";

// Initialize the server and client
const server = new Server({...});
const langfuseClient = new LangfuseClient(process.env.LANGFUSE_DOMAIN, process.env.LANGFUSE_PUBLIC_KEY, process.env.LANGFUSE_PRIVATE_KEY);

// Register your custom handlers
// ...

利用可能なツール

サーバーは、次の langfuse 統合ツールを提供します。

  • getLLMMetricsByTimeRange : 時間範囲で LLM メトリックを取得する

ライセンス

ISC

著者

shouting.hsiao@gmail.com

リポジトリ

https://github.com/z9905080/mcp-langfuse

Available Tools

1 tool
query_llm_metricsC

Query LLM metrics

Inputs: fromTimestamp, toTimestamp, page, limit, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap with other tools. The tool's purpose is clear and unambiguous.

    Naming Consistency5/5

    The single tool uses a clear snake_case naming convention. Although there are no other tools to compare, the naming is consistent within itself.

    Tool Count1/5

    A server named 'MCP Server for langfuse' with only one tool is severely undersized. Langfuse is a comprehensive LLM observability platform expecting tools for traces, scores, sessions, etc., not just metrics queries.

    Completeness1/5

    The server lacks any tools for creating, updating, or deleting resources, and does not cover common operations like managing traces or observations. It is severely incomplete for its stated domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers