PyCon Portugal 2026

Building a Python MCP You Can Trust in Production

Most Python MCP demos work… until they hit production. In this workshop, we’ll build one live, make it secure, and avoid the common mistakes that quietly break things later.


Everyone’s building MCPs right now. Most of them look great in a demo and quietly fall apart in production.

In this workshop, we’ll build a Python MCP server from scratch, live. Not just the happy path, but the parts that usually get skipped, handling real-world usage, avoiding data leaks, and making the system something you can actually trust.

We’ll start with a minimal setup, then layer in structure step by step. How the server talks to tools, how to think about boundaries, what to log and what not to log, and where things usually break. Along the way, I’ll call out the patterns that have worked in practice and the mistakes I’ve personally seen (and made).

The goal is simple. By the end, you should have a working MCP server and a clear mental model for making it reliable and safe enough to run beyond a demo.

Prerequisites

  • Comfortable with Python (basic APIs, functions, and debugging)
  • Familiarity with APIs or backend services
  • A general idea of what MCP / LLM-based systems are (no deep knowledge needed)
  • Laptop with Python environment set up (we’ll be coding live)

Audience Level: Beginner What are the main topics of your talk?:

MCP