This project provides a Model Context Protocol (MCP) server for Langfuse, allowing AI agents to query Langfuse trace data for better debugging and observability.
- Integration with Langfuse for trace and observation data
- Tool suite for AI agents to query trace data
- Exception and error tracking capabilities
- Session and user activity monitoring
The MCP server provides the following tools for AI agents:
fetch_traces- Find traces based on criteria like user ID, session ID, etc.fetch_trace- Get a specific trace by IDfetch_observations- Get observations filtered by typefetch_observation- Get a specific observation by IDfetch_sessions- List sessions in the current projectget_session_details- Get detailed information about a sessionget_user_sessions- Get all sessions for a userfind_exceptions- Find exceptions and errors in tracesfind_exceptions_in_file- Find exceptions in a specific fileget_exception_details- Get detailed information about an exceptionget_error_count- Get the count of errorsget_data_schema- Get schema information for the data structures
First, make sure uv is installed. For installation instructions, see the uv installation docs.
If you already have an older version of uv installed, you might need to update it with uv self update.