{"type":"mcp_server","name":"logfire-mcp","description":"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.","category":"System Tools","language":"Python","stars":162,"forks":0,"owner":"pydantic","github_url":"https://github.com/pydantic/logfire-mcp","homepage":null,"setup":"## Setup\n\n1.  Install `uv` following the instructions in the [`uv` installation docs](https://docs.astral.sh/uv/getting-started/installation/), updating if necessary with `uv self update`.\n2.  Obtain a Logfire read token from the \"Read Tokens\" section of your project settings in Logfire: https://logfire.pydantic.dev/-/redirect/latest-project/settings/read-tokens.\n3.  Manually run the server using `uvx` with the `LOGFIRE_READ_TOKEN` environment variable or the `--read-token` flag: `LOGFIRE_READ_TOKEN=YOUR_READ_TOKEN uvx logfire-mcp` or `uvx logfire-mcp --read-token=YOUR_READ_TOKEN`.\n4.  Alternatively, configure your MCP client (Cursor, Claude Desktop, or Cline) using the provided configuration examples.\n5.  Customize the base URL for the Logfire API using the `--base-url` argument or the `LOGFIRE_BASE_URL` environment variable.","tools":"## Available Tools\n\n1.  `find_exceptions` - Get exception counts from traces grouped by file.\n2.  `find_exceptions_in_file` - Get detailed trace information about exceptions in a specific file.\n3.  `arbitrary_query` - Run custom SQL queries on your OpenTelemetry traces and metrics.\n4.  `get_logfire_records_schema` - Get the OpenTelemetry schema to help with custom queries.","faq":null,"created_at":"2025-03-06T12:26:11+00:00","updated_at":"2025-03-28T02:35:21+00:00","source_url":"https://model-context-protocol.com/servers/logfire-mcp-opentelemetry-trace-analysis","related_articles":[]}