Skip to content
FunCoding

langfuse

Listed in the official MCP Registry

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

Star
81
Category
Other
Version
v0.1.3
License
MIT
Last commit
Nov 25, 2026

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

Similar MCP servers

Official

Time

Current time lookup and conversion between IANA timezones

MOmodelcontextprotocol/servers92k166 new stars in the last 7 days

Official

Everything

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

MOmodelcontextprotocol/servers92k166 new stars in the last 7 days

Official

Context7

Up-to-date docs for AI agents

UPupstash/context766k288 new stars in the last 7 days

Reactive Resume

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

REreactive-resume/reactive-resume46k169 new stars in the last 7 days

mcp-server

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

HEHeyPuter/puter44k50 new stars in the last 7 days