A production-grade MCP server that connects any MCP-compatible AI agent to your Langfuse observability data. Query traces, debug errors, inspect
Langfuse MCP Java MCP server is a hosted integration for AI assistants that speak the Model Context Protocol. A production-grade MCP server that connects any MCP-compatible AI agent to your Langfuse observability data. Query traces, debug errors, inspect sessions, manage prompts, run evaluations, annotate data, and configure models — all through.
Once Langfuse MCP Java is connected, these are the calls the assistant has available:
fetch_traces — Paginated list of traces. Filter by userId, name, sessionId, tags, fromTimestamp, toTimestampfetch_trace — Full detail of a single trace including nested observations, input/output, metadata, latency, and token usage. Requires traceIdfind_exceptions — Traces whose level equals ERROR. Supports time range and paginationfind_exceptions_in_file — Error-level traces whose metadata contains a given file name substring. Requires fileNameget_exception_details — Full detail of a single error trace. Requires traceIdget_error_count — Count of ERROR-level traces in a time range (scans up to 500 traces)delete_trace — Permanently deletes a single trace by ID. Irreversible.delete_traces — Permanently deletes multiple traces. Pass a comma-separated list of trace IDs. Irreversible.fetch_sessions — Paginated list of sessions with optional time range filterget_session_details — Full session detail including all its traces. Requires sessionIdget_user_sessions — All sessions for a specific user with pagination. Requires userIdlist_prompts — Paginated list of all prompts in the projectYou will need 4 environment variables: LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_HOST, LANGFUSE_TIMEOUT. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
public-key + secret-key) ---Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.
Among the monitoring and observability options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Langfuse MCP Java's toolset — fetch_traces, fetch_trace, find_exceptions and 11 more — is a fair guide to whether it matches your workflow. It is maintained by log-logn; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| fetch_traces | Paginated list of traces. Filter by userId, name, sessionId, tags, fromTimestamp, toTimestamp. |
| fetch_trace | Full detail of a single trace including nested observations, input/output, metadata, latency, and token usage. Requires traceId. |
| find_exceptions | Traces whose level equals ERROR. Supports time range and pagination. |
| find_exceptions_in_file | Error-level traces whose metadata contains a given file name substring. Requires fileName. |
| get_exception_details | Full detail of a single error trace. Requires traceId. |
| get_error_count | Count of ERROR-level traces in a time range (scans up to 500 traces). |
| delete_trace | Permanently deletes a single trace by ID. **Irreversible.** |
| delete_traces | Permanently deletes multiple traces. Pass a comma-separated list of trace IDs. **Irreversible.** |
| fetch_sessions | Paginated list of sessions with optional time range filter. |
| get_session_details | Full session detail including all its traces. Requires sessionId. |
| get_user_sessions | All sessions for a specific user with pagination. Requires userId. |
| list_prompts | Paginated list of all prompts in the project. |
| get_prompt | Fetch a prompt by name. Optionally pin to a version number or a label (e.g. production, staging). |
| create_prompt | Create a new prompt or append a new version to an existing prompt. type is text (plain string) or chat (JSON array of {role, content} messages). Supports comma-separated labels and tags. |
{
"mcpServers": {
"langfuse-mcp-java": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/inspector"],
"env": {
"LANGFUSE_PUBLIC_KEY": "your-value",
"LANGFUSE_SECRET_KEY": "your-value",
"LANGFUSE_HOST": "your-value",
"LANGFUSE_TIMEOUT": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
public-key + secret-key) ---| Variable | Description | Required |
|---|---|---|
| LANGFUSE_PUBLIC_KEY | Credential the server authenticates with. | Yes |
| LANGFUSE_SECRET_KEY | Credential the server authenticates with. | Yes |
| LANGFUSE_HOST | Endpoint or connection string the server talks to. | Optional |
| LANGFUSE_TIMEOUT | Configuration value read at startup. | Optional |
Give your coding agent the full DevTools toolbox: traces, network, console, heap snapshots and Lighthouse.
Dashboards, Prometheus and Loki queries, incidents and alerts — observability by conversation.
Errors with full context — stack traces, issue triage and AI-powered root-cause analysis from Sentry's server.
Enables enhanced web research capabilities for large language models through intelligent search queuing and advanced content extraction.
Automates browser interactions and enables Large Language Models (LLMs) to interact with web pages through Playwright and Chrome DevTools Protocol
Guides tool usage by providing recommendations for MCP tools at each problem-solving stage.