Langfuse MCP by usefulapi

Read traces, metrics, scores, prompts and datasets; add scores to traces in Langfuse.

使うべきか

品質と安全性

A
説明の品質
100%
スキーマの完全性
89%
命名の品質
79%
ポイズニングのリスク
100%
権限の一致
100%
プロトコルへの準拠
100%

検出事項(1)

  • LOWTool 'langfuse_list_annotation_queues' name length outside 3-30 rangelangfuse_list_annotation_queues 内

ツール定義とプロトコルへの準拠に関する自動分析に基づいています。

コンテキストコスト

~2,968トークン数(ツール定義)
~1.7 KB一般的なレスポンスサイズ
注意への影響は大きい(128k コンテキストの 2.32%)

これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。

インストール

ワンクリックインストール

これを `claude_desktop_config.json` ファイルに追加してください:

{
  "mcpServers": {
    "langfuse": {
      "url": "https://langfuse.usefulapi.io/mcp"
    }
  }
}

リモートエンドポイント

https://langfuse.usefulapi.io/mcpstreamable-http

できること

ツール一覧

ツール(14)

🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢langfuse_get_project

Get the Langfuse project this key pair belongs to (id and name). Good first call to confirm the connection. Langfuse API: GET /api/public/projects.

入力スキーマ

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_observations(trace_id, is_root_observation, name, user_id, session_id, ...)

List observations, the spans, generations and events of your LLM traces, newest first. Set is_root_observation to true to list traces (one root observation per trace). Use fields to choose response groups (default core,basic; add io, usage, model, metadata when needed). Langfuse API: GET /api/public/v2/observations.

入力スキーマ

