How to connect Logfire MCP to Claude

Connect Claude Web, Desktop and Cowork to Logfire MCP. Query recent logfire traces for errors, inspect exceptions and group recurring logfire issues, and more using natural language, with authentication handled for you.

Logfire MCP logoLogfire MCP
Dcr Oauth

Logfire MCP is Pydantic Logfire's official MCP server for observability data in the US region. It provides a secure, natural-language interface for traces, logs, metrics, issues, and monitoring controls.

75 Tools

Introduction

Claude is Anthropic's AI assistant, available on the web, in the desktop app, and on mobile. Cowork is its agent for knowledge work, and it runs on all of those surfaces too. Connected to your apps, Claude can work with your files and services to accomplish complex tasks on your behalf.

This guide walks you through the easiest and most secure way to connect your Logfire account to Claude via Composio Connect, enabling it to query recent Logfire traces for errors, inspect exceptions and group recurring Logfire issues, review dashboard alerts and notification channels, and more such actions on your behalf without compromising your account security.

Setup is the same on Claude Web, Desktop, and Cowork, and you only need to do it once. The connector is tied to your account, so it's available in all three.

For exact tool slugs and parameter tables, see the tool catalog in the Composio docs.

Also integrate Logfire MCP with

Connecting Logfire to Claude Web, Desktop, and Cowork

Two ways to add the Composio connector. Pick whichever you prefer.

1. Add with one click

Click the button. Claude opens with the Composio connector filled in. Click Add, then go to step 2.

Add to Claude

Add manually

In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.

Claude Desktop connectors screen with Add custom connector selected

Click Add custom connector and paste in the Composio MCP server URL:

bash
https://connect.composio.dev/mcp
Add custom connector dialog with Composio MCP server URL

2. Authorize in your browser

Click Connect. You'll be redirected to a browser window where you can authorize Composio to continue.

Composio authorization screen for Claude Web, Desktop, and Cowork

3. Connect your Logfire account

Back in Claude, ask it to connect to Logfire or give it any Logfire-related task.

For example, ask Claude to:

  • "Query recent Logfire traces for errors"
  • "Inspect exceptions and group recurring Logfire issues"
  • "Review dashboard alerts and notification channels"

It will prompt you to authenticate and authorize access.

That's it. Composio's tools are now available in Claude, and your Logfire account is ready to use.

What is the Logfire Claude Connector, and what's possible with it?

The Logfire MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Logfire account. It provides structured and secure access to dashboards, alerts, notification channels, and setup guidance, so your agent can create and update dashboards, monitor alert status, manage notifications, and prepare Logfire instrumentation on your behalf.

  • Dashboard management: Have your agent create, view, update, rename, and delete Logfire dashboards, including their panels, variables, layout groups, time ranges, and refresh settings.
  • Dashboard version control: Let the agent list saved dashboard versions, inspect a previous version, and restore it as the current dashboard.
  • Alert operations: Direct your agent to create, update, list, inspect, and delete alerts, then check their firing status and review their run history.
  • Notification channels: Instruct your agent to create, update, list, inspect, and delete webhook or Opsgenie channels used for Logfire alert notifications.
  • Logfire setup guidance: Have your agent retrieve setup prompts for application instrumentation, infrastructure monitoring, AI agent instrumentation, and managed feature flags.

Troubleshooting

1. Why does Claude not use the Composio connector for Logfire?

The connector can show as connected, but Claude must use it in each Logfire conversation.

  • Click + at the lower left of the chat, or type /.
  • Hover Connectors.
  • Turn on Composio.
  • Ask Claude to connect to Logfire again.

2. Why does Claude show an MCP server error before Logfire connects?

Claude can show Couldn't reach the MCP server or Authorization with the MCP server failed when you add the connector for Logfire.

  • Check that the connector URL is https://connect.composio.dev/mcp.
  • Connectors run from Anthropic's cloud, so your device network is usually not the problem.
  • Add the connector again from Customize > Connectors, then ask Claude to connect Logfire.
  • If it fails again, send the error and the ofid_ reference id to support@composio.dev.

3. Why does the Logfire authorization link not work?

The Composio connector is one server. Your Logfire account connects separately when Claude asks for it.

  • If the browser does not open, or the link expires, ask Claude to retry the Logfire connection.
  • Composio creates a fresh Logfire authorization link.
  • Open that link in your browser and finish the Logfire sign-in.

4. Why do Logfire actions fail after they worked before?

The Logfire connection can expire or lose permission.

  • Ask Claude to inspect the Logfire connection.
  • If the connection is unhealthy, disconnect it when Claude prompts you.
  • Reconnect the Logfire account and retry the action.
  • If Claude shows a permission prompt, approve it before Claude changes data in Logfire.
  • If the action still fails with a permission error, check that the connected account has that permission in Logfire itself.

5. How do I switch to a different Logfire account?

Claude can manage the Logfire connection for you.

  • Ask Claude to disconnect or delete the current Logfire account.
  • Ask Claude to connect Logfire again.
  • Open the new Composio authorization link for Logfire.
  • Sign in with the other Logfire account in the browser.
  • After the account connects, ask Claude to retry the Logfire task.

6. Why is my Logfire connection missing in Claude Desktop or on a Team plan?

The connector belongs to your Claude account, so your Logfire connection works in Claude Web, Desktop, and Cowork.

  • In Claude Desktop, open Customize > Connectors.
  • Next to Composio, click ⋮ and click Clear cache.
  • If Logfire tools still do not appear, click ⋮, disconnect, remove the connector, and add it again.
  • On Team or Enterprise, an Owner or Primary Owner must enable the connector before you can connect Logfire.
