@jurislm/langfuse-mcp
MCP server for Langfuse providing 50 tools for prompt management, observability, instance/organization management, and metrics tracking via natural language.
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, tagsgetPrompt— Fetch a specific prompt version with resolved dependenciescreateTextPrompt— Create a text prompt version (supports{{variable}}syntax)createChatPrompt— Create a chat prompt with role-based messagesgetPromptUnresolved— 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 namegetObservation— 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 paginationgetDataset— Get dataset details with metadata and item countscreateDataset— Create a new dataset for evals or benchmarkinglistDatasetItems— List items in a dataset with pagination (input/output pairs)createDatasetItem— Add an input/output pair to a dataset for eval testinggetDatasetItem— Get a single dataset item by IDlistDatasetRuns— 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 categoriescreateScoreConfig— Create a new score configuration for custom scoring metricsupdateScoreConfig— 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 paginationgetInstance— Get details of a specific instancecreateInstance— Create a new instanceupdateInstance— Update an existing instancedeleteInstance— Delete an instancelistInstanceEvents— List events for an instancegetInstanceStatus— Get health and status informationconfigureInstanceSettings— Configure advanced settings
Organization Projects (5 tools)
listOrganizationProjects— List all projects within an organizationgetOrganizationProject— Get details of a specific projectcreateOrganizationProject— Create a new project in an organizationupdateOrganizationProject— Update an existing projectdeleteOrganizationProject— Delete a project from an organization
Organization API Keys (3 tools)
listOrganizationApiKeys— List all API keys for an organizationcreateOrganizationApiKey— Create a new API keydeleteOrganizationApiKey— Delete an API key
Organization Memberships (6 tools)
listOrganizationMembers— List all members of an organizationaddOrganizationMember— Add a new member to an organizationupdateOrganizationMember— Update a member's role or permissionsremoveOrganizationMember— Remove a member from an organizationlistProjectMembers— List members with access to a specific projectupdateProjectMember— 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
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。