MCP Academy · Lesson

Add a Hello Tool

Decorate a Python function so AI can call it.

Give Your Server a Skill

A server with no tools is just a shell. A tool is a Python function the AI can call to actually do something for the user. 🛠️

The Magic Decorator

FastMCP exposes a function as a tool with one line: the @mcp.tool() decorator placed right above your function definition.

@mcp.tool()
def hello():
    ...

All lessons in this course

  1. Create a FastMCP Instance
  2. Add a Hello Tool
  3. Run the Server with stdio
  4. Confirm It Loads & Lists Tools
← Back to MCP Academy