Back to website
Mayank Aggarwal Learning Center

Phase 05 · GenAI & LLM ApplicationsLesson 2 of 3

MCP (Model Context Protocol) for Beginners

The open standard for plugging tools and data into AI apps and agents.

  • 47:40 video
  • 2 min read
  • Beginner
01

The problem

An AI assistant becomes far more useful when it can reach your real tools: read a database, search your files, create a ticket, check a calendar. Before MCP, every AI app needed custom code for every tool. The Model Context Protocol (MCP) is an open standard that gives AI applications one common way to connect to tools and data.

02

The concept

The problem MCP solves#

Imagine 5 AI apps (Claude, an IDE assistant, your own agent…) and 10 tools (GitHub, Postgres, Slack, Google Drive…). Without a standard, that's up to 50 custom integrations. With MCP, each tool is wrapped once as an MCP server, and any MCP client can use it.

The pieces#

PieceRoleExample
Host / clientThe AI application that wants to use toolsClaude Desktop, Claude Code, an IDE, your agent
MCP serverA small program that exposes capabilities in the MCP formatA GitHub server, a Postgres server, your own server
ToolsActions the model can call, with typed inputscreate_issue(title, body), run_query(sql)
ResourcesData the client can readFiles, database records, documents
PromptsReusable prompt templates the server offers"Summarise this pull request"

How a tool call flows#

  1. The client connects to an MCP server and asks: "What tools do you have?"
  2. The server answers with each tool's name, description and input schema.
  3. When the user asks something, the model decides a tool would help and requests a call, for example get_weather(city="Pune").
  4. The client sends the call to the server, the server runs it and returns the result.
  5. The model uses the result to write its answer.

A tiny MCP server (Python)#

Python
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("notes")

@mcp.tool()
def add_note(title: str, body: str) -> str:
    """Save a note with a title and body."""
    save_to_db(title, body)   # your own storage function
    return f"Saved note '{title}'"

if __name__ == "__main__":
    mcp.run()

Notice how much this resembles a normal Python function. The type hints and docstring become the description the model reads when deciding whether to call the tool.

Why it matters#

MCP turns the tool-integration problem into a reusable ecosystem. As an AI engineer you'll both use existing MCP servers (to give agents capabilities quickly) and build your own to expose your company's systems safely to AI assistants.

03

Try it

Your task · about 10 minutes

Connect one ready-made MCP server (for example the filesystem server) to Claude Desktop and ask Claude to list and summarise the files in a folder.

Use the interactive visual above to explore it step by step
04

Recap & next

Key takeaways

  1. MCP is an open protocol that standardises how AI applications connect to tools and data sources.
  2. An MCP server exposes tools, resources and prompts; an MCP client (Claude, IDEs, agents) connects to it.
  3. Build an integration once as an MCP server and any MCP-compatible client can use it.
  4. Agents use MCP tools to take real actions: query databases, call APIs, read files.

Quick check

2 questions · instant feedback

1What does an MCP server provide?
2The main benefit of MCP is…

Finished this lesson?

Mark it complete to track your progress and keep your streak going.

Next