How Does an MCP Server Work? Anatomy of the Architecture

In a meeting with a logistics client in December, the general manager put a single question on the table: "What is this thing they call MCP, and do we need it?" To be honest, when Anthropic announced the protocol in November, we had been debating the same question internally. Since then — for about two months now — we've been setting up servers in a test environment and putting them through their paces; some experiments went straight into the trash, others left us with lasting lessons. This post is the distilled version of those two months. I'll try to explain the architecture as simply as I can, both for developers saying "I'm going to write an MCP server" and for executives saying "I want to understand what I'm buying."

First, the essence: MCP (Model Context Protocol) is a protocol that lets a language model talk to your systems — your database, your API, your files — in a standard language. The November announcement used the analogy "a USB-C port for AI," and I think it's a fitting one. Instead of producing a separate plug and a separate adapter for every integration, you define a single socket. When I think of how many different systems we've integrated for our clients since 2010, and in how many different ways (from SOAP to REST, and from there to webhook hell), I probably don't need to dwell on the value of a standard socket.

Three actors at the table: host, client, server

There are three roles in the architecture, and not mixing them up is the foundation of everything. The host is the application the user talks to directly; today the best-known example is Claude Desktop. The MCP client running inside the host establishes a one-to-one connection with each MCP server. The server is the door that sits on your side: it announces to the outside which tools exist, executes incoming calls on your own system, and returns the result.

Let me spell out the most critical point separately for executives: the model doesn't see inside your server. It doesn't know your database schema, your code, or your connection details. The only thing it knows is the interface you publish — tool names, their descriptions, and their parameter definitions. So even though "we're opening our system up to AI" sounds scary, what you're actually opening is a window only as narrow as you draw it. And how narrow you draw that window is entirely up to you.

The three roles in the MCP architecture from top to bottom: the host the user talks to, the client inside the host, and the server on your side.
The model doesn't see inside the server; it knows only the published interface.

The life of a tool: from discovery to result

The easiest way to follow how it works is through the life cycle of a single tool. When the client connects to the server, the first thing it does is request the list of tools; for each tool, the server returns a name, a description, and a parameter definition written in JSON Schema. This discovery step looks innocent, but it's actually the moment that decides the fate of the whole system, because these descriptions are the only input to the model's decision about "which tool do I use, and when?" A poorly written description means poor tool selection; we saw this over and over in our test environment.

Then comes the call. The model picks a tool, the host steps in and runs the approval flow — the user says "yes, do it," or doesn't — and the client forwards the call to the server over JSON-RPC. Don't skip this approval step; on the enterprise side, the entire trust model rests on it. The server does the work and returns a structured result; the model reads the result and either writes its answer or decides on the next tool. That's the whole loop.

The life cycle of an MCP tool from discovery to result: the tool list, the model's selection, user approval, execution on the server and reading the result.
The descriptions written at discovery are the only input to the model's tool selection.

Technically, what flows underneath is plain JSON-RPC traffic. There's no magic; the part that looks like magic is the model managing this plain traffic intelligently.

Let me start with a concrete example. Say the user types "list the customers with payments more than 30 days overdue." From the descriptions in the tool list, the model sees that gec_odeme_listele ("list late payments") fits the job and sets the gun_esigi ("day threshold") parameter to 30; the host asks the user, "should this query be run?"; once approved, the server goes to the database and returns the result in structured form; and the model turns that into a readable table and writes its answer. At every step of this few-second flow, you're in control: you decided which tools exist, the user gave the approval, and the query was run by code that you wrote and you constrained.

By the way, servers aren't limited to offering tools; the protocol also defines resources (pieces of data the model can read) and ready-made prompt templates. But for now, the bulk of the work in the field is by far in tools, so that's what I focused on in this post.

Four lessons from two months

Lesson one: define tools in business language. In our first attempt, we wrote a generic "sorgu_calistir(sql)" ("run query") tool that opened up the database; it was bad from a security standpoint, and the model also tried to reinvent the SQL every single time. When we broke it up into single-purpose tools like "gec_odeme_listele(gun_esigi)," the model's room for error shrank and output quality improved visibly. The more specific the tool, the less the model gets wrong — that's the clearest finding of the two months.

Lesson two: narrow permissions on the server side. Trusting the model to behave isn't a security strategy. Make the server's database user read-only, and restrict the allowed operations with a whitelist. Even if the model makes the most absurd call imaginable, it should be physically unable to do damage.

Lesson three: log every call. A system that can't answer "what did the AI do yesterday?" within five minutes can't survive in an enterprise environment. Who, which tool, which parameters, what result — it all needs to be on record. Don't get caught unprepared when the need for an audit comes (and it will).

Lesson four made us sweat a bit: design authentication for remote servers from the start. A local server running over stdio doesn't have this problem; but the moment you expose a server to the network, the question "who is connecting, and with what permissions?" moves to the center of the architecture. We tried to bolt it on afterward in one trial project and ended up nearly rewriting it from scratch. Authentication added after the fact is painful; authentication designed in from the start feels natural.

Four lessons learned while developing an MCP server: tool definitions in business language, narrowed permissions on the server, full logging and authentication from the start.
Trusting the model to behave isn't a security strategy.

So where is this heading?

The protocol is only two months old and the ecosystem is still in its infancy; there's no point hiding that. But I've been in this industry for 15 years, and by now our noses can more or less tell whether a standard is going to catch on. The problem MCP solves is real: writing every AI integration from scratch, each in its own way, wasn't sustainable. That's exactly why the idea of a standard socket is so appealing. Of course there are open questions — remote server scenarios maturing, security practices settling in, and the ecosystem filling up with serious players will all take time. We chose to take these bets and get in early, knowing that those who get in early also fall into the potholes early.

Let me leave a short checklist for those reading from the executive's chair. When your vendor says "we're setting up an MCP server for you," here are the three questions to ask: With what permissions does the server connect to the systems behind it? Which actions go through user approval? Where are tool calls logged, and for how long are those logs kept? If there's no clear answer to these three questions, what you're buying isn't an integration but a risk — no matter how shiny the protocol is.

On our side, the plan is clear. In February we'll share a case study on this blog about opening up our own vehicle tracking API over MCP — real tool definitions, real queries, and the potholes we fell into included. If you don't want to wait for that post and would like to talk now about "how this would be structured for our system," our door is open; these days it's our favorite topic of conversation.

Coming back to the general manager's question from the beginning: I hope I've managed to clarify the "what is MCP" part. The answer to "do we need it" depends on your systems and your appetite — but I'll say this: as we were leaving that meeting, our client was asking, "So we'll be able to ask for reports in plain language?" The question had already shifted from "what" to "when."