Mark học AI

Video #74 · From one AI to a whole team · Part 3/7

How does MCP work? Clients, servers, tools, resources and prompts

You type one sentence: "Sum up yesterday's meeting notes in Drive, then schedule a follow-up on Friday." It goes through two MCP sockets. What's inside?

Follow on YouTubeComing soonVideo in Vietnamese

One sentence, two sockets

You type: sum up yesterday's meeting notes in Drive, then schedule a follow-up meeting on Friday. That sentence goes through two MCP sockets. Let's open them up.

TWO SIDES

Client and server

An MCP connection has two sides. One side is the MCP client, inside the AI app you're chatting in. The other side is each tool's MCP server: one for Drive, one for the calendar.

THREE KINDS OF THINGS

Tools, resources, prompts

Each server offers three kinds of things. Tools to do things, like creating an appointment. Resources to read, like files. And prompts, ready-made prompt templates.

HELLO

What have you got?

When they first connect, the client asks: what have you got? The server sends back a list of tools, with a description of each. AI reads that list, like the tool board on the wall in part one.

RUNNING

One step at a time

Then AI goes step by step: it sends a tool call to the Drive server to read the notes, sums them up, then sends a tool call to the calendar server to create the meeting. Creating an event changes your data, so the app asks you first.

NEXT

What if you install anything?

Every server opens a door into your data. What if you install just anything? Part four: using MCP safely.

This article is based on the video Inside MCP: client and server from the Mark học AI channel. Watch the video (in Vietnamese) to see the animations.