What is an MCP server?

Understand MCP servers, clients, tools, resources, and prompts through a small read-only meeting-notes example.

MCP connects a host to a capability

An MCP server is a program that publishes capabilities through the Model Context Protocol. The host is the app you interact with, such as a desktop assistant or editor. A client inside that host talks to the server and turns its capabilities into operations the host can use. The model may suggest a tool call, while the host applies its own policy and permissions before executing it.

Picture an assistant that can summarize a note you paste into chat. An MCP server lets the assistant request an exact note by ID through a declared tool. The meeting-notes server in this course uses two sample records, with no network service or credentials.

Choose the smallest useful interface

Use a tool when a caller needs to invoke a defined operation with inputs. A resource represents content a client can read by URI. An MCP prompt is a reusable message template the client can request. Choose the surface the host you intend to use can actually discover.

  • The get_note tool takes an ID and returns one record.
  • A resource could expose a read-only catalogue description at a fixed URI.
  • A prompt could ask the assistant to cite a meeting title and status.

Write the tool contract first

Use this three-case contract to identify the inputs, the expected response, and the limit on what the operation can reach. The lookup accepts a note ID and never turns it into a filesystem path.

Code
get_note({"id":"weekly-01"})   -> {"id":"weekly-01","title":"Weekly planning","status":"confirmed"}
get_note({"id":"missing-03"})  -> tool error: Unknown note ID.
get_note({"id":"weekly"})      -> input validation error

Know when MCP earns its place

If you need to summarize a single paragraph, pasting it into a chat is enough. An MCP integration helps when a host needs to discover the same capability across many sessions or applications. For a useful first server, keep each operation narrow enough that you can describe its result before you write the code.

Related reading

How Does MCP Work?