Lesson · ⏱ 6 min read

🔗 MCP: a universal plug for AI tools

EnglishHinglish

🏠 Real-life example

Before USB-C, every phone had its own charger. Now one cable works with almost everything. The Model Context Protocol (MCP) does this for AI: build a connector for your tool or data once, and many AI apps and agents can plug into it.

💡 In simple words

MCP is an open standard for connecting AI applications to tools and data. An MCP server exposes tools (actions), resources (data to read) and prompts in a standard format. An MCP client, such as an AI assistant or agent, discovers and uses them. So instead of writing custom integration code for every AI app, you write one MCP server for, say, your company's ticketing system. For engineers, building an MCP server is a practical, in-demand skill that shows you understand tool use, auth and security.

🪜 Step by step

  1. An MCP server wraps a system (tickets, files, a database) and exposes tools, resources and prompts in a standard format.
  2. An MCP client lives inside an AI app (an assistant, an IDE, your own agent) and connects to one or more servers.
  3. The client lists the server's tools and passes them to the model, which can then call them.
  4. Calls flow through the client to the server, which runs them with its own authentication and permissions.
  5. Build once, reuse everywhere: the same server works with every MCP compatible app.

🔑 Key terms

MCP server
A program that exposes tools and data to AI apps in the MCP format.
MCP client
The AI app or agent that connects to MCP servers.
Resource
Read-only data the server shares, like a file or record.

👀 See it in action

python
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("tickets")

@mcp.tool()
def open_tickets(team: str) -> list[dict]:
    """List open support tickets for a team."""
    return db.query("SELECT id, title FROM tickets WHERE team=? AND open=1", team)

mcp.run()

One small server, and any MCP-compatible assistant can now list tickets.

⚠️ Common mistakes to avoid

  • Installing MCP servers from unknown sources. A server can read data and take actions; treat it like any software you install.
  • Exposing write or delete tools by default. Start read only and add powerful tools carefully.

✅ Quick check

What is the main benefit of MCP?

  1. It makes models smarter
  2. Build a tool connector once and reuse it across AI apps
  3. It replaces databases
Show answer

B. Build a tool connector once and reuse it across AI apps: MCP standardises how tools are exposed, like USB-C for AI integrations.

🙋 Questions learners ask

Is MCP only for one company's models?

No. It's an open protocol supported by many AI apps and model providers.

MCP or normal tool calling?

They work together. Tool calling is how the model asks for an action; MCP is a standard way to package and share those tools across apps.

📌 Remember

MCP = one standard plug between AI apps and your tools and data.

📖 Words from this lesson (AI dictionary)

Learn this as part of a full course

Track your progress, take the quick checks and follow the lessons in the right order. This lesson is part of:

LLM / Agent Engineer

Continue in the course