DANIEL KIRCHNER
All articles
March 28, 20266 min read

MCP Servers: The Model Context Protocol in Practice

MCPAILangChainPythonFastAPILLM

What is the Model Context Protocol?

The Model Context Protocol (MCP) is an open standard for how models talk to external tools and data sources. Instead of each LLM shipping its own tool integration, MCP offers one interface.

Models are closed systems. They generate text but cannot hit your database, send mail or call internal APIs without help.

An MCP server exposes defined tools. The model decides when to call which tool.

Architecture of an MCP server

An MCP server has three parts:

  • Tool definitions: which functions does the model get?
  • Transport: how does the model talk to the server? (stdio, HTTP/SSE)
  • Implementation: what happens when a tool is called?
  • A concrete example

    On a healthcare platform I built an MCP server so the chatbot could search the knowledge base (500+ video and PDF items) without stuffing every source into the prompt. Tools were search_knowledge and get_article_details. One server, reusable from LangChain or another client.

    MCP vs classic function calling

    AspectFunction callingMCP
    StandardProvider-specificOpen standard
    TransportHTTP/RESTstdio, HTTP/SSE
    DiscoveryManualAutomatic tool discovery
    ReusePer integrationOne server, many clients

    The main gain: one MCP server can serve several AI clients. You implement the integration once.

    Lessons

    1. Tool descriptions decide the call

    The model picks tools from the description. Clear text with examples raises the hit rate.

    2. Error handling

    If the database is down or search returns nothing, the server must return errors the model can interpret.

    3. Logging and observability

    In production you need to know which tools ran, how often, and how long they took. We log every tool call with metadata. That is adjacent to reconstructing answers, not a replacement.

    When an MCP server is worth it

  • The chatbot must reach internal sources
  • You want the same tools on more than one LLM
  • Agents should act on your systems, not only talk
  • Close

    MCP is young and it solves a real problem: a standard path between models and systems. A Python server with the official SDK is a matter of days.

    The matching entry is the LLM readiness check.

    Related articles

    LLM evaluation in production

    A prompt or model change makes quality worse. Nobody notices if evaluation is missing. What I measure in regulated LLM projects.

    Read article

    A bad answer has to be reconstructable

    Without observability nobody knows cost per request and nobody can reconstruct a bad answer. What production LLM systems must log.

    Read article

    A call

    30 minutes. If the use case does not belong in production, I'll say so.