Back to Plugins

Logfire

Add Logfire observability to Python applications with auto-instrumentation for FastAPI, httpx, asyncpg, SQLAlchemy, and more

monitoringpythonapi
By Pydantic
883Updated todayPythonMIT

Installation

/plugin install logfire@claude-plugins-official

How to install

  1. Open Claude Code in your terminal
  2. Run the installation command above
  3. The plugin will be enabled automatically
  4. Use the plugin's features in your Claude Code sessions

Pydantic Skills

Logfire and Pydantic AI plugins for Claude Code, Codex, and Cursor. Instrument your code with Logfire, query and export the resulting telemetry, and build LLM agents with Pydantic AI.

Plugins

PluginHostsDescriptionCapabilities
logfireClaude Code, Codex, CursorAdd Logfire observability and query/debug telemetryClaude commands /instrument, /debug, /query; Codex/Cursor skills and MCP tools
logfire-exporterCodexExport Codex activity traces to LogfireCodex lifecycle hooks
aiClaude CodeBuild AI agents with Pydantic AIPydantic AI skill docs
pydantic-ai-harnessClaude CodeExtend Pydantic AI agents with harness capabilities (Code Mode)Pydantic AI Harness skill docs

Install In Claude Code

Add this marketplace to Claude Code:

claude plugin marketplace add pydantic/skills

Then install a plugin:

claude plugin install logfire@pydantic-skills
claude plugin install ai@pydantic-skills
claude plugin install pydantic-ai-harness@pydantic-skills

Install In Codex

Add the published Pydantic marketplace to Codex:

codex plugin marketplace add pydantic/skills

Then open Codex's plugin UI and enable the plugins you want from the Pydantic marketplace:

  • Logfire - installs Logfire skills and the hosted Logfire MCP server.
  • Logfire Exporter - installs Codex lifecycle hooks that export completed Codex turns and tool calls to Logfire.

Configure Logfire Exporter with a Logfire write token in your environment or ${XDG_CONFIG_HOME:-~/.config}/logfire-exporter/config.env. Restart Codex after configuration, and run /hooks if Codex asks you to review or trust the new hooks.

To use the EU Logfire MCP endpoint in Codex without editing plugin files, replace the MCP entry and re-authenticate:

codex mcp remove logfire
codex mcp add logfire --url https://logfire-eu.pydantic.dev/mcp
codex mcp login logfire
codex mcp get logfire

Start a new Codex conversation after switching so the MCP tools reload.

Install In Cursor

Install the Logfire plugin from the published pydantic/skills repository:

git clone https://github.com/pydantic/skills.git
mkdir -p ~/.cursor/plugins/local
cp -R skills/plugins/logfire ~/.cursor/plugins/local/logfire

Then restart Cursor or run Developer: Reload Window. The plugin configures:

  • display name Logfire
  • Logfire skills for instrumentation, querying, and UI-opening workflows
  • hosted Logfire MCP server from mcp.json

The Logfire MCP server requires normal Logfire authentication, such as logfire auth or a suitable LOGFIRE_TOKEN.

Cross-Agent Skills

The skills/ directory contains standalone SKILL.md files compatible with 30+ agents via the agentskills.io standard - including Codex, Cursor, Gemini CLI, and Claude Code.

SkillDescription
logfire-instrumentationAdd Logfire observability to Python, JS/TS, and Rust apps
logfire-queryQuery and analyze Logfire traces, logs, spans, metrics, and activity data
logfire-uiOpen Logfire project pages, live views, traces, and Explore filters
building-pydantic-ai-agentsBuild LLM-powered agents with Pydantic AI — tools, capabilities, streaming, testing
pydantic-ai-harnessExtend Pydantic AI agents with harness capabilities like Code Mode (sandboxed run_code)
View source on GitHub