<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction |</title><link>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/</link><atom:link href="https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/index.xml" rel="self" type="application/rss+xml"/><description>Introduction</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en</language><lastBuildDate>Thu, 15 Oct 2026 00:00:00 +0000</lastBuildDate><image><url>https://haobin-tan.netlify.app/media/icon_hu_eee4a95885829ab2.png</url><title>Introduction</title><link>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/</link></image><item><title>Introducing MCP</title><link>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/introducing_mcp/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/introducing_mcp/</guid><description>&lt;p&gt;&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; is a communication layer that provides Claude with context and tools, without requiring you to write a bunch of tedious integration code.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/756f4e95014aed5979d5f87c2da8ea56b75c516a1e6879becbf224de8c1c4803.png" alt="Our server&amp;rsquo;s MCP Client connects to two MCP Servers that each hold tools, prompts and resources and call an outside service." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The basic structure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An MCP Client (your server) connecting to MCP Servers that contain tools, prompts, and resources.&lt;/li&gt;
&lt;li&gt;Each MCP Server acts as an interface to some outside service.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-problem-mcp-solves--how-mcp-works"&gt;The Problem MCP Solves &amp;amp; How MCP Works&lt;/h2&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Let&amp;rsquo;s say you&amp;rsquo;re building a chat interface where users can ask Claude about their GitHub data. A user might ask &amp;ldquo;What open pull requests are there across all my repositories?&amp;rdquo; To handle this, Claude needs tools to access GitHub&amp;rsquo;s API.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GitHub has massive functionality - repositories, pull requests, issues, projects, and tons more. Without MCP, you&amp;rsquo;d need to create an incredible number of tool schemas and functions to handle all of GitHub&amp;rsquo;s features.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/8a56e2bfc0864037ea772066e4ebe028a9b70455fcf69753f162234bc0791b30-20261017121912078.png" alt="Our server holding eight GitHub tools such as get_repos and search_issues, each with its own schema and function." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
This also means writing, testing, and maintaining all that integration code yourself. -&amp;gt; That&amp;rsquo;s a lot of effort and ongoing maintenance burden!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With MCP:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;MCP shifts this burden by moving tool definitions and execution from your server to dedicated MCP servers.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/4ae6049ccbd84c2451d768fc2bda25d2352d406e28e01124efe63d1339f26b62.png" alt="Our server holds the get_repos tool with its &amp;ldquo;schema&amp;rdquo; and &amp;ldquo;fn&amp;rdquo;, and exchanges messages with an empty MCP Server and Claude." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Instead of you authoring all those GitHub tools, an &lt;strong&gt;MCP Server for GitHub&lt;/strong&gt; handles it.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/6007c0bb43df548f5718d979f8f3edf520d95cd5d9cd10924de5c1d115d0a274.png" alt="Our server talks both ways with Claude and a GitHub MCP server whose get_repos tool, a schema and a function, calls GitHub." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The MCP Server wraps up tons of functionality around GitHub and exposes it as a standardized set of tools. Your application connects to this MCP server instead of implementing everything from scratch.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MCP Servers provide access to data or functionality implemented by outside services. They act as specialized interfaces that expose tools, prompts, and resources in a standardized way.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In our GitHub example, the MCP Server for GitHub contains tools like &lt;code&gt;get_repos()&lt;/code&gt; and connects directly to GitHub&amp;rsquo;s API. Your server communicates with the MCP server, which handles all the GitHub-specific implementation details.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How communication works:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/%E6%88%AA%E5%B1%8F2026-10-17%2012.29.05.png" alt="截屏2026-10-17 12.29.05" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="common-questions"&gt;Common Questions&lt;/h2&gt;
&lt;h3 id="who-authors-mcp-servers"&gt;Who authors MCP Servers?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Anyone can create an MCP server implementation.&lt;/li&gt;
&lt;li&gt;Often, service providers themselves will make their own official MCP implementations. For example, AWS might release an official MCP server with tools for their various services.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="how-is-this-different-from-calling-apis-directly"&gt;How is this different from calling APIs directly?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;MCP servers provide tool schemas and functions already defined for you.&lt;/li&gt;
&lt;li&gt;If you want to call an API directly, you&amp;rsquo;ll be authoring those tool definitions &lt;strong&gt;on your own&lt;/strong&gt;. MCP saves you that implementation work.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- Raw HTML instead of the card shortcode: the shortcode only opens http(s) URLs in a new tab --&gt;
&lt;div class="hb-cards mt-4 grid gap-4 not-prose" style="--hb-cols: 1;"&gt;
&lt;a class="hb-card group" href="https://haobin-tan.netlify.app/uploads/introduction-to-model-context-protocol/MCP-vs-Calling-APIs-Directly-20261017-123431.html" target="_blank" rel="noopener"&gt;
&lt;span class="hb-card-title p-4"&gt;&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"/&gt;&lt;/svg&gt;Interactive example: MCP vs. Calling APIs Directly&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="isnt-mcp-just-the-same-as-tool-use"&gt;Isn&amp;rsquo;t MCP just the same as tool use?&lt;/h3&gt;
&lt;p&gt;MCP servers and tool use are &lt;strong&gt;complementary but different concepts&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MCP servers provide tool schemas and functions already defined for you, while tool use is about how Claude actually calls those tools.&lt;/li&gt;
&lt;li&gt;The key difference is &lt;strong&gt;who does the work&lt;/strong&gt; - with MCP, someone else has already implemented the tools for you.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Benefit: Instead of maintaining a complex set of integrations yourself, you can leverage MCP servers that handle the heavy lifting of connecting to external services.&lt;/p&gt;</description></item><item><title>MCP Clients</title><link>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/mcp_clients/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/doc/claude/introduction-to-model-context-protocol/00-introduction/mcp_clients/</guid><description>&lt;p&gt;The MCP client serves as the &lt;strong&gt;communication bridge between your server and MCP servers&lt;/strong&gt;. It&amp;rsquo;s your access point to all the tools that an MCP server provides, handling the message exchange and protocol details so your application doesn&amp;rsquo;t have to.&lt;/p&gt;
&lt;h2 id="transport-agnostic-communication"&gt;Transport Agnostic Communication&lt;/h2&gt;
&lt;p&gt;One of MCP&amp;rsquo;s key strengths is being &lt;strong&gt;transport agnostic&lt;/strong&gt; - a fancy way of saying the client and server can communicate over &lt;em&gt;different&lt;/em&gt; protocols depending on your setup. In other words, &lt;strong&gt;MCP’s messages are the same whatever channel carries them&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;Both the MCP client and server can run on the same machine, communicating through standard input/output. But you can also connect them over:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTTP&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;Various other network protocols&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Local MCP server&lt;/th&gt;
&lt;th&gt;Remote MCP server&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/b393bf3821c37b06d31300b588c291caa460db51353ebbfbc6a56b9c2a2c0160.png" alt="Our server holds the MCP client, talking both ways over standard input/output with a GitHub MCP server running locally." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/3a63d189484fd713cdaa1932e5b9638da2b20059ce414c288f77d915371b5f5c.png" alt="Our server contains the MCP client, which talks both ways with an MCP server for GitHub over WebSockets." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Analogy: the same letter can go by post or by email. The words don’t change, only the delivery.&lt;/p&gt;
&lt;!-- Raw HTML instead of the card shortcode: the shortcode only opens http(s) URLs in a new tab --&gt;
&lt;div class="hb-cards mt-4 grid gap-4 not-prose" style="--hb-cols: 1;"&gt;
&lt;a class="hb-card group" href="https://haobin-tan.netlify.app/uploads/introduction-to-model-context-protocol/Transport-Agnostic-Communication-20261017-125405.html" target="_blank" rel="noopener"&gt;
&lt;span class="hb-card-title p-4"&gt;&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"/&gt;&lt;/svg&gt;Interactive example: Transport Agnostic Communication&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
## MCP Message Types
&lt;p&gt;Once connected, the client and server exchange specific message types defined in the MCP specification.&lt;/p&gt;
&lt;p&gt;Most typicals are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;ListToolsRequest&lt;/code&gt;/&lt;code&gt;ListToolsResult&lt;/code&gt;:&lt;/strong&gt; The client asks the server &amp;ldquo;what tools do you provide?&amp;rdquo; and gets back a list of available tools.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/4dbfe70297791ff32dced94d745d416ec7ec8c5889d3cbd45ef3328bbdb7f755.png" alt="The MCP client in our server sends ListToolsRequest to a GitHub MCP server, which replies with ListToolsResult." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;CallToolRequest&lt;/code&gt;/&lt;code&gt;CallToolResult&lt;/code&gt;:&lt;/strong&gt; The client asks the server to run a specific tool with given arguments, then receives the results.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/b94c5c441b196cce093af43405bb70be67728aeee37f7a526f6a022ce53e0ffe.png" alt="Our server holds the MCP client, which sends a CallToolRequest to an MCP server for GitHub and gets back a CallToolResult." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-it-all-works-together"&gt;How It All Works Together&lt;/h2&gt;
&lt;p&gt;A complete example showing how a user query flows through the entire system - from your server, through the MCP client, to external services like GitHub, and back to Claude.&lt;/p&gt;
&lt;p&gt;A user asks &amp;ldquo;What repositories do I have?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/92b5f03a879df7c7bc870a7b08fe1f93aa1cc9398f4de4128089c213c19df24f.png" alt="Sequence diagram of the whole flow between the user, our server, MCP client, MCP server, Claude and GitHub, described above." loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User Query:&lt;/strong&gt; The user submits their question to your server&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Discovery:&lt;/strong&gt; Your server needs to know what tools are available to send to Claude&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;List Tools Exchange:&lt;/strong&gt; Your server asks the MCP client for available tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP Communication:&lt;/strong&gt; The MCP client sends a &lt;code&gt;ListToolsRequest&lt;/code&gt; to the MCP server and receives a &lt;code&gt;ListToolsResult&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Claude Request:&lt;/strong&gt; Your server sends the user&amp;rsquo;s query plus the available tools to Claude&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Use Decision:&lt;/strong&gt; Claude decides it needs to call a tool to answer the question&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Execution Request:&lt;/strong&gt; Your server asks the MCP client to run the tool Claude specified&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;External API Call:&lt;/strong&gt; The MCP client sends a &lt;code&gt;CallToolRequest&lt;/code&gt; to the MCP server, which makes the actual GitHub API call&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Results Flow Back:&lt;/strong&gt; GitHub responds with repository data, which flows back through the MCP server as a &lt;code&gt;CallToolResult&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Result to Claude:&lt;/strong&gt; Your server sends the tool results back to Claude&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Final Response:&lt;/strong&gt; Claude formulates a final answer using the repository data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User Gets Answer:&lt;/strong&gt; Your server delivers Claude&amp;rsquo;s response back to the user&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-blue-100 dark:bg-blue-900 border-blue-500"
data-callout="note"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-blue-600 dark:text-blue-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Note&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;In practice it’s usually cached.&lt;/p&gt;
&lt;p&gt;In the example above, the tool list is being fetched for each question to make the flow clear. Real apps usually fetch the list &lt;strong&gt;once when they connect&lt;/strong&gt;, and again only when the server sends &lt;code&gt;notifications/tools/list_changed&lt;/code&gt;. Claude Desktop and Claude Code work this way: they call &lt;code&gt;tools/list&lt;/code&gt; at startup, not for every message.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item></channel></rss>