@jurislm/langfuse-mcp

@jurislm/langfuse-mcp

MCP server for Langfuse providing 50 tools for prompt management, observability, instance/organization management, and metrics tracking via natural language.

Category
Visit Server

README

@jurislm/langfuse-mcp

MCP (Model Context Protocol) server for Langfuse — provides 50 tools for prompt management, observability, instance/organization management, and metrics tracking via natural language.

Tools (50)

Prompt Management (6 tools)

  • listPrompts — List and filter prompts with pagination, labels, tags
  • getPrompt — Fetch a specific prompt version with resolved dependencies
  • createTextPrompt — Create a text prompt version (supports {{variable}} syntax)
  • createChatPrompt — Create a chat prompt with role-based messages
  • getPromptUnresolved — Fetch a prompt without resolving dependencies (for debugging composition)
  • updatePromptLabels — Update labels for a prompt version (labels are unique across versions)

Traces (2 tools)

  • listTraces — List traces with pagination and optional filters (name, userId, tags, timestamps)
  • getTrace — Get a single trace with full details, observations, and scores

Observations (2 tools)

  • listObservations — List observations (generations, spans, events) with filters by type and name
  • getObservation — Get a single observation with complete details (input, output, model, usage, duration)

Scores (2 tools)

  • createScore — Create a score for a trace or observation (for evals, feedback, quality metrics)
  • listScores — List scores with pagination and optional filters

Sessions (1 tool)

  • listSessions — List sessions that group related traces together across time ranges

Datasets (8 tools)

  • listDatasets — List datasets for evals and benchmarking with search and pagination
  • getDataset — Get dataset details with metadata and item counts
  • createDataset — Create a new dataset for evals or benchmarking
  • listDatasetItems — List items in a dataset with pagination (input/output pairs)
  • createDatasetItem — Add an input/output pair to a dataset for eval testing
  • getDatasetItem — Get a single dataset item by ID
  • listDatasetRuns — List eval execution runs (traces using this dataset)
  • getDatasetRun — Get details of a dataset run (eval execution)

Metrics (2 tools)

  • getDailyMetrics — Get daily metrics for traces and observations (latency, tokens, scores, cost)
  • getUsageSummary — Get usage summary for a time period (total traces, observations, tokens, cost)

Score Configurations (4 tools)

  • listScoreConfigs — List all score configurations (custom score names and data types)
  • getScoreConfig — Get details of a score configuration including name, data type, and categories
  • createScoreConfig — Create a new score configuration for custom scoring metrics
  • updateScoreConfig — Update an existing score configuration

Project (1 tool)

  • getProject — Get current project details (name, API keys, limits, usage)

Instance Management (8 tools)

  • listInstances — List all Langfuse instances with pagination
  • getInstance — Get details of a specific instance
  • createInstance — Create a new instance
  • updateInstance — Update an existing instance
  • deleteInstance — Delete an instance
  • listInstanceEvents — List events for an instance
  • getInstanceStatus — Get health and status information
  • configureInstanceSettings — Configure advanced settings

Organization Projects (5 tools)

  • listOrganizationProjects — List all projects within an organization
  • getOrganizationProject — Get details of a specific project
  • createOrganizationProject — Create a new project in an organization
  • updateOrganizationProject — Update an existing project
  • deleteOrganizationProject — Delete a project from an organization

Organization API Keys (3 tools)

  • listOrganizationApiKeys — List all API keys for an organization
  • createOrganizationApiKey — Create a new API key
  • deleteOrganizationApiKey — Delete an API key

Organization Memberships (6 tools)

  • listOrganizationMembers — List all members of an organization
  • addOrganizationMember — Add a new member to an organization
  • updateOrganizationMember — Update a member's role or permissions
  • removeOrganizationMember — Remove a member from an organization
  • listProjectMembers — List members with access to a specific project
  • updateProjectMember — Update a member's access level for a project

Setup

Environment Variables

# Public API (Required for Prompt Management, Traces, Observations, Scores, Sessions, etc.)
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...

# Instance/Organization Management APIs (Required for Instance and Organization tools)
LANGFUSE_ADMIN_API_KEY=adm-lf-...

# Optional: Organization-specific API key for additional org-level tools
LANGFUSE_ORG_API_KEY=org-lf-...

# Optional: API Server (defaults to https://cloud.langfuse.com)
LANGFUSE_HOST=https://cloud.langfuse.com
# US region: https://us.cloud.langfuse.com

Usage with Claude Code (via npx)

Add to your MCP configuration (.mcp.json or ~/.claude/settings.json):

{
  "mcpServers": {
    "langfuse": {
      "command": "bunx",
      "args": ["@jurislm/langfuse-mcp@latest"],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "pk-lf-...",
        "LANGFUSE_SECRET_KEY": "sk-lf-...",
        "LANGFUSE_HOST": "https://cloud.langfuse.com"
      }
    }
  }
}

Note: Requires Bun installed globally (curl -fsSL https://bun.sh/install | bash).

Usage with Claude Code Plugin (jurislm-tools)

If you use the jurislm-tools Claude Code plugin, jt:langfuse is included:

/plugin marketplace update jurislm-tools

Then set environment variables in ~/.zshenv:

export LANGFUSE_PUBLIC_KEY=pk-lf-...
export LANGFUSE_SECRET_KEY=sk-lf-...
export LANGFUSE_HOST=https://us.cloud.langfuse.com

Development

bun install
bun run dev        # Run locally (stdio transport)
bun run build      # Build to dist/
bun run typecheck  # TypeScript check
bun run lint       # ESLint (max-warnings=0)

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured