TypeScript MCP server exposing Langfuse Public API for querying traces, observations, sessions, scores, prompts, datasets, and metrics.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Langfuse MCP.
listTracesList traces with filters. Returns summary metadata.
getTraceFetch a single trace by id including the full observation tree.
listObservationsList spans, generations, and events with filters.
getObservationFetch a single observation by id.
listSessionsList sessions within a time range.
getSessionFetch a session by id, including its traces.
An MCP server that exposes the Langfuse REST API as tools, so Claude (or any MCP client) can query your traces, observations, sessions, scores, prompts, datasets, and metrics during a conversation.
Useful when you want to ask things like:
abc123 fail? Walk me through its observations."level=ERROR for user alice@x.com."customer-support-v2."โฆwithout leaving your assistant.
node --version).All tools are read-only and call the Langfuse Public API over HTTPS using your project keys for Basic Auth.
| Tool | Description |
|---|---|
listTraces | List traces with filters. Returns summary metadata. |
getTrace | Fetch a single trace by id including the full observation tree. |
listObservations | List spans, generations, and events with filters. |
getObservation | Fetch a single observation by id. |
| Tool | Description |
|---|---|
listSessions | List sessions within a time range. |
getSession | Fetch a session by id, including its traces. |
| Tool | Description |
|---|---|
listScores | List scores with filters. |
getScore | Fetch a single score by id. |
listScoreConfigs | List score configurations (definitions, ranges, categories). |
getScoreConfig | Fetch a score configuration by id. |
| Tool | Description |
|---|---|
listPrompts | List prompt definitions, optionally filtered by name, label, or tag. |
getPrompt | Fetch a prompt by name, optionally pinned to a specific version or label. |
| Tool | Description |
|---|---|
listDatasets | List datasets configured in Langfuse. |
getDataset | Fetch a dataset by name. |
listDatasetItems | List items in a dataset (inputs, expected outputs, metadata). |
getDatasetItem | Fetch a single dataset item by id. |
listDatasetRuns | List evaluation runs for a dataset. |
getDatasetRun | Fetch a specific dataset run by name. |
| Tool | Description |
|---|---|
getMetrics | Run a custom metrics query (counts, latency, cost, token usage). Pass a JSON query string. |
getDailyMetrics | Daily aggregated usage / cost / count metrics. |
listModels | List models known to Langfuse (for cost / token attribution). |
getModel | Fetch a model definition by id. |
listProjects | List projects accessible to the current API key. |
listComments | List comments attached to traces, observations, sessions, or prompts. |
getComment | Fetch a single comment by id. |
getMedia | Fetch metadata for a media attachment (image, audio, file). |
getHealth | Ping the Langfuse public health endpoint โ useful for credential validation. |
Zero install with npx:
Or install globally:
The server reads three environment variables:
| Variable | Required | Description |
|---|---|---|
LANGFUSE_PUBLIC_KEY | yes | Project public key (pk-lf-โฆ). |
LANGFUSE_SECRET_KEY | yes | Project secret key (sk-lf-โฆ). |
LANGFUSE_BASE_URL | yes | e.g. https://cloud.langfuse.com (EU) or https://us.cloud.langfuse.com (US) or your self-hosted URL. |
LANGFUSE_ENV_FILE | no | Optional path to a .env file to load instead of ./.env. |
Where do I get my keys? In the Langfuse UI: Settings โ API Keys โ Create new API keys. Keys are scoped to a single project and a single region (EU vs US are separate accounts โ match your
LANGFUSE_BASE_URLto the region you created the keys in).
If a .env file exists in the working directory it will be loaded automatically. See .env.example for a starter file.
Edit claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonRestart Claude Desktop after editing. The MCP server icon should appear in the chat input.
Project-level (./.mcp.json):
User-level config lives at ~/.claude.json and uses the same shape.
Project-level: .cursor/mcp.json. User-level: ~/.cursor/mcp.json.
In VS Code settings (settings.json):
In ~/.continue/config.json:
In Windsurf's MCP settings, add:
The server speaks MCP over stdio. Any MCP client can launch it as a subprocess:
Once wired up, ask your assistant things like:
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/hugoles-langfuse-mcp)<a href="https://allmcps.com/mcp/hugoles-langfuse-mcp"><img src="https://allmcps.com/api/badge/hugoles-langfuse-mcp?style=directory" alt="Langfuse MCP on AllMCPs" /></a>