You give an agent a tool, ask it to look up a customer's order, and it calls the wrong endpoint, passes the order ID as a string where the schema wanted an integer, and retries four times before giving up. The model was fine. The server was the problem.
That is the whole story of MCP work in one line. The Model Context Protocol gives an AI client a standard way to discover and call external capabilities — tools, resources, prompts — but the protocol only defines the handshake. Everything that decides whether the agent succeeds happens in what you put behind it. This article is about that part: how MCP servers are actually built, where beginners stall, and what separates a server the agent uses confidently from one it fumbles.
The myth: MCP is a thin wrapper around an API
A common first instinct: take your REST API, expose each endpoint as a tool, done in an afternoon. People who do this get a server that technically connects and practically disappoints.
The misconception comes from the name — "protocol" sounds like plumbing, and plumbing is supposed to be invisible. But an MCP server is not a proxy. It is a presentation layer for a language model, and the model has no documentation, no Postman collection, and no memory of your endpoint naming conventions. It sees only what your server tells it: tool names, descriptions, and JSON Schema for parameters.
What that costs: a tool called get_ord with a description "Gets order" and a parameter id of type string will be called, and it will be called wrong. The agent will pass a customer email. It will pass "order #1234" including the word "order". Each bad call burns a turn, and after two or three the model often abandons the tool and tells the user it can't help. More on the topic: “AI Automation and Agents: How to Avoid the Hype and Automate Business Processes Wisely”.
The fix is unglamorous and it is most of the job: name tools after the action and the object (get_order_by_id), describe them in one sentence that says when to use them, and constrain parameters with enums and formats so wrong input fails at the schema instead of inside your handler.
One walkthrough: a support agent that needs order status
Say you are extending a support assistant so it can answer "where is my order?". Here is how the work actually goes, and where each decision bites.
Step 1 — decide what is a tool and what is a resource. A tool is something the agent does; a resource is something it reads. Order status is a lookup with a side-effect-free answer, so it can be either — but if you make it a resource, the client has to fetch it explicitly, and you lose the schema validation. For a parameterised lookup like this, a tool is the safer default. More on the topic: “AI Agents in Practice: Designing Multi-Agent Systems for Complex Tasks — and Who This Path Is Actually For”.
Step 2 — design the schema before the handler. One required parameter, the order ID, as a string with a pattern, plus an optional include_tracking boolean. Resist the urge to accept "order ID or email or phone". Each alternative you fold into one parameter is a branch the model must guess at; three narrow tools beat one clever one.
Step 3 — choose the transport. For a server that runs on the user's own machine next to Claude Desktop or VS Code, stdio is the right answer: the client spawns the process, talks over stdin/stdout, and there is no port to open, no auth to configure, no attack surface on the network. A remote server that several users share needs a network transport instead — SSE or WebSocket — and with it, real authentication, because now anyone who reaches the endpoint can call your tools.
Step 4 — return something the model can reason about. A raw JSON dump of forty fields is technically correct and practically useless: it eats context and buries the two facts the user asked for. Return a compact object — status, estimated delivery date, tracking number if requested — and put the noise behind a separate, explicitly named tool.
Step 5 — fail informatively. "Error 500" tells the agent nothing. "Order 1234 not found — the customer may have given a different reference" tells it what to try next. Error text is part of your prompt. More on the topic: “AI Automation and Agents: Who the Course Is For and Who It Isn't. Learn to Automate Business Processes Without Programming”.
Do steps 2 and 4 in the wrong order — write the handler first, shape the response later — and you will rewrite both. The schema is the contract; the handler serves it, not the other way round.
The myth: if it works in my client, it works
A server that behaves perfectly in Claude Desktop can fall apart elsewhere, and the gap is almost always transport, not logic. The stdio server that never leaves your laptop never meets authentication, concurrency, or a client that opens two sessions at once.
Going to production changes the checklist:
- Authentication and authorisation — a network-exposed MCP server needs a real token check on every call, and the token should decide which tools are visible, not just whether the connection opens.
- Timeouts and idempotency — an agent may retry. If your write tool is not idempotent, a retry creates a second ticket, a second charge, a second email.
- Monitoring — you need to see tool call volume, latency, and error rates per tool. Without that, a tool that silently fails half the time looks to the team like "the AI is dumb today".
- Rate limits and cost — every tool result lands in the model's context window. A tool that returns 8,000 tokens of JSON on every call is a tool that quietly drains budget and crowds out the conversation.
The myth: more tools means a more capable agent
It feels like progress: forty tools, every internal service exposed. In practice, tool selection accuracy degrades as the list grows, because the model is choosing among more similar-sounding options with the same attention it had for five.
The professional move is the opposite of exposure — it is curation. Group related operations behind fewer, well-named tools. If the agent needs to search, read, and update a record, one manage_ticket tool with an explicit action enum can be clearer than three tools whose descriptions all start with the word "ticket".
A useful test before shipping any tool: could a competent colleague, reading only the name and description, tell exactly when to call it and when not to? If not, the model can't either.
There is a second-order cost too. Every tool you expose is a surface you must maintain, secure, and monitor. A tool nobody calls is not free — it is a liability that shows up in your schema and your audit log.
The myth: you learn MCP by reading the spec
The specification is short and necessary, and reading it once will not make you able to build a server that works. The skill lives in the gaps the spec deliberately leaves open: how to phrase a description, how to split a capability into tools, how to shape a response for a context window.
That means the honest learning paths look like this:
| Path | Time to a working server | What it costs you | What you actually get |
|---|---|---|---|
| Read the spec and the SDK docs, build solo | Days to a first server, weeks to a good one | Every design mistake is discovered by your own users | Deep familiarity, but slow and blind to conventions |
| Copy an open-source MCP server and adapt it | Hours | You inherit someone else's schema decisions, good and bad | A working starting point, weak on why |
| Structured course with hands-on tasks and feedback | Weeks, paced | Money and a schedule | Someone checks your tool design; you skip the classic mistakes |
| Build it on the job with a mentor | Weeks | Depends entirely on the mentor | Fastest, least predictable |
None of these is wrong. The solo path produces excellent engineers who have made every mistake themselves; the course path compresses that by putting the mistakes in front of you before your users find them. What no path gives you is judgement about tool granularity — that comes from shipping and watching the call logs.
If you want a sense of what good tool design looks like before you start, the blog has a companion piece on how we approach it: MCP Servers and Tools for AI: How We Build Tools That Truly Extend Agent Capabilities — and Who This Path Is For, and Who It Isn't.
And if your server ends up exposing something that touches personal data — an inbox, a CRM, an internal directory — the authentication and scoping questions overlap heavily with agent integration work on encrypted services. The same reasoning applies there: ProtonMail Integration with an AI Agent: How to Automate an Encrypted Inbox Without Weakening It.
Who this path is for, and who should skip it
MCP server work suits you if you already write code comfortably in one language, you have consumed an API or two, and you are curious about why agents fail at tasks that look trivial. It is a good fit for backend developers, tooling engineers, and the person on a team who ends up owning "the AI integration".
It is a poor fit if you are hoping to avoid programming — MCP servers are code, deployed and monitored like code. It is also a poor fit if you want a purely theoretical understanding; the protocol is small, and the value is entirely in building something and watching an agent use it.
One more honest caveat: the ecosystem is young and moving. Transports, SDKs, and client behaviour are still changing month to month, so anything you learn is a snapshot. What does not change is the design discipline — narrow tools, honest descriptions, compact responses, idempotent writes — and that is the part worth learning properly.
That discipline is what a structured course is actually for. Building MCP Servers works through the protocol and transports, tool and resource design, integration with Claude Desktop and VS Code, and production deployment with monitoring — with hands-on tasks at the end of each module and an AI tutor to check your reasoning when a design decision is not obvious. The lessons adapt to how you are doing: deeper material where you score well, back to fundamentals where you do not. If you would rather read the spec and build alone, that is a legitimate path too — just plan for the mistakes to be yours.