MCP primitives: the mental model behind the protocol
Blog post from Portkey
MCP is a protocol framework built around key primitives such as resources, tools, prompts, sampling, and roots, which serve as the foundational elements for designing MCP servers and understanding agent behavior. Resources provide context without executing actions, while tools execute specific operations with defined inputs and outputs, ensuring clarity between reasoning and action. Prompts offer reusable instructions to guide model behavior, and sampling controls the generation of model output, allowing for consistent and predictable performance. Roots define the scope and boundaries within which these elements operate, ensuring secure and isolated functionality. These primitives work together to maintain clarity and prevent complexity in MCP systems, facilitating easier troubleshooting and extensibility as systems scale. The MCP Gateway addresses operational challenges like authentication and visibility, enhancing the deployment of MCP-powered agents in production environments.