MCP is an open standard for connecting AI apps to tools and data. Model is the LLM, Context is the tools and data it can use, and Protocol is the agreed message formats. It is now run by the Agentic AI Foundation of the Linux Foundation.
The problem it solves
- AI apps and shops would need custom connectors
- with one standard, only pieces are needed
- think of it as USB-C for AI tools
| Role | In the shopping example |
|---|---|
| MCP server | The shop offers its 4 tools |
| MCP client | The agent connects to the server |
| Reuse | Any other agent can use the same server |
How agents are built today
Frameworks differ in style, but all of them run the same loop:
| Layer | What it does | Common choices |
|---|---|---|
| Model | Tool calling and reasoning | OpenAI, Anthropic, Google Gemini, and open models such as Qwen and Llama |
| Agent framework | Runs the loop, memory and retries | LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, CrewAI |
| Connections | Tools and other agents | MCP for tools, A2A for agent to agent |
| Monitoring | Record and test every step | LangSmith, Langfuse, test suites |
Remembering tip
Learn the loop, not the framework. The frameworks change, and the loop stays the same.
Code
A minimal MCP server that offers one tool, using the Python SDK:
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("shop")
@mcp.tool()
def search_products(query: str, max_price: float | None = None) -> list[dict]:
"""Search the shop catalogue for products."""
return [p for p in CATALOGUE if max_price is None or p["price"] <= max_price]
if __name__ == "__main__":
mcp.run()Notes:
- the type hints and the docstring become the schema and the description that the LLM sees
CATALOGUEis the list of listings of the shop- this is the same schema idea as in Tool Call Validation, offered through a standard plug
A tool-using agent must also stay on track over many steps, see Agent Planning.