npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

langfuse-mcp-extended

v0.1.2

Published

Comprehensive MCP server for Langfuse - Traces, Scores, Datasets

Readme

Langfuse MCP Server

A comprehensive Model Context Protocol (MCP) server for Langfuse, providing AI assistants with access to traces, scores, datasets, and more.

Features

  • Traces: List, get, and delete traces with full filtering
  • Observations: Query generations, spans, and events
  • Scores: Full CRUD operations for evaluation scores
  • Score Configs: Manage score configurations
  • Datasets: Complete dataset management including items and runs
  • Sessions: Access session data
  • Prompts: (Optional) Extended prompt management

Installation

npm install langfuse-mcp-extended

Or run directly with npx:

npx langfuse-mcp-extended

Quick Setup with Claude Code

claude mcp add langfuse -- npx -y langfuse-mcp-extended

Configuration

Set the following environment variables:

LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_BASE_URL=https://cloud.langfuse.com  # or your self-hosted URL

Optional Configuration

MCP_ENABLE_PROMPTS=false  # Enable prompt tools (default: false, use official MCP for prompts)
LOG_LEVEL=info            # debug, info, warn, error

Usage with Claude Code

Add to your project's .mcp.json file:

{
  "langfuse": {
    "command": "npx",
    "args": ["-y", "langfuse-mcp-extended"],
    "env": {
      "LANGFUSE_PUBLIC_KEY": "pk-lf-...",
      "LANGFUSE_SECRET_KEY": "sk-lf-...",
      "LANGFUSE_BASE_URL": "https://cloud.langfuse.com"
    }
  }
}

Usage with Claude Desktop

Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "langfuse": {
      "command": "npx",
      "args": ["-y", "langfuse-mcp-extended"],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "pk-lf-...",
        "LANGFUSE_SECRET_KEY": "sk-lf-...",
        "LANGFUSE_BASE_URL": "https://cloud.langfuse.com"
      }
    }
  }
}

Usage with Cursor

Add to your Cursor MCP settings:

{
  "mcp": {
    "servers": {
      "langfuse": {
        "command": "npx",
        "args": ["-y", "langfuse-mcp-extended"],
        "env": {
          "LANGFUSE_PUBLIC_KEY": "pk-lf-...",
          "LANGFUSE_SECRET_KEY": "sk-lf-...",
          "LANGFUSE_BASE_URL": "https://cloud.langfuse.com"
        }
      }
    }
  }
}

Available Tools

Traces

  • listTraces - List traces with filtering and pagination
  • getTrace - Get a specific trace with full details
  • deleteTrace - Delete a trace

Observations

  • listObservations - List observations (generations, spans, events)
  • getObservation - Get a specific observation

Scores

  • createScore - Create a score for a trace or observation
  • listScores - List scores with filtering
  • getScore - Get a specific score
  • deleteScore - Delete a score

Score Configs

  • createScoreConfig - Create a score configuration
  • listScoreConfigs - List all score configurations
  • getScoreConfig - Get a specific score configuration

Datasets

  • createDataset - Create a new dataset
  • listDatasets - List all datasets
  • getDataset - Get a dataset by name
  • createDatasetItem - Create or update a dataset item
  • listDatasetItems - List items in a dataset
  • getDatasetItem - Get a specific dataset item
  • deleteDatasetItem - Delete a dataset item
  • createDatasetRunItem - Link a trace to a dataset item
  • listDatasetRuns - List runs for a dataset
  • getDatasetRun - Get a specific dataset run

Sessions

  • listSessions - List sessions
  • getSession - Get a specific session

Prompts (Optional)

  • getPrompt - Get a prompt by name
  • listPrompts - List all prompts
  • createTextPrompt - Create a text prompt
  • createChatPrompt - Create a chat prompt
  • updatePromptLabels - Update prompt labels

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build
npm run build

# Run unit tests
npm test

# Run integration tests (requires Langfuse credentials)
npm run test:integration

# Run all tests
npm run test:all

# Type check
npm run typecheck

# Lint
npm run lint

Test Coverage

  • 59 unit tests - All tools with mocked API
  • 18 integration tests - Real API calls against Langfuse

Upstream Contribution

This project is designed to be contributed to the official Langfuse MCP server. We're actively working with the Langfuse team:

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

Related