AI MCP Basics

In the last lesson, you learned AI Agents Basics. Now let us understand MCP, because AI apps need a clean way to connect with tools and data.

MCP means Model Context Protocol.

Here is MCP in one picture:

AI app host

MCP client

MCP server

Tools

Resources

Prompts

🧠 What Is MCP?

MCP is a standard way for AI apps to connect with external context and tools.

In simple words:

  • An AI app needs information or actions.
  • Another service can provide that information or action.
  • MCP gives them a common connection style.

Think of it like this:

AI app
|
MCP connection
|
Tools, files, APIs, databases, prompts

The goal is not to make the model smarter by magic.

The goal is to let an AI app connect to outside things in a standard way, instead of writing a different custom connection for every tool.

πŸ€” Why MCP Matters

Without a standard, every app may connect to tools differently.

For example:

  • One app connects to files one way.
  • Another app connects to GitHub another way.
  • Another app connects to a database with a different pattern.

MCP tries to make this cleaner.

It gives a shared way to expose things an AI app can use, like tools, files, documents, and prompt templates.

Tools

Actions the AI app can call, like search, database lookup, or calculation.

Resources

Data the app can read, like files, documents, or other context.

Prompts

Saved instruction templates, like "summarize this issue" or "review this file", that the AI app can reuse.

🌍 MCP Style Connections

Tool connection

An AI app using ChatGPT, Claude, or another assistant can connect to tools like file search, database lookup, or issue tracking.

Resource connection

A server can make approved documents or records available, so the AI app can read them only when allowed.

Prompt template

A server can provide saved prompts for repeated tasks, so every app does not rewrite the same instruction.

🧱 MCP Parts in Simple Words

MCP uses a few important words.

  • Host: The AI application the user is using. For example, an AI coding app or chat app.
  • Client: The connector inside the host that talks MCP.
  • Server: The service that exposes tools, resources, or prompts.
  • Tool: Something the model can ask to run, like β€œsearch docs” or β€œquery database”.
  • Resource: Information the app can read, like a file or document.
  • Prompt: A reusable prompt template exposed by the server.

So the model does not directly own everything.

The app and MCP connection decide what is available.

πŸ”„ Simple MCP Flow

A basic tool flow can look like this:

User asks a question
|
AI app checks available MCP tools
|
Model chooses a useful tool
|
MCP server runs the tool
|
Tool result comes back
|
Model answers using the result

Example:

User: What changed in this project?

An MCP server may expose a tool like:

read_git_diff

Then the AI app can use that tool result to explain the changes.

πŸ§ͺ MCP vs Normal API

MCP does not replace every API.

Think of it like this:

  • A normal API is built for one app to call one service.
  • MCP is built so AI apps can discover and use tools, resources, and prompts in a standard way.

Example:

  • A weather API gives weather data.
  • An MCP weather server can expose a weather tool to AI apps in a consistent shape.

🧩 What You’ve Learned

  • βœ… MCP means Model Context Protocol.
  • βœ… MCP helps AI apps connect to tools, resources, and prompts in a standard way.
  • βœ… MCP still needs security, permissions, and careful tool design.

Check Your Knowledge

4 questions Show quiz Hide quiz

Test what you learned. Pick an answer for each question, then click Check.

  1. 1

    What does MCP stand for?

    Why: MCP stands for Model Context Protocol.

  2. 2

    What is an MCP server?

    Why: An MCP server provides capabilities that an AI app can use.

  3. 3

    Is MCP itself an LLM?

    Why: MCP is a protocol for connecting AI apps with context and tools. It is not the model itself.

  4. 4

    Why should MCP tools be limited and protected?

    Why: Tools can read data or do actions, so permissions and safety checks matter.

πŸš€ What’s Next?

When we build a real AI app, we also need to decide where the model runs. A demo can use a cloud model easily, but private data may need more control. Next, let us compare cloud models and local models.