mcp-registry/logfire-mcp

    ==================
      
       /// MCP ///
      /// LOG ///
        
    ==================
        
    [server:online]
    [protocol:ready]

logfire-mcp

by pydantic

Model-Context-Protocol (MCP) server that lets LLMs query Pydantic Logfire (OpenTelemetry) traces/metrics via ready-made tools or arbitrary SQL.

93
14
Open Source

01

find_exceptions_in_file

Get detailed trace information about exceptions in a specific file

02

arbitrary_query

Run custom SQL queries on your OpenTelemetry traces and metrics

03

get_logfire_records_schema

Get the OpenTelemetry schema to help with custom queries

Installation

1. Prerequisites
• Python ≥3.8
• Git (to clone the repo if installing from source)
2. Install from PyPI (recommended)
pip install logfire-mcp
– Or install the latest development version:
git clone https://github.com/pydantic/logfire-mcp.git cd logfire-mcp pip install -e .
3. Basic configuration
• Create an ``.env`` or export the following variables (values are examples):
export LOGFIRE_MCP_HOST=0.0.0.0 export LOGFIRE_MCP_PORT=9000 export LOGFIRE_MCP_TOKEN=<your-shared-secret>
4. Run the server
logfire-mcp serve # entry-point installed from the package
5. (Optional) Behind Docker
docker run -p 9000:9000 -e LOGFIRE_MCP_TOKEN=<token> pydantic/logfire-mcp:latest

Documentation

License: MIT License
Updated 7/30/2025