# Logfire MCP Integration

> AI Observability Platform for LLMs, Apps & RAG

## Overview

| Property | Value |
|----------|-------|
| Category | PIPEDREAM |
| Type | PIPEDREAM |
| Tools | 2 |
| URL | https://jelou.ai/es/marketplace/logfire |

## Available Tools (2)

### Record Log Entry

Records a single log entry or event in Logfire as a zero-duration span, via OTLP ingestion. Use this whenever the user wants to log, record, or note an event, deployment, incident, or error — this is Logfire's equivalent of calling `logfire.info()`/`logfire.error()` from the SDK. This creates a single point-in-time entry, not a full distributed trace with parent/child spans. Setting `exceptionType`/`exceptionMessage` marks the entry as an exception (`is_exception = true` when later queried). After recording, use **Run SQL Query** to confirm what was written (e.g. `SELECT * FROM records WHERE message LIKE '%...%' ORDER BY start_timestamp DESC LIMIT 1`). [See the documentation](https://pydantic.dev/docs/logfire/reference/sql/)

### Run SQL Query

Executes an arbitrary SQL query against Logfire's `records` (unified logs + traces, one row per span) or `metrics` tables and returns the results. Use this for any analysis, search, or aggregation over your telemetry — recent activity, error hunting, latency analysis, counts, etc. To discover what columns are available before writing a query, run `SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'records'` (or `'metrics'`) with this same tool — there is no separate schema-discovery tool. Useful columns on `records` include `start_timestamp`, `span_name`, `message`, `level`, `service_name`, `duration`, `is_exception`, `exception_type`, and `exception_message`. Example — find exceptions: `SELECT span_name, exception_type, exception_message FROM records WHERE is_exception = true ORDER BY start_timestamp DESC`. Example — count by level: `SELECT level, count(*) AS n FROM records GROUP BY level ORDER BY n DESC`. After using **Record Log Entry** to write data, use this tool to confirm what was recorded. [See the SQL reference](https://pydantic.dev/docs/logfire/reference/sql/) and [query API docs](https://pydantic.dev/docs/logfire/manage/query-api/#making-direct-http-requests).

## Supported Channels

This integration works with:
- WhatsApp Business API
- Facebook Messenger
- Instagram Direct Messages
- Web Chat Widget

## AI Assistants Compatible

- ChatGPT (via MCP)
- Claude (via MCP)
- Gemini (via MCP)
- Custom AI Agents

## Quick Start

1. Sign up at https://apps.jelou.ai/signup
2. Navigate to Marketplace and add Logfire
3. Authenticate your Logfire account
4. Configure your messaging channels (WhatsApp, Facebook, etc.)
5. Copy the MCP server URL to your AI assistant

## Example Use Cases

- Automate customer inquiries using Logfire data
- Send notifications via WhatsApp when Logfire events occur
- Query Logfire data directly from ChatGPT or Claude
- Build AI agents that interact with Logfire

## Resources

- [All Integrations](https://jelou.ai/es/marketplace)
- [Full Documentation](https://jelou.ai/llms-full.txt)
- [API Docs](https://docs.jelou.ai)
- [Help Center](https://help.jelou.ai)