{
  "type": "object",
  "properties": {
    "trace_id": {
      "description": "Only observations of this trace id.",
      "type": "string"
    },
    "is_root_observation": {
      "description": "true = only root observations (one per trace).",
      "type": "boolean"
    },
    "name": {
      "description": "Only observations with this name.",
      "type": "string"
    },
    "user_id": {
      "description": "Only observations of this user id.",
      "type": "string"
    },
    "session_id": {
      "description": "Only observations of this session id.",
      "type": "string"
    },
    "type": {
      "description": "Observation type, for example GENERATION, SPAN, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL.",
      "type": "string"
    },
    "level": {
      "description": "Only this log level.",
      "type": "string",
      "enum": [
        "DEBUG",
        "DEFAULT",
        "WARNING",
        "ERROR"
      ]
    },
    "environment": {
      "description": "Only this environment, for example production.",
      "type": "string"
    },
    "from_start_time": {
      "description": "Only observations that start at or after this time.",
      "type": "string"
    },
    "to_start_time": {
      "description": "Only observations that start before this time.",
      "type": "string"
    },
    "filter": {
      "description": "Advanced filter: a JSON array of conditions, for example [{\"type\":\"string\",\"column\":\"name\",\"operator\":\"contains\",\"value\":\"rag\"}].",
      "type": "string"
    },
    "fields": {
      "description": "Comma-separated field groups: core, basic, time, io, metadata, model, usage, prompt, metrics, trace_context.",
      "type": "string"
    },
    "parse_io_as_json": {
      "description": "true = parse input and output strings as JSON.",
      "type": "boolean"
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "cursor": {
      "description": "Cursor from meta.cursor of the previous page.",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_get_metrics(query)

Run an aggregate query for counts, token usage, cost, latency or scores over observations or scores. "query" is a JSON object with view (observations, scores-numeric, scores-boolean or scores-categorical), optional dimensions, metrics (each with measure and aggregation) and filters. Langfuse API: GET /api/public/v2/metrics.

入力スキーマ

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "JSON object, for example {\"view\":\"observations\",\"metrics\":[{\"measure\":\"count\",\"aggregation\":\"count\"}]}."
    }
  },
  "required": [
    "query"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_scores(name, source, data_type, trace_id, observation_id, ...)

List scores (quality ratings from humans, the API or evaluators) on traces, observations or sessions. Filter by name, source, data type or the object scored. Langfuse API: GET /api/public/v3/scores.

入力スキーマ

{
  "type": "object",
  "properties": {
    "name": {
      "description": "Only scores with this name.",
      "type": "string"
    },
    "source": {
      "description": "Only scores from this source.",
      "type": "string",
      "enum": [
        "ANNOTATION",
        "API",
        "EVAL"
      ]
    },
    "data_type": {
      "description": "Only scores of this data type.",
      "type": "string",
      "enum": [
        "NUMERIC",
        "BOOLEAN",
        "CATEGORICAL",
        "CORRECTION",
        "TEXT"
      ]
    },
    "trace_id": {
      "description": "Only scores on this trace id.",
      "type": "string"
    },
    "observation_id": {
      "description": "Only scores on this observation id.",
      "type": "string"
    },
    "session_id": {
      "description": "Only scores on this session id.",
      "type": "string"
    },
    "config_id": {
      "description": "Only scores made with this score config id.",
      "type": "string"
    },
    "from_timestamp": {
      "description": "ISO 8601 time, for example 2026-11-01T00:00:00Z.",
      "type": "string"
    },
    "to_timestamp": {
      "description": "ISO 8601 time, for example 2026-11-01T00:00:00Z.",
      "type": "string"
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "cursor": {
      "description": "Cursor from meta.cursor of the previous page.",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_score_configs(page, limit)

List score configs: the named scores your project defines (data type, value range, categories). Langfuse API: GET /api/public/score-configs.

入力スキーマ

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_prompts(name, label, tag, from_updated_at, to_updated_at, ...)

List prompt names in the project, with their labels, tags and versions. Filter by name, label or tag. Langfuse API: GET /api/public/v2/prompts.

入力スキーマ

{
  "type": "object",
  "properties": {
    "name": {
      "description": "Only prompts with this name.",
      "type": "string"
    },
    "label": {
      "description": "Only prompts that carry this label, for example production.",
      "type": "string"
    },
    "tag": {
      "description": "Only prompts with this tag.",
      "type": "string"
    },
    "from_updated_at": {
      "description": "ISO 8601 time, for example 2026-11-01T00:00:00Z.",
      "type": "string"
    },
    "to_updated_at": {
      "description": "ISO 8601 time, for example 2026-11-01T00:00:00Z.",
      "type": "string"
    },
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_get_prompt(prompt_name, version, label, resolve)

Get one prompt version: its text or chat messages, config, labels and tags. Pick a version number or a label (default: the latest). Langfuse API: GET /api/public/v2/prompts/{promptName}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "prompt_name": {
      "type": "string",
      "description": "The prompt name (from langfuse_list_prompts)."
    },
    "version": {
      "description": "Version number.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "label": {
      "description": "Label to resolve, for example production.",
      "type": "string"
    },
    "resolve": {
      "description": "true = resolve linked prompt references in the text.",
      "type": "boolean"
    }
  },
  "required": [
    "prompt_name"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_datasets(page, limit)

List evaluation datasets in the project. Langfuse API: GET /api/public/v2/datasets.

入力スキーマ

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_get_dataset(dataset_name)

Get one dataset by name: its description, metadata and item count. Langfuse API: GET /api/public/v2/datasets/{datasetName}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "dataset_name": {
      "type": "string",
      "description": "The dataset name (from langfuse_list_datasets)."
    }
  },
  "required": [
    "dataset_name"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_dataset_items(dataset_name, source_trace_id, source_observation_id, version, page, ...)

List the items (inputs and expected outputs) of datasets, filterable by dataset name or by the trace or observation they came from. Langfuse API: GET /api/public/dataset-items.

入力スキーマ

{
  "type": "object",
  "properties": {
    "dataset_name": {
      "description": "Only items of this dataset.",
      "type": "string"
    },
    "source_trace_id": {
      "description": "Only items created from this trace id.",
      "type": "string"
    },
    "source_observation_id": {
      "description": "Only items created from this observation id.",
      "type": "string"
    },
    "version": {
      "description": "Only items as they were at this time (ISO 8601).",
      "type": "string"
    },
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_models(page, limit)

List the model definitions used for cost and token tracking (name, match pattern, prices per unit). Langfuse API: GET /api/public/models.

入力スキーマ

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_comments(object_type, object_id, author_user_id, page, limit)

List comments that people left on traces, observations, sessions or prompts. Filter by object type, object id or author. Langfuse API: GET /api/public/comments.

入力スキーマ

{
  "type": "object",
  "properties": {
    "object_type": {
      "description": "For example TRACE, OBSERVATION, SESSION or PROMPT.",
      "type": "string"
    },
    "object_id": {
      "description": "Only comments on this object id.",
      "type": "string"
    },
    "author_user_id": {
      "description": "Only comments by this author user id.",
      "type": "string"
    },
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢langfuse_list_annotation_queues(page, limit)

List annotation queues: review queues where people score traces or observations by hand. Langfuse API: GET /api/public/annotation-queues.

入力スキーマ

{
  "type": "object",
  "properties": {
    "page": {
      "description": "Page number (default 1).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "limit": {
      "description": "Items per page (default 50, max 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴langfuse_create_score(name, value, trace_id, observation_id, session_id, ...)

Add one score to a trace, observation or session, for example a quality rating from your own check. The value is a number for NUMERIC and BOOLEAN (0 or 1) scores, and text for CATEGORICAL and TEXT scores. Give trace_id, observation_id or session_id. This creates a new record each call. Langfuse API: POST /api/public/scores.

入力スキーマ

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Score name, for example quality or hallucination."
    },
    "value": {
      "description": "Number for NUMERIC or BOOLEAN (0/1); text for CATEGORICAL or TEXT.",
      "type": [
        "number",
        "string"
      ]
    },
    "trace_id": {
      "description": "Trace id to score.",
      "type": "string"
    },
    "observation_id": {
      "description": "Observation id to score.",
      "type": "string"
    },
    "session_id": {
      "description": "Session id to score.",
      "type": "string"
    },
    "data_type": {
      "description": "Data type; inferred from config_id when given.",
      "type": "string",
      "enum": [
        "NUMERIC",
        "BOOLEAN",
        "CATEGORICAL",
        "CORRECTION",
        "TEXT"
      ]
    },
    "config_id": {
      "description": "Score config id (from langfuse_list_score_configs).",
      "type": "string"
    },
    "comment": {
      "description": "Free-text comment on the score.",
      "type": "string"
    }
  },
  "required": [
    "name",
    "value"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

コミュニティ

このサーバーを評価する

エビデンス

最近の観測

検証済みバージョンは記録されていませんツール 14 件