Skip to main content TerryFunggg Blog

Intro What Is MCP

Base my understanding, I try to use simple way to explain what is MCP (Model Context protocal).

The I/O

Input Output model is the only truth rule in computer. All action are Input and Output.

WebAPI

Like calling Web API, for example calling weather api:

Input: Query location.

Output: Json response with target location weather.

SQL

Other example work with SQL:

You always need to input SQL query like SELECT * FROM SOMETABLE, and then the SQL client will return back the table result.

Input: SQL Query

Output: Table result

All the action in computer are I/O model.

The MCP

Now, we are in LLM era. What if…What if we inject LLM in to the I/O process like this:

You may notices that it like a middleware. Inject LLM after input and before output. I think this is the most simple ways to explain what MCP doing.

Let us look back with the API example. To see what changes.

WebAPI

Before you need to follow the api documents and input exctly what the api query is. Like you need to input exctly location=HongKong and then pass to api url like: http://someapiurl?localtion=HongKong. That the only way to call weather api.

But now, because you inject the LLM, you can input human nature language:

Input: I want to know Hong Kong weather now.

Then LLM will understanding your input and extract the params “Hong Kong” and fill into api call.

And now Output, from weather api response, we may get sometings like:

json code snippet start

{"localtion": "HongKong", "temperature": "26C"}

json code snippet end

Now cus we Inject the LLM on the Output, so rather then this boring raw json, LLM will read the output, in this case JSON text, to make a human nature language like output.

Output: HongKong temperature is now 26C.