drio
Open app

Logfire MCP Server

Source

The Logfire MCP Server is here! 🎉

Catalog onlyCatalog onlySTDIO

Overview

Logfire MCP is a server that facilitates communication using the Model Context Protocol (MCP) for various clients.

To use Logfire MCP, install it via pip and run the server with a Logfire read token. You can also configure different clients to connect to the server.

  • Easy installation via pip - Supports multiple client configurations - Uses stdio transport protocol for communication
  1. Connecting various applications to the Logfire MCP server.
  2. Facilitating communication between different client tools and the server.
  3. Enabling developers to create self-hosted Logfire instances.

Add to your AI client

Use these steps to connect Logfire MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "logfire-mcp-pydantic": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "logfire-mcp-pydantic": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "logfire-mcp-pydantic": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "logfire-mcp-pydantic": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "logfire-mcp-pydantic": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "logfire-mcp-pydantic": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-logfire-mcp-pydantic"
      ]
    }
  }
}

FAQ

How do I install Logfire MCP?

You can install it using the command: `pip install logfire-mcp`.

What is a Logfire read token?

It is a token required to authenticate and connect to the Logfire MCP server.

Can I self-host Logfire MCP?

Yes, you can set the `LOGFIRE_BASE_URL` environment variable to point to your own instance.