This repository hosts a Model Context Protocol (MCP) server that allows LLMs to access and analyze OpenTelemetry traces and metrics sent to Logfire, enabling analysis of distributed traces and custom SQL queries.
This repository hosts a Model Context Protocol (MCP) server designed to access OpenTelemetry traces and metrics sent to Logfire, enabling LLMs to analyze application telemetry data, distributed traces, and SQL query results via Logfire APIs.
Available Tools: The server offers tools like find_exceptions
(exception counts by file), find_exceptions_in_file
(detailed trace info for file exceptions), arbitrary_query
(custom SQL queries), and get_logfire_records_schema
(OpenTelemetry schema).
Setup: Requires uv
for running the server. A Logfire read token is needed, obtainable from the Logfire project settings. The server can be run manually using uvx
with the LOGFIRE_READ_TOKEN
environment variable or --read-token
flag.
Configuration: Instructions are provided for configuring the server with Cursor, Claude Desktop, and Cline, including JSON configuration examples. The base URL for the Logfire API can be customized using the --base-url
argument or the LOGFIRE_BASE_URL
environment variable.
pydantic/logfire-mcp
March 6, 2025
March 28, 2025
Python