Langfuse

com.pulsemcp由 pulsemcp.com 发布v0.1.3更新于 Nov 3, 2026

MCP server for Langfuse LLM observability — trace and observation analysis.

已验证STDIO仅桌面安全与监控AI 与机器学习

概览

AI 生成的概览

用于 Langfuse LLM 可观测性的只读 MCP 服务器,让助手浏览、筛选并深入查看 trace 与 observation 数据、成本和延迟。

可以做什么
  • 按名称、用户、会话、标签、时间戳和环境列出并筛选 trace,支持分页与精简摘要
  • 按 ID 获取完整 trace,包含嵌套 observation、评分、输入输出和元数据
  • 按 trace ID、类型(GENERATION、SPAN、EVENT)、模型或级别列出 observation
  • 获取单个 observation 的输入、输出、模型参数、用量和成本明细
  • 读取服务器配置与状态资源,便于排查问题
  • 处理超大负载:超过 1000 字符的字符串会被截断,完整内容保存到临时文件并返回路径,便于用 grep 检索
适用场景
适合已经使用 Langfuse、希望助手在对话中调试 LLM 流水线、查看提示词与补全内容,或分析 token 用量、成本和延迟的场景。它是只读的,适合排查分析而非修改 Langfuse 中的数据。
运行要求
通过 npx(Node.js)以 stdio 本地进程运行,需在桌面客户端中配置。需要 Langfuse 公钥(LANGFUSE_PUBLIC_KEY)和密钥(LANGFUSE_SECRET_KEY);LANGFUSE_BASE_URL 可选,默认指向 Langfuse 云端地址。需要能访问 Langfuse API 的网络。
安装前请注意
需要 Langfuse API 凭据(LANGFUSE_PUBLIC_KEY 与 LANGFUSE_SECRET_KEY)并保存在客户端配置中,应按机密信息对待。trace 数据(包括提示词和补全内容)会发送给助手,超大负载还会写入本机临时文件,可能暴露敏感内容。该服务器声明为只读,不提供写入操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Langfuse,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Langfuse MCP Server

MCP server for readonly analysis of Langfuse LLM traces and observations. Designed to help agents deeply inspect trace data, debug LLM pipelines, and analyze costs and latency.

Highlights

  • Browse and filter traces by name, user, session, tags, timestamps, and environment
  • Drill into full trace details including all nested observations and scores
  • List and filter observations by type (GENERATION, SPAN, EVENT), model, level, and more
  • Automatic truncation of large payloads (>1000 chars) to /tmp files with grep-friendly references
  • Read-only — no write operations, safe to use without risk of data modification

Capabilities

Tools

ToolDescription
get_tracesList traces with filtering and pagination. Returns minimal summary (no I/O fields).
get_trace_detailGet full trace by ID including observations, scores, input/output, and metadata.
get_observationsList observations with filtering by traceId, type, level, etc. Returns minimal summary.
get_observationGet full observation by ID including input, output, model parameters, usage, and cost details.

Resources

ResourceDescription
langfuse://configServer configuration and status (for debugging)

Large Payload Handling

Trace and observation data often contains very large input/output fields (full prompts, completions, etc.). This server automatically:

  1. Truncates any string field longer than 1000 characters
  2. Saves the full content to a /tmp/langfuse_*.txt file
  3. Includes the file path in the truncated output

Agents can then use grep to search within these files for specific content without loading the entire payload into context.

Configuration

Environment Variables

VariableRequiredDescriptionDefault
LANGFUSE_SECRET_KEYYesLangfuse secret key (sk-lf-...)-
LANGFUSE_PUBLIC_KEYYesLangfuse public key (pk-lf-...)-
LANGFUSE_BASE_URLNoLangfuse API base URLhttps://cloud.langfuse.com

Claude Desktop Configuration

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{  "mcpServers": {    "langfuse": {      "command": "npx",      "args": ["-y", "langfuse-observability-mcp-server"],      "env": {        "LANGFUSE_SECRET_KEY": "sk-lf-your-secret-key",        "LANGFUSE_PUBLIC_KEY": "pk-lf-your-public-key",        "LANGFUSE_BASE_URL": "https://us.cloud.langfuse.com"      }    }  }}

Development

bash
# Install dependenciesnpm run install-all
# Buildnpm run build
# Development modenpm run dev
# Run functional testsnpm test
# Run integration testsnpm run test:integration
# Run manual tests (requires .env with real credentials)npm run test:manual

License

MIT

来源:experimental/langfuse/README.md,提交 0ed34de

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分