04.01 · Walkthrough
Your first MCP server
Build, run and connect a server exposing one real tool.
An MCP server is a small local service that presents your code as model-callable tools. It declares tool names, descriptions and input shapes, then executes ordinary software tasks when a client calls it with structured arguments. The model is not retrained; it gets a typed runtime interface to your implementation.
What this lesson answers
- how do I build my first MCP server
- what does an MCP server actually expose
- why is my MCP tool not appearing
Notes
An MCP server is a small program that exposes capabilities to an AI client in a standard way. Instead of hard-coding every integration into the model or chat app, you run a server that advertises tools, resources, or prompts. For this lesson, the important part is one real tool: a callable function with a name, description, input schema, and implementation.
The mental model is “HTTP API for a model-facing tool belt,” even though MCP itself may use transports like stdio or HTTP-like mechanisms depending on setup.
Common questions
- What is the smallest useful MCP server?
- A minimal useful MCP server starts, registers a single callable tool, describes the tool clearly, defines the expected input shape and returns data the client can consume. The tool can do normal application work such as reading local data, calling an API or computing a deterministic result.
- Does an MCP server change the model itself?
- No. An MCP server does not train, fine-tune or permanently teach the model anything. It gives an MCP-capable client a standard way to discover and call your code at runtime. The model decides when a tool is relevant, while your server owns validation, permissions, side effects and returned data.
- What should I check when an MCP tool does not work?
- Check that the server process starts cleanly, the client is configured to connect to it, and the tool is registered with a valid name, description and input schema. Then inspect the arguments received by your function and verify the return value is serialisable and shaped as the client expects.