@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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选