/ ディレクトリ / プレイグラウンド / Langfuse MCP
● 公式 langfuse ⚡ 即起動

Langfuse MCP

作者 langfuse · langfuse/mcp-server-langfuse

Manage Langfuse LLM-observability prompts from your agent.

Langfuse is open-source LLM observability and prompt management. This MCP lets Claude read prompt versions, fetch traces, and update prompt templates — useful for prompt engineers who want their assistant to actually touch the prompt store.

なぜ使うのか

主な機能

ライブデモ

実際の動作

langfuse-mcp.replay ▶ 準備完了
0/0

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "langfuse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@langfuse/mcp-server"
      ]
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "langfuse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@langfuse/mcp-server"
      ]
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "langfuse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@langfuse/mcp-server"
      ]
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "langfuse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@langfuse/mcp-server"
      ]
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "langfuse-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@langfuse/mcp-server"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "langfuse-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@langfuse/mcp-server"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add langfuse-mcp -- npx -y @langfuse/mcp-server

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: Langfuse MCP

Iterate on a production prompt with traceable versions

👤 Prompt engineers ⏱ ~15 min intermediate

使うタイミング: You want to A/B a prompt without leaving the chat.

前提条件
  • Server/skill installed and authenticated — See repo README
フロー
  1. Pull the current production prompt
    Get the 'support-triage' prompt labeled 'production' from Langfuse.✓ コピーしました
    → Current prompt text + version number
  2. Test a tweak
    Create version with my proposed change labeled 'staging'. Don't promote.✓ コピーしました
    → New version saved, 'production' label untouched

結果: Versioned, reviewable prompt history.

注意点
  • Labels are mutable — Labels are mutable — moving 'production' to a new version is an instant rollout. Confirm before relabel.
組み合わせ: filesystem

組み合わせ

他のMCPと組み合わせて10倍の力を

langfuse-mcp + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
get_prompt name, version|label Retrieve a prompt for inspection or copying 1 API call
create_prompt name, prompt_text, labels Save a new version 1 API call
list_traces user_id|session_id, limit Debug a specific user/session 1 API call

コストと制限

運用コスト

APIクォータ
See provider docs for rate limits
呼び出しあたりのトークン
Varies by tool
金額
See repo README for pricing details
ヒント
Cache tool results and avoid repeated identical calls.

セキュリティ

権限、シークレット、影響範囲

認証情報の保管: Use environment variables; never commit secrets
データ送信先: Tool calls go to the provider's API as documented

トラブルシューティング

よくあるエラーと対処法

401 Unauthorized

Create a project in Langfuse, generate a key pair, set LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY.

確認: get_prompt on a known name works
prompt not found

Prompts are project-scoped. Confirm LANGFUSE_HOST and that the prompt exists in the target project.

確認: Open the Langfuse UI for that project

代替案

Langfuse MCP 他との比較

代替案代わりに使う場面トレードオフ
comet-ml/opik-mcpYou already use Opik for tracingSimilar feature set; different vendor

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る