AI engineering glossary · Agents tools MCP
What is MCP (Model Context Protocol)?
Model Context Protocol (also called MCP): An open standard for connecting AI applications to external tools, data and prompts through a common interface. Instead of writing a custom integration for each pairing, developers build a server once and any compatible client can use it.
Model Context Protocol: an example
A single MCP server for a company's Postgres database lets both a chat assistant and an IDE agent run queries.
Model Context Protocol in Python
A short example you can run (Python 3.11). The output below is what it really prints.
import asyncio
from mcp.server.mcpserver import MCPServer # MCP Python SDK 2.x (1.x called it FastMCP)
mcp = MCPServer("invoice-tools")
@mcp.tool()
def gst_amount(net: float, rate: float = 18.0) -> float:
"""GST payable on a net amount."""
return round(net * rate / 100, 2)
tools = asyncio.run(mcp.list_tools())
print([t.name for t in tools])
print(tools[0].description, list(tools[0].input_schema["properties"]))
print(gst_amount(1000))
# mcp.run() would now serve this tool to any MCP client (Claude Desktop, IDE agents...)Output
['gst_amount'] GST payable on a net amount. ['net', 'rate'] 180.0
Related terms
More Agents tools MCP terms
- Model routing
- Multi-agent system
- OpenAI Agents SDK
- Orchestrator-worker pattern
- Parallelisation pattern
- Plan-and-execute
- Planning (agents)
- Procedural memory
Where you learn it
Model Context Protocol is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.