MCP Architecture
The MCP Architecture follows a classic client-server pattern. The Server provider exposes capabilities, while the Client (AI host/application) connects to servers, performs capability discovery (handshake), and manages the request lifecycle.
Key components of this architecture include:
- Transport Layer: Defines how messages are exchanged (stdio, HTTP/SSE, custom).
- Capability Discovery/Registration: A handshake process upon startup where the client and server exchange lists of supported tools, resources, and prompts. Unregistered capabilities are inaccessible.
- Routing: The client maintains connections to multiple servers, routing requests by matching tool/resource/prompt names to the owning server, using namespace prefixes to prevent naming collisions.