<aside> 👋🏻

Author: Iván Corrales Solera [email protected]

https://www.linkedin.com/in/ivan-corrales-solera/

https://github.com/ivancorrales

Source: De un servidor MCP funcional a un sistema observable: logs, trazas y métricas con OpenTelemetry

</aside>

It’s relatively simple to develop an MCP server that exposes some tools for an AI agent to use. With Python and the official MCP SDK, we can have a working example in just a few lines.

However, getting it to work is just the beginning.

Imagine we’ve developed an agent capable of querying data from an online store. We ask it about the most sold products, customer purchases, or monthly billing and get correct responses.

But questions start to arise:

These questions have something in common: we can’t answer them just by checking that our application works.

We need observability.

In this article, we’ll progressively evolve an MCP server by incorporating structured logs, distributed traces, and metrics. We’ll use Python, OpenTelemetry, Jaeger, Prometheus, and Grafana, working completely locally.

We won’t introduce all these technologies at once. We’ll add one capability at a time, understand what problem each solves, and verify what new information we have available.

1. Our Starting Point (git switch base)

To focus on observability, I’ve prepared a repository with a functional MCP project.

The application represents a small online store and contains: