Langfuse MCP Java MCP Server

A production-grade MCP server that connects any MCP-compatible AI agent to your Langfuse observability data. Query traces, debug errors, inspect

Remote serverstreamable-httpPython

What is the Langfuse MCP Java MCP Server?

A production-grade MCP server that connects any MCP-compatible AI agent to your Langfuse observability data. Query traces, debug errors, inspect sessions, manage

Configuration and credentials

  • Java 21 or later - Maven 3.9+ (or use the Docker build — no local Maven required) - A Langfuse account with an API key pair (public-key + secret-key) ---

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
fetch_tracesPaginated list of traces. Filter by userId, name, sessionId, tags, fromTimestamp, toTimestamp.
fetch_traceFull detail of a single trace including nested observations, input/output, metadata, latency, and token usage. Requires traceId.
find_exceptionsTraces whose level equals ERROR. Supports time range and pagination.
find_exceptions_in_fileError-level traces whose metadata contains a given file name substring. Requires fileName.
get_exception_detailsFull detail of a single error trace. Requires traceId.
get_error_countCount of ERROR-level traces in a time range (scans up to 500 traces).
delete_tracePermanently deletes a single trace by ID. **Irreversible.**
delete_tracesPermanently deletes multiple traces. Pass a comma-separated list of trace IDs. **Irreversible.**
fetch_sessionsPaginated list of sessions with optional time range filter.
get_session_detailsFull session detail including all its traces. Requires sessionId.
get_user_sessionsAll sessions for a specific user with pagination. Requires userId.
list_promptsPaginated list of all prompts in the project.
get_promptFetch a prompt by name. Optionally pin to a version number or a label (e.g. production, staging).
create_promptCreate 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.

Configuration

  • Java 21 or later - Maven 3.9+ (or use the Docker build — no local Maven required) - A Langfuse account with an API key pair (public-key + secret-key) ---
VariableDescriptionRequired
LANGFUSE_PUBLIC_KEYCredential the server authenticates with.Yes
LANGFUSE_SECRET_KEYCredential the server authenticates with.Yes
LANGFUSE_HOSTEndpoint or connection string the server talks to.Optional
LANGFUSE_TIMEOUTConfiguration value read at startup.Optional

Example prompts to try

  • “Use Langfuse MCP Java to fetch traces.”
  • “Use Langfuse MCP Java to fetch trace.”
  • “Use Langfuse MCP Java to find exceptions.”

Frequently asked questions

A production-grade MCP server that connects any MCP-compatible AI agent to your Langfuse observability data. Query traces, debug errors, inspect sessions, manage Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.