← back to the archiveCover illustration for “MCP server: how a tool exposes itself to AI apps”
TERM6mo ago·Published · Updated ·by Andy Padia

MCP server: how a tool exposes itself to AI apps

In short: An MCP server is a program that exposes tools, resources and prompts to AI clients over the Model Context Protocol, so one build serves every client.

An MCP server is a program that exposes capabilities to AI applications using the Model Context Protocol. It can offer tools the model calls, resources the app reads and prompt templates for users, the three server features listed in the specification, whose current version is dated 2026-07-28. Servers run locally on your machine or remotely as a web service, and any MCP-capable client can connect to them.

MCP server in plain words

It is a translator standing in front of your system, telling any AI app, "here is what I can do, here is how to ask, and I will run it for you."

How it works

Messages are JSON-RPC 2.0. A client asks the server what it offers and gets back its tool definitions. When the model picks a tool, the client forwards the call, the server runs real code, such as a database query or an API call, and returns the result.

The 2026-07-28 specification makes requests stateless and self-contained, with capabilities negotiated per request, so do not design a server around a long-lived session. It also says tools represent arbitrary code execution and that hosts must obtain explicit user consent before invoking one.

Example

A minimal Python server in the style of the official build a server tutorial, which asks for Python MCP SDK 2.0.0 or higher as read in November 2026:

from mcp.server import MCPServer

mcp = MCPServer("orders")

@mcp.tool()
def order_status(order_id: str) -> str:
    """Return the shipping status for an order ID."""
    return lookup(order_id)

if __name__ == "__main__":
    mcp.run(transport="stdio")

The SDK builds the tool definition from the type hints and the docstring, so the docstring is the description the model reads. Here lookup stands in for your own code. One warning from the tutorial: a stdio server must never write to stdout, because that corrupts the JSON-RPC messages.

Where you'll meet it

  • Desktop AI apps such as Claude for Desktop, the host used in the official tutorial
  • Vendor-published servers for SaaS products
  • Internal servers wrapping company databases and APIs
  • Coding agents that let you register servers in their settings

What it changes for you

Building an MCP server is an ordinary integration task, close to shipping an SDK. For developers, tool descriptions and error messages are the product. For security teams, each server needs least-privilege credentials, logging and a review of which actions it allows.

MCP server vs MCP client

The server offers capabilities. The client, inside the AI app, connects to servers and passes tool calls between them and the model.

Common mistake

My view: wrapping an entire REST API one endpoint per tool. Models do better with a few task-shaped tools, such as "find_customer_by_email", than with fifty thin endpoint mirrors.

Model Context Protocol · Tool calling · WebMCP · AI gateway · Guardrails

From the archive: Stateless MCP moves the state problem onto your side · MCP needs revocation before reach

Give the model a few task-shaped tools and resist mirroring every endpoint of your API.

#field-guide#mcp#protocols#integration#developer-tools

Sources

  1. modelcontextprotocol.io/docs/develop/build-server
  2. modelcontextprotocol.io/specification
← older drop
Agentic RAG: an agent that decides what to search for
newer drop →
OpenCode: an open-source AI coding agent for the terminal

related drops

explore all 557 drops →
← back to the archiveday 175