What Problem Does MCP Solve?
Before MCP, every AI agent framework invented its own schema for registering tools. If you wrote a tool for GitHub integration in LangChain, you had to rewrite it for CrewAI, AutoGen, and custom OpenAI function calling. Furthermore, giving LLMs access to local files or databases required ad-hoc security practices.
The Model Context Protocol (MCP) standardizes how AI applications discover, authenticate, and execute tools over a secure JSON-RPC interface.
Core MCP Concepts
- MCP Host / Client: The application orchestrating LLM reasoning (e.g. Claude Desktop, Cursor, or a custom Python agent loop).
- MCP Server: A lightweight standalone service providing resources (data/files), prompts (reusable templates), and tools (executable functions).
- Transports:
- Stdio Transport: Client launches the server as a local subprocess and communicates via standard input/output streams.
- SSE (Server-Sent Events) Transport: Client communicates over HTTP/HTTPS for remote or networked tool servers.
Building a FastMCP Server in 10 Lines of Python
from mcp.server.fastmcp import FastMCP
# Initialize FastMCP Server
mcp = FastMCP("System-Tools")
@mcp.tool()
def calculate_roi(investment: float, returns: float) -> dict:
"""Calculates net ROI percentage."""
net_profit = returns - investment
roi = (net_profit / investment) * 100
return {"net_profit": net_profit, "roi_percentage": round(roi, 2)}
if __name__ == "__main__":
mcp.run(transport="stdio")
Inspect our MCP AI Agents Category and FastMCP Shared Code Blocks for complete server templates.