Dayward AIWeChat Mini Program
From Frontend Engineer to Agent Engineer in 30 Days
Week 4 · D23🔒 LockedAbout 6 hours

MCP and Skills: the Protocol, Server/Client, How It Differs From Function Calling; a Tour of the Claude Agent SDK

Get acquainted with the MCP protocol's server/client structure and how it differs from plain function calling, write a minimal MCP server and wire it into an agent, then take a quick tour of the Claude Agent SDK.

Today's goals 0/3

Sign in to tick these off and save your progress.

Today's Goals

  1. Explain MCP's server/client structure and the problem it solves
  2. Compare MCP against plain function calling and where each one fits
  3. Write a minimal MCP server and wire it into your own agent

Yesterday you tightened the gates around tools: allowlists, argument caps, and untrusted input never treated as instructions. Those tools are still hard-coded into the agent — every new capability means editing the host's code and redeploying. Today that layer comes apart too.

Plain-Language Walkthrough

One driver disk per printer

Twenty years ago a printer came with a driver disk in the box. Installing meant inserting it, a different computer meant inserting it again, and an OS upgrade could break the driver. Worse from the vendor's side: the same printer needed a separate driver written for every operating system, and a new OS version meant another release. What you actually maintain is the two version numbers multiplied together.

Then came a standard printing protocol: the printer speaks the protocol, the operating system listens to the protocol, and it works when plugged in. The vendor need not care what system you run and the system need not know each specific printer, so both sides evolve without disturbing each other.

Wiring capabilities into an agent is currently at the driver-disk stage. Your agent needs to look up orders, so you import a function in your code, write a tool description, and register it in the tool table; the risk team gives you a blocklist query, so you import again and write another description. Look at what your code looks like now:

capabilities.js
// With no protocol: every new capability edits the host's code and redeploys
import { queryOrder } from './tools/order.js'
import { trackShipment } from './tools/shipment.js'
import { queryRiskList } from './vendor/risk-sdk.js' // the risk team's package; only they know the fields
 
export const TOOLS = [
  { name: 'query_order', description: 'Look up an order status, amount and creation time by order number', run: queryOrder },
  { name: 'track_shipment', description: 'Look up shipping events and the carrier by order number', run: trackShipment },
  // The risk team renamed a return field last week, so this line, this file, and this
  // service all need a release
  { name: 'query_risk_list', description: 'Check whether a user is on the risk blocklist', run: queryRiskList },
]

Not one line of that is wrong. The problem is that it welds "who provides this capability" and "who uses it" into the same compilation. Three consequences, each dearer than the last:

One, integration cost is multiplication. You have more than one host: your own support agent, a coding assistant in the IDE, an on-call bot in the ops channel. And more than one capability: orders, shipping, refunds, risk, the knowledge base. Three hosts times five capabilities is fifteen integrations, each tested and upgraded separately. A protocol's entire value is turning that multiplication into addition.

Two, responsibility boundaries are erased. The risk blocklist query is maintained by the risk team, and that integration code is in your repository, built by your CI, and blamed on you first. They rename a field and you have to reproduce it on your own service before you can say it is not your fault.

Three, adding a capability requires a full release. Edit code, pass review, build, stage, observe. Wiring an internal tool into a live agent temporarily should be a configuration matter and is now a deployment.

That is the driver-disk era. And MCP (Model Context Protocol) wants to do what the printing protocol did: insert a layer both sides recognize between your program and a capability provider.

Which raises a question — is the function calling you have been writing for twenty-odd days not also "let the model use external capabilities"? So how do MCP and it relate? Many people's first instinct is "MCP is function calling's successor, so you will not write function calling any more." That answer is thoroughly wrong, and it is the kind an interviewer punctures in one sentence. Let us get it straight.

Sign in and link WeChat to read

Sign in, then link your WeChat mini program account on the account page. Linked accounts share one free article per day. Unlock additional articles with rewarded videos in the mini program.

Mini program QR code

Scan in WeChat to open Dayward AI. Open the same course and chapter, choose the rewarded video, then refresh this page after completion.

Interview questions

  • What problem does MCP solve, and how is it different from function calling?MCP 协议解决了什么问题?它和 function calling 有什么区别?
    Common in ChinaCommon overseasBasic#mcp#tool-calling#protocol

    🔒 Unlock this chapter to see the answer keys.

  • What roles do the MCP server and client play, what can a server expose, and which transports exist?MCP 里 server 和 client 分别承担什么角色?server 能暴露哪几类东西,传输方式有哪些?
    Common in ChinaCommon overseasIntermediate#mcp#protocol#transport

    🔒 Unlock this chapter to see the answer keys.

  • When should you reach for MCP instead of plain function calling, and what does it cost when you shouldn't?什么场景下应该考虑用 MCP,而不是直接写 function calling?不该用的时候硬上会付出什么代价?
    Common in ChinaCommon overseasIntermediate#mcp#architecture#trade-offs

    🔒 Unlock this chapter to see the answer keys.

  • You are about to attach a third-party MCP server in production. What worries you, and what do you check?你要把一个第三方维护的 MCP server 接进生产环境,会担心什么、做哪些检查?
    Common in ChinaCommon overseasDeep dive#mcp#security#operations

    🔒 Unlock this chapter to see the answer keys.

Comments