From 1, The one-liner for MCP as follows
The Model Context Protocol is an open standard that enables developers to build secure, two-way connections between their data sources and AI-powered tools.
MCP sounds like a good approach for extendible agentic tools
First example Link to heading
Step 1, First install mcp
pip install mcp
Step 2, The server with a tool and resource
# server.py
from mcp.server.fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Demo")
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers"""
return a + b
# Add a dynamic greeting resource
@mcp.resource("greeting://{name}")
def get_greeting(name: str) -> str:
"""Get a personalized greeting"""
return f"Hello, {name}!"
Step 3, Run the dev server
mcp dev server.py
Step 4, One way to call tools and resource is using the web interface
Opening http://localhost:5173
in the browser gives us access to the tools and resources defined