From 0e0a31e40be9e0c88bbb2db514666e3352acfd1e Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 9 Feb 2026 20:25:03 +0100 Subject: [PATCH 1/3] docs: add remote MCP server section to MCP guide Add documentation for the hosted remote MCP server as the recommended way to use Logfire MCP. This provides an easier setup experience for users who don't need to run the server locally. - Add Remote MCP Server section at the top with US and EU configs - Reorganize local setup under "Running Locally" section - Keep existing client-specific configurations for local usage Co-Authored-By: Claude Opus 4.5 --- docs/how-to-guides/mcp-server.md | 60 +++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/how-to-guides/mcp-server.md b/docs/how-to-guides/mcp-server.md index 9b026ed98..4f404c615 100644 --- a/docs/how-to-guides/mcp-server.md +++ b/docs/how-to-guides/mcp-server.md @@ -9,18 +9,62 @@ access to OpenTelemetry traces and metrics through Logfire. This server enables application's telemetry data, analyze distributed traces, and perform custom queries using **Logfire**'s OpenTelemetry-native API. -
- -
- You can check the [Logfire MCP server](https://github.com/pydantic/logfire-mcp) repository for more information. -## Installation +## Remote MCP Server (Recommended) + +Pydantic Logfire provides a hosted remote MCP server that you can use without installing anything locally. +This is the easiest way to get started with the Logfire MCP server. + +To use the remote MCP server, add the following configuration to your MCP client. + +**Choose the endpoint that matches your Logfire data region:** + +For **US region** (`logfire-us.pydantic.dev`): + +```json +{ + "mcpServers": { + "logfire": { + "type": "http", + "url": "https://logfire-us.pydantic.dev/mcp" + } + } +} +``` + +For **EU region** (`logfire-eu.pydantic.dev`): + +```json +{ + "mcpServers": { + "logfire": { + "type": "http", + "url": "https://logfire-eu.pydantic.dev/mcp" + } + } +} +``` + +!!! note + The remote MCP server handles authentication automatically through your browser. When you first connect, + you'll be prompted to authenticate with your Pydantic Logfire account. + +--- + +## Running Locally + +If you prefer to run the MCP server locally (for example, for offline use or custom configurations), +you can use the [`logfire-mcp`](https://pypi.org/project/logfire-mcp/) package instead. + +
+ +
-The MCP server is a CLI tool that you can run from the command line. +### Installation -You'll need a read token to use the MCP server. See +You'll need a read token to use the MCP server locally. See [Create Read Token](./query-api.md#how-to-create-a-read-token) for more information. You can then start the MCP server with the following command: @@ -38,7 +82,7 @@ LOGFIRE_READ_TOKEN= uvx logfire-mcp@latest The way to configure the MCP server depends on the software you're using. !!! note - If you are in the EU region, you need to set the `LOGFIRE_BASE_URL` environment variable to `https://api-eu.pydantic.dev`. You can also use the `--base-url` flag to set the base URL. + If you are in the EU region, you need to set the `LOGFIRE_BASE_URL` environment variable to `https://api-eu.pydantic.dev`. You can also use the `--base-url` flag to set the base URL. #### Cursor From b3ba0542c1fc8bc649c9c9a7c79e01225b6ec308 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Tue, 10 Feb 2026 09:59:23 +0100 Subject: [PATCH 2/3] Improve --- docs/how-to-guides/mcp-server.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/how-to-guides/mcp-server.md b/docs/how-to-guides/mcp-server.md index 4f404c615..a39427acc 100644 --- a/docs/how-to-guides/mcp-server.md +++ b/docs/how-to-guides/mcp-server.md @@ -51,11 +51,19 @@ For **EU region** (`logfire-eu.pydantic.dev`): The remote MCP server handles authentication automatically through your browser. When you first connect, you'll be prompted to authenticate with your Pydantic Logfire account. +!!! note + If you are running a self-hosted Logfire instance, you should use the [Running Locally](#running-locally-deprecated) section below + to configure the MCP server with your custom base URL. + --- -## Running Locally +## Running Locally (Deprecated) + +!!! warning + Running the MCP server locally is deprecated. Please use the [Remote MCP Server](#remote-mcp-server-recommended) instead. + The local server will continue to work, but we recommend migrating to the remote server for a better experience. -If you prefer to run the MCP server locally (for example, for offline use or custom configurations), +If you prefer to run the MCP server locally (for example, for self-hosted Logfire or custom configurations), you can use the [`logfire-mcp`](https://pypi.org/project/logfire-mcp/) package instead.
From 49e735d2c7ca50dbeb7358a3ae99526b52e3809f Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Tue, 10 Feb 2026 13:22:20 +0100 Subject: [PATCH 3/3] Fix self-hosted MCP docs to reference remote server URL Self-hosted customers have the MCP server in their own deployment, so they should use their instance URL rather than running locally. Co-Authored-By: Claude Opus 4.6 --- docs/how-to-guides/mcp-server.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/how-to-guides/mcp-server.md b/docs/how-to-guides/mcp-server.md index a39427acc..1ccf93aae 100644 --- a/docs/how-to-guides/mcp-server.md +++ b/docs/how-to-guides/mcp-server.md @@ -52,8 +52,8 @@ For **EU region** (`logfire-eu.pydantic.dev`): you'll be prompted to authenticate with your Pydantic Logfire account. !!! note - If you are running a self-hosted Logfire instance, you should use the [Running Locally](#running-locally-deprecated) section below - to configure the MCP server with your custom base URL. + If you are running a self-hosted Logfire instance, replace the URL above with your own Logfire instance URL + (e.g., `https://logfire.my-company.com/mcp`), as the remote MCP server is hosted alongside your Logfire deployment. --- @@ -63,8 +63,7 @@ For **EU region** (`logfire-eu.pydantic.dev`): Running the MCP server locally is deprecated. Please use the [Remote MCP Server](#remote-mcp-server-recommended) instead. The local server will continue to work, but we recommend migrating to the remote server for a better experience. -If you prefer to run the MCP server locally (for example, for self-hosted Logfire or custom configurations), -you can use the [`logfire-mcp`](https://pypi.org/project/logfire-mcp/) package instead. +If you prefer to run the MCP server locally, you can use the [`logfire-mcp`](https://pypi.org/project/logfire-mcp/) package instead.