Logfire Codex Connection
PydanticOfficialPublished by Pydantic
- Skill
- Tool integration
- Automation and integrations
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The logfire-codex-connection skill provides a structured interface for managing the integration between Codex and Logfire. It allows users to configure MCP access for querying Logfire and set up session recording for telemetry, all while adhering to security best practices regarding credential handling and configuration management. The skill acts as a bridge to the native Codex CLI and configuration APIs, ensuring that users can maintain their observability setup without manual file editing or complex CLI workflows.
What it does
- Connects Codex to Logfire for MCP-based querying and session telemetry.
- Checks the current status of Logfire connections and recording configurations.
- Disables or removes existing Logfire connections and stops session recording.
- Supports regional configurations including US, EU, and self-hosted endpoints.
- Handles the enabling and disabling of the bundled Logfire MCP server.
- Provides clear reporting on MCP access, capture modes, and delivery status.
When to use it
- When you need to enable Logfire telemetry for your Codex sessions.
- When you want to query Logfire data directly from within the Codex environment.
- When you need to switch between US, EU, or self-hosted Logfire instances.
- When you need to verify if your current session is being recorded or if MCP is active.
- When you need to disconnect Logfire from Codex to stop data collection.
Advantages
- Simplifies complex configuration tasks into guided, safe steps.
- Protects sensitive credentials by avoiding manual file inspection or printing.
- Maintains clear separation between MCP querying and session recording.
- Provides consistent status reporting without requiring manual CLI intervention.
- Respects existing application instrumentation and model provider settings.
Usage examples
- “Connect my Codex to Logfire for session recording.”
- The agent will guide you through selecting a capture mode (full, messages-only, or metadata-only) and verify the connection status.
- “Check if my Codex session is currently being recorded by Logfire.”
- The agent will inspect the current configuration and report the active capture mode and connection status.
- “Switch my Logfire connection to the EU region.”
- The agent will help you disable the current US connection and configure the EU endpoint via native Codex controls.
- “Stop recording my Codex sessions.”
- The agent will execute the necessary commands to disable session recording while keeping the MCP connection intact if desired.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/pydantic/logfire-codex-connection/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip logfire-codex-connection.zip -d .agents/skills
Documentation by Pydantic
Connect Codex to Logfire
Help the user connect, check status, or disconnect without making them run a setup checklist. Honor the requested operation; a status request never grants permission to install, authenticate, or repair anything.
For connection, ask only if missing: "Would you like to query Logfire, record your Codex sessions, or both?" MCP access and recording are independent. Do not require CLI login for working MCP, or MCP read access to record sessions.
Connect: follow connection setup.
Status: follow status and removal.
Disconnect: follow status and removal.
Resolve bundled scripts relative to this installed skill directory. The runtime
helper is ../../scripts/agent_runtime.py --agent codex; the explicit agent
selects Codex's separate runtime and project credential directory.
Quote paths as single arguments. Do not assume
CLAUDE_PLUGIN_ROOT exists in Codex.
Leave telemetry configuration and exporter installation to the native Logfire CLI. Do not add custom transcript hooks, copy credentials, open secret-bearing Codex/exporter configuration files, or start a nested coding session for setup. Keep existing application instrumentation, model providers, and Gateway routing unchanged. Plugin installation is not consent to session capture.
Finish with MCP access, capture mode/destination, and delivery evidence as separate facts. Give one next action. "Configured" does not mean data arrived.
Files
- ATTRIBUTION.mdAdded by AutoGineer881 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md1.8 KiB
- references/connect.md4.1 KiB
- references/mcp.md4.4 KiB
- references/status.md2.5 KiB
references/mcp.md
Choose the MCP connection
The bundled server is fixed to https://logfire-us.pydantic.dev/mcp. Codex's
plugin policy can disable it but cannot change its URL. Do not edit plugin cache
files or use LOGFIRE_MCP_URL as an override.
Use native connection controls to inspect the installed Logfire plugin ID and
existing MCP connections. Inspect only names, URLs, and enabled state, not saved
headers or credentials. codex plugin list --json identifies the exact plugin ID
(normally logfire@pydantic-skills; other marketplaces have different IDs).
Do not assume an installed plugin's MCP server is listed by codex mcp list.
Confirm the region or exact self-hosted MCP URL. These are user-wide changes, independent of session recording. Reuse a working connection matching the chosen endpoint. If other Logfire connections are already enabled, explain the conflict and get agreement on which to keep; never disable or replace them silently.
US cloud
Use the bundled connection when there is no separately configured Logfire MCP.
If returning from regional setup, confirm removing the previous regional
connection first. Inspect its exact name and endpoint, then run
codex mcp remove <confirmed-server-name> only for that agreed connection.
Do not remove another server just because its name resembles Logfire.
Enable the bundled server with the helper below, authenticate it through Codex's native connection controls, and verify with a small authenticated read.
EU cloud or self-hosted
EU cloud uses https://logfire-eu.pydantic.dev/mcp. For self-hosted, use the
confirmed full MCP URL, not an assumed path or a hostname inferred from a token.
Confirm disabling the bundled server while retaining the plugin and skills. Run the helper below with
disableand the actual installed plugin ID.If an existing native connection matches this endpoint, reuse it. Otherwise use an available name (for example
logfire-regional) and runcodex mcp add <server-name> --url <confirmed-mcp-url>. Never overwrite an occupied name. Switching destinations requires explicit confirmation before removing the old connection and adding its replacement.Verify the endpoint through native controls, or parse
codex mcp get <server-name> --jsonlocally and emit only its URL/enabled state, never raw saved headers or credentials. Authenticate withcodex mcp login <server-name>, or the equivalent native app controls. Do not launch a competing pending OAuth flow.Restart/reload Codex's MCP connections. Verify the regional connection with a small authenticated read and check the bundled server remains disabled. If reload is unavailable, give restart as the next action; do not claim current tools already use the new endpoint.
Only one selected Logfire connection should be active. Disabling the bundled server does not disable this plugin, its skills, or session recording.
Bundled-server policy helper
After consent, run the bundled helper relative to the installed skill directory:
python3 <skill-directory>/../../scripts/codex_mcp_policy.py disable --plugin-id <installed-plugin-id> --yesUse enable instead of disable to return to the bundled US server. This helper
uses Codex's native config API to change only
plugins.<installed-plugin-id>.mcp_servers.logfire.enabled; it does not edit or
print secret-bearing configuration, install dependencies, or authenticate.
Python 3 and the Codex CLI must be available. If either is unavailable, use native
app settings to toggle only that server; do not install software without asking.
On failure, inspect actual state before retrying. For example, disabling may have succeeded before a later connection step failed. Do not automatically restore the US server after an EU setup failure or claim that the switch was rolled back.
Status and disconnect
Status is read-only: inspect the selected connection, endpoint, authentication,
and bundled-server policy using native controls. Do not run the policy helper,
mcp add, or login just to check status.
For an explicit MCP disconnect, use native logout/disable controls on the exact
selected connection. For a regional CLI connection, codex mcp logout <name>
clears OAuth; remove its registration only if requested. Keep the bundled server
disabled after regional disconnect, rather than silently reverting to US. Session
recording and remote token revocation remain separate actions.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Pydantic
- Publisher
- Pydantic (Official)
- Source
- pydantic/skills · plugins/logfire/skills/logfire-codex-connection · commit 98f591c
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Pydantic or Pydantic.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download logfire-codex-connection.zip