The Model Context Protocol (MCP) is an open standard (Anthropic, 2024) for connecting AI agents to external tools, data sources, and services. MCP servers expose three primitive types: Resources (file-like data for context), Tools (executable functions), and Prompts (reusable prompt templates). Clients (LLM hosts) connect to servers via stdio (local process) or SSE (HTTP server). MCP enables a standardised ecosystem where an agent can use any MCP server without custom integration code.
Three MCP primitive types and when to use each.
Without MCP, connecting 5 agents to 10 tools requires 50 custom integrations. With MCP, each tool is written once as an MCP server and works with any MCP-compatible host.
Stdio is simpler for local development and CLI tools. SSE (Server-Sent Events over HTTP) is needed for shared services, cloud-hosted tools, and multi-user deployments.
Resources and tools serve different purposes. Use resources for background knowledge injection (docs, schemas, codebase). Use tools for executing actions and queries that require LLM decision-making.
Sign in to share your feedback and join the discussion.