# Logfire MCP

```json
{
  "name": "Logfire MCP",
  "slug": "logfire_mcp",
  "url": "https://composio.dev/toolkits/logfire_mcp",
  "markdown_url": "https://composio.dev/toolkits/logfire_mcp.md",
  "logo_url": "https://logos.composio.dev/api/logfire",
  "categories": [
    "developer tools & devops"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-12-03T05:49:27.600Z"
}
```

![Logfire MCP logo](https://logos.composio.dev/api/logfire)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Logfire MCP or direct API to query traces, logs, and metrics, inspect exceptions and issues, manage dashboards and alerts, and control notification channels through natural language.

## Summary

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.

## Categories

- developer tools & devops

## Toolkit Details

- Tools: 75

## Images

- Logo: https://logos.composio.dev/api/logfire

## Authentication

- **Dcr Oauth**
  - Type: `custom`
  - Description: Dcr Oauth authentication for Logfire MCP.
  - Setup:
    - Configure Dcr Oauth credentials for Logfire MCP.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

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

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `LOGFIRE_MCP_ALERT_CREATE` | Alert create | Create a new alert that periodically runs a SQL query and sends notifications based on results. Alert instance policies, which track each result row as its own occurrence, are not available through MCP. |
| `LOGFIRE_MCP_ALERT_DELETE` | Alert delete | Permanently delete an alert. This stops all future evaluations and notifications. |
| `LOGFIRE_MCP_ALERT_GET` | Alert get | Get an alert's configuration and last run result by ID. Use this to inspect what an alert does (its query, schedule, channels) or check its most recent evaluation. |
| `LOGFIRE_MCP_ALERT_HISTORY` | Alert history | Get the run history of an alert, showing each time it was evaluated and whether it matched. |
| `LOGFIRE_MCP_ALERT_LIST` | Alert list | List alert summaries and their latest completed run status. Query text and full result data are omitted to keep the response small. Call `alert_get` with an alert's `id` when you need its full configuration. Returns an empty list if no alerts exist; do not retry an empty result. |
| `LOGFIRE_MCP_ALERT_STATUS` | Alert status | Check if an alert is currently firing and when it last triggered or resolved. Returns the alert's current firing state plus timestamps for the most recent trigger and resolution events within the lookback period. |
| `LOGFIRE_MCP_ALERT_UPDATE` | Alert update | Update an existing alert's configuration. Only provided fields are changed. Alert instance policies are not available through MCP, and an update here keeps the policy of the alert. |
| `LOGFIRE_MCP_CHANNEL_CREATE_OPSGENIE` | Channel create opsgenie | Create an Opsgenie notification channel for incident management alerts. |
| `LOGFIRE_MCP_CHANNEL_CREATE_WEBHOOK` | Channel create webhook | Create a webhook notification channel for Slack, Discord, or custom HTTP endpoints. |
| `LOGFIRE_MCP_CHANNEL_DELETE` | Channel delete | Permanently delete a notification channel. Alerts using this channel will no longer send to it. |
| `LOGFIRE_MCP_CHANNEL_GET` | Channel get | Get a specific notification channel by ID. |
| `LOGFIRE_MCP_CHANNEL_LIST` | Channel list | List all notification channels in the organization. |
| `LOGFIRE_MCP_CHANNEL_UPDATE_OPSGENIE` | Channel update opsgenie | Update an Opsgenie channel's API key, label, or active status. Only provided fields are changed. |
| `LOGFIRE_MCP_CHANNEL_UPDATE_WEBHOOK` | Channel update webhook | Update a webhook channel's URL, format, label, or active status. Only provided fields are changed. |
| `LOGFIRE_MCP_DASHBOARD_ADD_PANEL` | Dashboard add panel | Add a new panel to an existing dashboard with optional layout position. |
| `LOGFIRE_MCP_DASHBOARD_ADD_VARIABLE` | Dashboard add variable | Add a single variable to a dashboard at an optional position. |
| `LOGFIRE_MCP_DASHBOARD_CREATE` | Dashboard create | Create a new dashboard from a Perses JSON definition or as an empty dashboard. For a dashboard of the Logfire usage of the organization (the volume of logs, spans, and metrics that it sends), call `organization_usage_link` first. |
| `LOGFIRE_MCP_DASHBOARD_CREATE_GROUP` | Dashboard create group | Create a new layout group in a dashboard. Groups organize panels into collapsible sections. |
| `LOGFIRE_MCP_DASHBOARD_DELETE` | Dashboard delete | Delete a dashboard by slug. This permanently removes the dashboard and all its panels. |
| `LOGFIRE_MCP_DASHBOARD_DELETE_GROUP` | Dashboard delete group | Delete an empty layout group from a dashboard. Fails if the group still contains panels; remove panels first. The response confirms success; no need to call dashboard_get to verify. |
| `LOGFIRE_MCP_DASHBOARD_GET` | Dashboard get | Get the full dashboard definition as Perses-compatible JSON. Also suitable for exporting or version-controlling dashboards. `metadata.managedBy` is present when a tool such as Terraform manages the dashboard. The write tools refuse that dashboard unless `metadata.managedAllowEdits` is true. |
| `LOGFIRE_MCP_DASHBOARD_GET_VERSION` | Dashboard get version | Get one kept version of a dashboard with its full Perses definition. Use it to check a version before a restore. |
| `LOGFIRE_MCP_DASHBOARD_LIST` | Dashboard list | List dashboards in a project with optional search and cursor-based pagination. Each dashboard has `id`, `dashboard_name`, `dashboard_slug`, `version`, and timestamps. A non-null `managed_by` names the tool that manages the dashboard, such as Terraform. The write tools refuse that dashboard unless `managed_allow_edits` is true. Returns an empty list if no dashboards exist; do not retry if the list is empty. Use the `search` parameter to filter by name. |
| `LOGFIRE_MCP_DASHBOARD_LIST_VERSIONS` | Dashboard list versions | List the kept versions of a dashboard, the newest first. A kept version is a version that a later save replaced. A dashboard keeps at most 50 kept versions. Saves that one author makes within 5 minutes keep only the version from before the first of them. Each version has `version`, `dashboard_name`, `saved_at`, and `saved_by_name`. An empty list means that no save has replaced a version yet. |
| `LOGFIRE_MCP_DASHBOARD_PANEL_REFERENCE` | Dashboard panel reference | Get the panel guide and the JSON schema of every panel kind's settings. Covers which query each kind takes, how query columns become series and labels, layout rules, and common mistakes. Call once before creating or restyling panels. |
| `LOGFIRE_MCP_DASHBOARD_REMOVE_PANEL` | Dashboard remove panel | Remove a panel from a dashboard. This also removes associated layout items. The response confirms success; no need to call dashboard_get to verify. |
| `LOGFIRE_MCP_DASHBOARD_REMOVE_VARIABLE` | Dashboard remove variable | Remove a variable from a dashboard by name. The response confirms success, so do not call dashboard_get to verify. Fails if a panel query still uses the variable. |
| `LOGFIRE_MCP_DASHBOARD_RENAME_GROUP` | Dashboard rename group | Change the title of a dashboard layout group. |
| `LOGFIRE_MCP_DASHBOARD_REORDER_GROUPS` | Dashboard reorder groups | Change the display order of layout groups in a dashboard. |
| `LOGFIRE_MCP_DASHBOARD_RESTORE` | Dashboard restore | Make a kept version the current version of its dashboard. The restore replaces the name, the definition, and the layout. The restore is a new version. The dashboard keeps the version that the restore replaces. So a second restore takes the first one back. |
| `LOGFIRE_MCP_DASHBOARD_TOGGLE_GROUP_COLLAPSE` | Dashboard toggle group collapse | Set whether a dashboard layout group is collapsed or expanded. |
| `LOGFIRE_MCP_DASHBOARD_UPDATE` | Dashboard update | Update a dashboard's name and/or full Perses definition. For time range/refresh settings, use dashboard_update_settings. For individual panels, use dashboard_update_panel. |
| `LOGFIRE_MCP_DASHBOARD_UPDATE_PANEL` | Dashboard update panel | Update an existing panel's properties. Only provided fields are changed. For the full dashboard definition, use dashboard_update. For time range/refresh, use dashboard_update_settings. |
| `LOGFIRE_MCP_DASHBOARD_UPDATE_SETTINGS` | Dashboard update settings | Update dashboard time range and auto-refresh settings. For renaming or replacing the full definition, use dashboard_update. For individual panels, use dashboard_update_panel |
| `LOGFIRE_MCP_DASHBOARD_UPDATE_VARIABLE` | Dashboard update variable | Update an existing variable by name, replacing it with a new definition. A new `spec.name` renames the variable. The rename rewrites each `$old_name` reference in panel queries and query-backed variables. `rewritten_references` lists the panels and variables it changed. The tool fails if the variable does not exist, or if the change breaks a panel query. A rename also fails if the new name has characters other than letters, digits, and underscores. It fails if the new name is `resolution` or starts with `__`, or if another variable has the new name. It fails if a panel that references the old name has its own variable with the new name. The tool fails with a conflict if the dashboard changes during the update. In that case, call `dashboard_get` and retry. |
| `LOGFIRE_MCP_DASHBOARD_UPDATE_VARIABLES` | Dashboard update variables | Replace all variables on a dashboard with the provided list. Fails if a panel query needs a variable that the list drops or changes. |
| `LOGFIRE_MCP_GET_AGENTS_SETUP_PROMPT` | Get agents setup prompt | Return the AI-agent prompt to instrument an AI agent so it appears on the Agents page. Gives the exact instructions for emitting the OpenTelemetry GenAI `invoke_agent` / `gen_ai.agent.name` spans Logfire's Agents page needs. The prompt is project-agnostic: it only embeds this Logfire instance's base URL (so self-hosted deployments get their own endpoint), so this tool needs no project and never asks for a token. |
| `LOGFIRE_MCP_GET_FEATURE_FLAGS_SETUP_PROMPT` | Get feature flags setup prompt | Return the AI-agent prompt to set up runtime feature flags with Logfire managed variables. Gives the exact, project-scoped instructions for converting hard-coded values / env toggles into `logfire.var(...)` managed variables that change live from the UI or MCP. Follow the returned prompt; the SDK reads a `project:read_variables` key from `LOGFIRE_API_KEY`, which the user supplies out of band, so this tool never asks for the key. |
| `LOGFIRE_MCP_GET_INFRASTRUCTURE_SETUP_PROMPT` | Get infrastructure setup prompt | Return the AI-agent prompt to set up infrastructure monitoring with Logfire. Gives the exact, project-scoped instructions for running an OpenTelemetry Collector that ships this surface's telemetry to Logfire and confirming it arrives. Follow the returned prompt; it references `${env:LOGFIRE_TOKEN}` and never asks for the token. |
| `LOGFIRE_MCP_GET_INSTRUMENTATION_SETUP_PROMPT` | Get instrumentation setup prompt | Return the AI-agent prompt to instrument this application with the Logfire SDK. Gives the exact, project-scoped instructions for adding Logfire/OpenTelemetry to the codebase and confirming telemetry arrives. Follow the returned prompt; it reads the write token from the `LOGFIRE_TOKEN` env var and never asks for the token. |
| `LOGFIRE_MCP_INTEGRATION_INSTALL` | Integration install | Install an integration into a project, enabling its standard dashboards and creating its alerts. Recommended-tier alerts install active; diagnostic-tier alerts install inactive (opt-in). All alerts install without a notification channel: add one to get notified. Idempotent: installing an already-installed integration refreshes its recorded version, re-enables the same standard dashboards, and skips alerts that already exist. Use `list_integrations` first to find valid integration ids. |
| `LOGFIRE_MCP_INTEGRATION_LIST` | Integration list | List the Integrations catalog with this project's install/detection state. Returns one entry per available integration (e.g. Redis), including whether it is `installed`, whether its telemetry has been `detected` in the project, the catalog `version`, and how many dashboards and alerts it bundles. |
| `LOGFIRE_MCP_ISSUE_GET` | Issue get | Get a single tracked exception issue by its number, including the stacktrace. The issue number is the integer shown in the UI and in issue URLs (`.../[organization]/[project]/issues/[issue_number]`), so this resolves a shared issue link to full detail - including `first_exception_stacktrace` - in one call. |
| `LOGFIRE_MCP_ISSUE_LIST` | Issue list | List tracked exception issues for a project with cursor-based pagination. Returns issues (exceptions grouped by fingerprint and optionally service) plus a `next_cursor` that callers pass back to fetch the following page. `next_cursor` is `None` when no further pages exist. Returns an empty list if issues are not enabled for the project. Environments filter occurrences rather than splitting issues. Shared issues have no owning service. Use each issue's service_name when investigating occurrences. |
| `LOGFIRE_MCP_ISSUE_SET_STATES` | Issue set states | Open, ignore, or resolve one or more exception issues. Use this when asked to ignore, dismiss, resolve, close, or reopen issues. Returns the updated issues. |
| `LOGFIRE_MCP_LOCAL_DEV_SESSION` | Local dev session | Set up a local development session for sending telemetry to Logfire. Creates a 'dev' project (if needed), generates a write token, and returns environment variables to configure the Logfire or OpenTelemetry SDK. All telemetry is sent to the **dev** project. Use the Logfire UI or MCP query tools to view traces in this project. |
| `LOGFIRE_MCP_NOTIFICATION_WINDOW_CREATE` | Notification window create | Create a new notification window that limits alert notification delivery to specific times. |
| `LOGFIRE_MCP_NOTIFICATION_WINDOW_DELETE` | Notification window delete | Permanently delete a notification window. Alert-channel pairs using it will revert to always-deliver. |
| `LOGFIRE_MCP_NOTIFICATION_WINDOW_GET` | Notification window get | Get a specific notification window by ID. |
| `LOGFIRE_MCP_NOTIFICATION_WINDOW_LIST` | Notification window list | List all notification windows in the organization. A notification window defines the times when alert notifications are delivered. Notifications outside the window are suppressed (dropped, not deferred). |
| `LOGFIRE_MCP_NOTIFICATION_WINDOW_UPDATE` | Notification window update | Update an existing notification window. Only provided fields are changed. |
| `LOGFIRE_MCP_ORGANIZATION_USAGE_LINK` | Organization usage link | Generate a link to the built-in usage page of the organization. The page charts what the organization sends to Logfire, per day for the last 30 days or per month for the last year. It counts logs and spans, metrics, and the other metered units. The user can group the chart by project, by token, or by unit. Call this tool first when the user asks for a chart or a dashboard of that usage over time, and give the user the link. Create a dashboard only when the user needs a breakdown that the page does not have, or when this tool refuses the call. The tool refuses the call when the user cannot view billing, and when the deployment is self-hosted. |
| `LOGFIRE_MCP_PROJECT_LIST` | Project list | List readable projects, including each project's last recorded telemetry ingestion time. `last_ingest_at` uses the same usage history as the Projects page. The rollup can lag and has less precision for older data. A null value means the available usage history contains no recorded ingestion. |
| `LOGFIRE_MCP_PROJECT_LOGFIRE_LINK` | Project logfire link | Generate a Logfire UI link to view a specific trace. Returns a URL that opens the Logfire dashboard filtered to show the specified trace. The link includes `since` and `until` parameters when the trace timestamp lookup succeeds, helping the UI load the correct time range. If that optional lookup is unavailable, the returned trace-filter link still works without time hints. |
| `LOGFIRE_MCP_PROJECT_LOGFIRE_UI_LINK` | Project logfire ui link | Generate a Logfire project UI link for live-view/filter pages. Returns a URL for the project-level Logfire UI with an optional filter and time range. Use `wizard_return=True` for the CLI wizard's browser return, which records a distinct project visit before Live View. Use `handoff=True` to bootstrap a browser session from MCP OAuth when opening the URL immediately. It cannot be combined with `wizard_return=True`. |
| `LOGFIRE_MCP_PROMPT_GET` | Prompt get | Get a prompt by slug. Use the response's `variable_name` property with the `variable_*` tools to manage versions, labels, rollout, and `template_inputs_schema`. |
| `LOGFIRE_MCP_PROMPT_GET_SETTINGS` | Prompt get settings | Get a prompt's playground settings (mutable, shared across versions). |
| `LOGFIRE_MCP_PROMPT_GET_VERSION` | Prompt get version | Get a specific template version, including the raw `template` body. |
| `LOGFIRE_MCP_PROMPT_LIST` | Prompt list | List prompts in a project. Prompts also appear in `variable_list` as prompt-backed variables; use these `prompt_*` tools to edit their template and settings. |
| `LOGFIRE_MCP_PROMPT_LIST_VERSIONS` | Prompt list versions | List a prompt's template versions, ordered by version number. |
| `LOGFIRE_MCP_PROMPT_PREVIEW` | Prompt preview | Render a saved prompt without calling the model. Expands `@{...}@` composition references against live managed-variable values and fills `{{...}}` Handlebars placeholders from `inputs` (overlaid on the default scenario's saved inputs), spending no model tokens. Use it to confirm a template resolves as expected while authoring over MCP. Model execution (`prompt_run`) stays off the MCP surface. |
| `LOGFIRE_MCP_QUERY_EXCEPTION_CONTEXT` | Query exception context | Inspect up to three exception records in one trace, without fetching the whole trace or its attributes. Prefer this tool before writing SQL for an exception investigation. Supply the trace ID and a window of at most 24 hours around its timestamp. Stack traces contain at most the last 6,000 characters and 60 lines. Messages and other fields are also excerpts, not complete values. Use `read_repository_source_context` for a frame's file and line when repository tools are available. Resolve deployed paths with `find_repository_files` first. Repository paths start at the repository root. Use `query_run` only when the excerpts omit evidence needed for the task. |
| `LOGFIRE_MCP_QUERY_FIND_EXCEPTIONS_IN_FILE` | Query find exceptions in file | Get the details about the 10 most recent exceptions matching a source file path. |
| `LOGFIRE_MCP_QUERY_RUN` | Query run | Run a read-only SQL SELECT query against Logfire telemetry. The arguments are `query`, `project`, `start_timestamp`, `end_timestamp`, `params`, and `intent`. No other argument name is accepted. Do not pass `sql`, `project_name`, or `min_timestamp`. Rules that prevent the most common failures: 1. Time window. `start_timestamp` and `end_timestamp` set the window. The default is the last 30 minutes. The limit is 14 days. A window up to 15 days is clamped to the last 14 days with a `note` in the result. A longer one fails. A SQL time filter can narrow the window but cannot widen it. For a longer history, make one call per window of 14 days or less. 2. Project. Pass `project` unless the token has access to one project only. Use an exact name from `project_list` or from the error that lists the available projects. 3. Attributes. Read an attribute with `attributes->>'dotted.key'`. The result is text: cast it only for a numeric compare, for example `(attributes->>'cost')::float`. Do not cast columns that already have a type. Do not use `attributes['key']`. Do not guess a flat column name. An attribute has a flat column only if `query_schema_reference` lists it as a promoted column, for example `http_route`. 4. GROUP BY. Repeat every selected non-aggregate expression exactly in `GROUP BY`. Do not group by a `SELECT` alias. 5. Subqueries. The engine often cannot plan a correlated, scalar, `EXISTS`, or `IN` subquery. Use a `JOIN`, with a CTE where it helps. 6. Size. A response holds at most 1,000 rows and has a size cap. Add a `LIMIT`, 50 or fewer for exploration, and select only the columns you need. 7. Retries. Follow the retry guidance in the error. Unless it says to retry unchanged, change a failed query before the retry. After a timeout, narrow the window, add selective filters, or simplify the query. 8. Intent. Pass `intent` on every call. Keep it while the goal is unchanged; when you narrow to a sub-step, name the original goal in it. 9. Placeholders. Bind each `$name` placeholder, such as a variable in dashboard SQL, through `params`. Take the values from the variable definitions in `dashboard_get`. Use an interval such as `'5 minutes'` for a time bucket or `$resolution`. The engine is Apache DataFusion with Postgres-like SQL. The queryable tables are `records`, `metrics`, `alerts_ext`, `alert_runs_ext`, `alert_issues_ext`, `filter_alert_issue_hits_ext`, and `saved_searches_ext`. Use these exact names. There are no other tables. The four alert tables need alert read access in the project; without it they are not found. Cross-source joins are supported, for example a join of `alert_issues_ext.latest_trace_id` to `records.trace_id`. Only SELECT is supported. `query_schema_reference` is a tool, never a table. Call it once per session for the schema, the promoted columns, and the function rules. Call it again to diagnose an unknown column, an unknown function, or a type error. If your instructions already include a SQL reference, use that reference first. If `query_schema_reference` is not in your tools, the schema is already in your instructions. |
| `LOGFIRE_MCP_QUERY_SCHEMA_REFERENCE` | Query schema reference | Get the table schemas and the query handbook for the Logfire DataFusion database. Returns SQL `CREATE TABLE` statements for all queryable tables (`records`, `metrics`, `alerts_ext`, `alert_runs_ext`, `alert_issues_ext`, `filter_alert_issue_hits_ext`, and `saved_searches_ext`). The four alert tables need alert read access in the project. The handbook lists the promoted flat columns, the JSON access rules, the functions that do not exist in DataFusion with their replacements, and how to find a function in `information_schema.routines`. Call this once per session, before the first non-trivial `query_run`. Call it again to diagnose an unknown column, an unknown function, or a type error. Do not call it before every query. If your instructions already include a SQL reference, use that reference first and call this tool only for what it does not cover. This is a tool, not a table. |
| `LOGFIRE_MCP_SCHEDULE_CREATE` | Schedule create | Deprecated. Use `notification_window_create`. Create a new notification window that limits alert notification delivery to specific times. Args: label: Display name for the notification window, e.g. "Business Hours". timezone: IANA timezone, e.g. "America/New_York". windows: Array of time windows. Each has "days" (1=Mon..7=Sun), "start_time" and "end_time" (HH:MM). When start_time > end_time, the window crosses midnight. |
| `LOGFIRE_MCP_SCHEDULE_DELETE` | Schedule delete | Deprecated. Use `notification_window_delete`. Permanently delete a notification window. Alert-channel pairs using it will revert to always-deliver. Args: schedule_id: The UUID of the notification window to delete. |
| `LOGFIRE_MCP_SCHEDULE_GET` | Schedule get | Deprecated. Use `notification_window_get`. Get a specific notification window by ID. Args: schedule_id: The UUID of the notification window to retrieve. |
| `LOGFIRE_MCP_SCHEDULE_LIST` | Schedule list | Deprecated. Use `notification_window_list`. List all notification windows in the organization. A notification window defines the times when alert notifications are delivered. Notifications outside the window are suppressed (dropped, not deferred). |
| `LOGFIRE_MCP_SCHEDULE_UPDATE` | Schedule update | Deprecated. Use `notification_window_update`. Update an existing notification window. Only provided fields are changed. Args: schedule_id: The UUID of the notification window to update. label: New display name for the notification window. timezone: New IANA timezone. windows: New time windows array. Replaces all existing windows. |
| `LOGFIRE_MCP_SLO_LIST` | Slo list | List the service level objectives (SLOs) of a project with their current status. Use this to answer how the SLOs are doing, which targets are at risk, or what a service or LLM provider is held to. Each SLO has its target, its rolling window, and the status the platform last computed: `current_sli_percent`, `budget_remaining_percent`, and `meets_target`. The status fields are null until the first status check of a new SLO. They are also null when the window has no matching events. `scope_kind` says whether `scope_value` is a service name or an LLM provider. An empty `environments` list means every environment. |
| `LOGFIRE_MCP_TOKEN_INFO` | Token info | Get information about the current authentication token. Only call this when the user explicitly asks about their identity, account, or permissions, never as a preamble to other work. Returns the organization, user, scopes, and project (if the token is scoped to a specific project) associated with the token being used for this session. |
| `LOGFIRE_MCP_VARIABLE_GET` | Variable get | Get a managed variable (feature flag) by name, with optional version/history detail. The `definition` is always returned: `template_inputs_schema` (the typed-input contract for template variables, or null), `latest_version` (whose `serialized_value` is the raw stored value, including any un-rendered `@{...}@` and `{{...}}` markup), current labels, rollout configuration, and overrides. For prompt-backed variables it also carries `kind='prompt'` and `prompt_slug`. Pass `include` to fetch extra detail in the same call, avoiding follow-up round trips: - `"versions"`: all versions, ordered by version number. - `"routing_history"`: the rollout/override change history. - `"label_history"`: the assignment history of a single label (requires `label`). |
| `LOGFIRE_MCP_VARIABLE_LIST` | Variable list | List all managed variables (feature flags) in a project. Returns a summary of each variable including name, description, rollout configuration, override count, label count, and version count. Prompt-backed variables (`kind='prompt'`) are included in the listing and expose `prompt_slug`; their template/settings are managed with the `prompt_*` tools, while their versions, labels, and rollout are managed with `variable_manage` / `variable_delete`. |
| `LOGFIRE_MCP_VARIABLE_RESOLVE` | Variable resolve | Resolve what value a client would receive for a variable *right now*, and why. Runs the live evaluation (rollout, labels, overrides, targeting) the same one the SDK and the OFREP endpoint use, for the given targeting context. Use it to answer "is my app getting the value I set in the UI, or still the in-code default?". `serialized_value` is the raw stored value that would be served; it's null when no version resolves, in which case `is_code_default` is true and the app uses its own in-code default. `reason` is one of STATIC / TARGETING_MATCH / SPLIT / DEFAULT, and `label` / `version` show which version was selected. A variable that was pushed from code but never released a version resolves to `is_code_default=true`, `reason='DEFAULT'`, `version=null`. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Logfire MCP
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["logfire_mcp"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["logfire_mcp"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Logfire MCP tools with your agent

Send a request, execute the Logfire MCP tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Run a SQL query over my recent Logfire traces and show the five slowest requests."}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Run a SQL query over my recent Logfire traces and show the five slowest requests." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Logfire MCP and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["logfire_mcp"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["logfire_mcp"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Logfire MCP request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Logfire MCP tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Run a SQL query over my recent Logfire traces and show the five slowest requests.")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Run a SQL query over my recent Logfire traces and show the five slowest requests.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Logfire MCP Integration

- Supports both Logfire MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Logfire MCP data

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Logfire MCP access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Logfire MCP
- Scoped, least privilege access to Logfire MCP resources
- Full audit trail of agent actions to support review and compliance

## Use Logfire MCP with any AI Agent Framework

Choose a framework you want to connect Logfire MCP with:

- [ChatGPT](https://composio.dev/toolkits/logfire_mcp/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/logfire_mcp/framework/claude-cowork)

## Related Toolkits

- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [GitHub](https://composio.dev/toolkits/github) - GitHub is a code hosting platform for version control and collaborative software development. It streamlines project management, code review, and team workflows in one place.
- [1password](https://composio.dev/toolkits/_1password) - 1Password is a password manager and digital vault for storing logins, secrets, notes, and secure documents. It helps individuals and teams protect credentials, share access safely, and reduce password risk.
- [21st MCP](https://composio.dev/toolkits/21st_mcp) - 21st MCP is a hosted design resource service for React/shadcn components, themes, templates, and SVG logos. It gives teams a fast way to discover, organize, and reuse polished interface assets.
- [Ably](https://composio.dev/toolkits/ably) - Ably is a real-time messaging platform for live chat and data sync in modern apps. It offers global scale and rock-solid reliability for seamless, instant experiences.
- [Abuselpdb](https://composio.dev/toolkits/abuselpdb) - Abuselpdb is a central database for reporting and checking IPs linked to malicious online activity. Use it to quickly identify and report suspicious or abusive IP addresses.
- [Agent37](https://composio.dev/toolkits/agent37) - Agent37 is a control API for managed agent sandboxes, templates, networking, and execution. It gives teams built-in scheduling, observability, budgets, and workspace administration.
- [Aikido Security](https://composio.dev/toolkits/aikido) - Aikido Security is a security platform for workspace, code, cloud, and application protection. It helps teams find vulnerabilities, manage compliance, and reduce security risk.
- [Alchemy](https://composio.dev/toolkits/alchemy) - Alchemy is a blockchain development platform offering APIs and tools for Ethereum apps. It simplifies building and scaling Web3 projects with robust infrastructure.
- [Algolia](https://composio.dev/toolkits/algolia) - Algolia is a hosted search API that powers lightning-fast, relevant search experiences for web and mobile apps. It helps developers deliver instant, typo-tolerant, and scalable search without complex infrastructure.
- [Alpic MCP](https://composio.dev/toolkits/alpic_mcp) - Alpic MCP is a hosted MCP server platform for inspecting projects, deployments, analytics, and feedback. It gives teams a structured way to monitor and manage MCP server activity.
- [Anakin](https://composio.dev/toolkits/anakin_io) - Anakin is a web automation platform offering scraping, crawling, search, and browser automation. Use it to extract structured data, automate site tasks, and monitor web changes reliably.
- [Anchor browser](https://composio.dev/toolkits/anchor_browser) - Anchor browser is a developer platform for AI-powered web automation. It transforms complex browser actions into easy API endpoints for streamlined web interaction.
- [Anchor Browser MCP](https://composio.dev/toolkits/anchor_browser_mcp) - Anchor Browser MCP is a hosted browser automation service for running cloud browser sessions and web tasks. It provides secure, reusable browser identities and managed authentication for reliable agent workflows.
- [AnyAPI](https://composio.dev/toolkits/anyapi) - AnyAPI is a marketplace of utility APIs for validation, currency conversion, holidays, documents, and web data. It brings common application workflows together through one practical API platform.
- [Apiflash](https://composio.dev/toolkits/apiflash) - Apiflash is a website screenshot API for programmatically capturing web pages. It delivers high-quality screenshots on demand for automation, monitoring, or reporting.
- [Apiverve](https://composio.dev/toolkits/apiverve) - Apiverve delivers a suite of powerful APIs that simplify integration for developers. It's designed for reliability and scalability so you can build faster, smarter applications without the integration headache.
- [APIVerve MCP](https://composio.dev/toolkits/apiverve_mcp) - APIVerve MCP is a hosted utility API server for lookups, validation, conversion, and data enrichment. It gives developers one MCP connection to access APIVerve's utility APIs.
- [Appcircle](https://composio.dev/toolkits/appcircle) - Appcircle is an enterprise-grade mobile CI/CD platform for building, testing, and publishing mobile apps. It streamlines mobile DevOps so teams ship faster and with more confidence.
- [Appdrag](https://composio.dev/toolkits/appdrag) - Appdrag is a cloud platform for building websites, APIs, and databases with drag-and-drop tools and code editing. It accelerates development and iteration by combining hosting, database management, and low-code features in one place.

## Frequently Asked Questions

### Do I need my own developer credentials to use Logfire MCP with Composio?

Yes, Logfire MCP requires you to configure your own Dcr Oauth credentials. Once set up, Composio handles secure credential storage and management for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
