MCP standardizes how an AI app talks to external systems. The host (Claude Code, VS Code, Cursor) creates one client per MCP server, and the server exposes three kinds of things: tools, which are actions; resources, which are context data; and prompts, which are reusable templates. Everything travels as JSON-RPC 2.0, over stdio when the server runs locally or over Streamable HTTP when it is remote.
To get started, read the architecture page, then the build-a-server guide for your language SDK. The MCP Inspector, one of the official tools, lets you test a server without an AI app in the loop. Each tool name and description is what the model reads to decide when to call it, so write them like documentation, not labels.
The trap is security. A local stdio server runs as a process on your machine with your permissions. Read the code before installing a third-party server, grant the least access possible and go through the security best practices section. The specification has dated versions, so check which one your SDK implements.