跳到正文
FunCoding

langfuse

官方 MCP Registry 已收录

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

Star
81
分类
其他
版本
v0.1.3
许可证
MIT
最近提交
2026年11月25日

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

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

# Install dependencies
npm run install-all

# Build
npm run build

# Development mode
npm run dev

# Run functional tests
npm test

# Run integration tests
npm run test:integration

# Run manual tests (requires .env with real credentials)
npm run test:manual

License

MIT

同类 MCP Server

官方

Time

Current time lookup and conversion between IANA timezones

MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star

官方

Everything

Reference server that exercises every MCP feature: tools, resources, prompts, sampling and more

MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star

官方

Context7

Up-to-date docs for AI agents

UPupstash/context766k近 7 天新增 359 个 star

Reactive Resume

Free open-source resume builder with remote MCP tools for resumes and job applications.

REreactive-resume/reactive-resume46k近 7 天新增 219 个 star

mcp-server

Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more

HEHeyPuter/puter44k近 7 天新增 63 个 star