TOOLS

Supported Tools

Every Logfire MCP action and event your agent gets out of the box.

Alert create

Create a new alert that periodically runs a SQL query and sends notifications based on results.

Alert delete

Permanently delete an alert.

Alert get

Get an alert's configuration and last run result by ID.

Alert history

Get the run history of an alert, showing each time it was evaluated and whether it matched.

Alert list

List alert summaries and their latest completed run status.

Alert status

Check if an alert is currently firing and when it last triggered or resolved.

Alert update

Update an existing alert's configuration.

Channel create opsgenie

Create an Opsgenie notification channel for incident management alerts.

Channel create webhook

Create a webhook notification channel for Slack, Discord, or custom HTTP endpoints.

Channel delete

Permanently delete a notification channel.

Channel get

Get a specific notification channel by ID.

Channel list

List all notification channels in the organization.

Channel update opsgenie

Update an Opsgenie channel's API key, label, or active status.

Channel update webhook

Update a webhook channel's URL, format, label, or active status.

Dashboard add panel

Add a new panel to an existing dashboard with optional layout position.

Dashboard add variable

Add a single variable to a dashboard at an optional position.

Dashboard create

Create a new dashboard from a Perses JSON definition or as an empty dashboard.

Dashboard create group

Create a new layout group in a dashboard.

Dashboard delete

Delete a dashboard by slug.

Dashboard delete group

Delete an empty layout group from a dashboard.

Dashboard get

Get the full dashboard definition as Perses-compatible JSON.

Dashboard get version

Get one kept version of a dashboard with its full Perses definition.

Dashboard list

List dashboards in a project with optional search and cursor-based pagination.

Dashboard list versions

List the kept versions of a dashboard, the newest first.

Dashboard panel reference

Get the panel guide and the JSON schema of every panel kind's settings.

Dashboard remove panel

Remove a panel from a dashboard.

Dashboard remove variable

Remove a variable from a dashboard by name.

Dashboard rename group

Change the title of a dashboard layout group.

Dashboard reorder groups

Change the display order of layout groups in a dashboard.

Dashboard restore

Make a kept version the current version of its dashboard.

Dashboard toggle group collapse

Set whether a dashboard layout group is collapsed or expanded.

Dashboard update

Update a dashboard's name and/or full Perses definition.

Dashboard update panel

Update an existing panel's properties.

Dashboard update settings

Update dashboard time range and auto-refresh settings.

Dashboard update variable

Update an existing variable by name, replacing it with a new definition.

Dashboard update variables

Replace all variables on a dashboard with the provided list.

Get agents setup prompt

Return the AI-agent prompt to instrument an AI agent so it appears on the Agents page.

Get feature flags setup prompt

Return the AI-agent prompt to set up runtime feature flags with Logfire managed variables.

Get infrastructure setup prompt

Return the AI-agent prompt to set up infrastructure monitoring with Logfire.

Get instrumentation setup prompt

Return the AI-agent prompt to instrument this application with the Logfire SDK.

Integration install

Install an integration into a project, enabling its standard dashboards and creating its alerts.

Integration list

List the Integrations catalog with this project's install/detection state.

Issue get

Get a single tracked exception issue by its number, including the stacktrace.

Issue list

List tracked exception issues for a project with cursor-based pagination.

Issue set states

Open, ignore, or resolve one or more exception issues.

Local dev session

Set up a local development session for sending telemetry to Logfire.

Notification window create

Create a new notification window that limits alert notification delivery to specific times.

Notification window delete

Permanently delete a notification window.

Notification window get

Get a specific notification window by ID.

Notification window list

List all notification windows in the organization.

Notification window update

Update an existing notification window.

Organization usage link

Generate a link to the built-in usage page of the organization.

Project list

List readable projects, including each project's last recorded telemetry ingestion time.

Project logfire link

Generate a Logfire UI link to view a specific trace.

Project logfire ui link

Generate a Logfire project UI link for live-view/filter pages.

Prompt get

Get a prompt by slug.

Prompt get settings

Get a prompt's playground settings (mutable, shared across versions).

Prompt get version

Get a specific template version, including the raw `template` body.

Prompt list

List prompts in a project.

Prompt list versions

List a prompt's template versions, ordered by version number.

Prompt preview

Render a saved prompt without calling the model.

Query exception context

Inspect up to three exception records in one trace, without fetching the whole trace or its attributes.

Query find exceptions in file

Get the details about the 10 most recent exceptions matching a source file path.

Query run

Run a read-only SQL SELECT query against Logfire telemetry.

Query schema reference

Get the table schemas and the query handbook for the Logfire DataFusion database.

Schedule create

Deprecated.

Schedule delete

Deprecated.

Schedule get

Deprecated.

Schedule list

Deprecated.

Schedule update

Deprecated.

Slo list

List the service level objectives (SLOs) of a project with their current status.

Token info

Get information about the current authentication token.

Variable get

Get a managed variable (feature flag) by name, with optional version/history detail.

Variable list

List all managed variables (feature flags) in a project.

Variable resolve

Resolve what value a client would receive for a variable *right now*, and why.

FRAMEWORKS

How to build Logfire MCP Agent with another framework

FAQ

Frequently asked questions

Start with Logfire MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Logfire MCP tool your agent needs.Free to start.

Start building