---
title: Pydantic AI MCP Support & Logfire MCP Server Release
description: >-
  We are excited to officially announce the launch of Pydantic AI Agents as MCP
  clients and the Pydantic Logfire MCP server
date: '2025-03-20'
authors:
  - Samuel Colvin
categories:
  - Pydantic Logfire
  - Company
canonical: 'https://pydantic.dev/articles/mcp-launch'
---

> Markdown version of [Pydantic AI MCP Support & Logfire MCP Server Release](https://pydantic.dev/articles/mcp-launch) — the canonical HTML page.
>
> By [Samuel Colvin](https://pydantic.dev/authors/samuel-colvin.md) · 2025-03-20 · Pydantic Logfire, Company
>
> Related: [You've built this agent before](https://pydantic.dev/articles/harness-week.md) · [Your traces already know how to fix your prompt](https://pydantic.dev/articles/logfire-prompt-optimization.md)
>
> All articles: [/articles.md](https://pydantic.dev/articles.md) · Site index: [/llms.txt](https://pydantic.dev/llms.txt)

---

Today we're excited to announce two powerful additions to the [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) (MCP)
ecosystem: Pydantic AI Agents as MCP clients, and the Pydantic Logfire MCP server.
These tools bring enhanced capabilities to AI applications through standardized integrations.

## Pydantic AI MCP Support

Pydantic AI now supports the Model Context Protocol in three key ways:

1. **Agents as MCP Clients**: Pydantic AI agents can connect to MCP servers to leverage their tools and capabilities
2. **Agents in MCP Servers**: Pydantic AI agents can be used within MCP servers
3. **mcp-run-python**: As part of our ecosystem, we're building specialized MCP servers, including [mcp-run-python](https://github.com/pydantic/mcp-run-python)

Learn more on the [Pydantic AI docs](https://pydantic.dev/docs/ai/mcp/overview/).

## Pydantic Logfire MCP Server

Our latest MCP server implementation is for our Pydantic Logfire observability platform. This MCP server enables AI applications to search
and analyze logs, traces, and metrics directly. This powerful integration helps debugging workflows by providing AI assistants
with crucial observability context. **Because Pydantic Logfire allows you to query your data using SQL, it is particularly well-suited to
AI agent support.**

## Setting Up Pydantic Logfire MCP Server in Cursor

Here's a video demo showing how you can query your Pydantic Logfire data in Cursor using the Pydantic Logfire MCP server:
<div class="responsive-video-container">
  <iframe width="560" height="315" src="https://www.youtube.com/embed/lCdaVNyHtjU?si=Ir1cYn5y9sm7ZvBF" title="Watch Logfire MCP  Servcer in action" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>

This enables working with Cursor's coding agent (or any other IDE that supports MCP) for:

- AI-driven fixes based on issues found in your live applications
- Identification of bottlenecks in your code based on live data
- Easy querying and understanding of your errors

And many more!

Getting started with the Pydantic Logfire MCP server in Cursor is straightforward. Create or update your `.cursor/mcp.json` as per our [setup instructions](https://github.com/pydantic/logfire-mcp?tab=readme-ov-file#setup),
make sure you select `agent` mode in the Cursor chat, and then your AI agents will start using Pydantic Logfire!

## What is MCP?

The Model Context Protocol provides a standardized interface for AI applications to connect with external tools and services. This common interface enables applications like Pydantic AI agents,
coding assistants like Cursor, and desktop apps like Claude Desktop to seamlessly interact with various services.

The MCP ecosystem is growing rapidly, with many implementations available at [github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers).
Samuel and Marcelo from Pydantic are helping to maintain the [official Python SDK](https://github.com/modelcontextprotocol/python-sdk) for MCP servers and clients.

## Use Cases

- Create deep research agents by connecting Pydantic AI to web search MCP servers
- Help Cursor (or Windsurf, Claude Code etc.) debug complex issues by connecting to Pydantic Logfire's MCP server for observability context
- Run sandboxed Python code through Pydantic Logfire's [Run Python MCP server](https://github.com/pydantic/mcp-run-python) from any MCP client

If you've got any questions or suggestions, please [let us know](https://pydantic.dev/docs/logfire/get-started/help/).
