Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github Acronyms

LinkedIn

MCP

(AI) Model Context Protocol (MCP), explained using a Python program and CLI commands calling Microsoft’s LEARN MCP server.

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

This article takes a technical deep dive into a MCP Server Microsoft created from all the documentation they have created, so that you can ask “how to” questions (in English sentences) like you do with ChatGPT.

ICYMI: After OpenAI released ChatGPT on November 30, 2022, it achieved peak popularity faster than any mobile app in history. Subsequently, Google, Microsoft, Anthropic, Mistral, DeepSeek, Qwen, etc. released their foundational LLMs (Large Language Models) containing all the knowledge accumulated of all mankind over time. This has enabled perfection in translating any language to another.

Microsoft also has a “Tools” MCP Server [docs] to answer questions about your resources such as:

  • “Show me all my resource groups”
  • “List blobs in my storage container named ‘documents’”
  • “What’s the value of the ‘ConnectionString’ key in my app configuration?”
  • “Query my log analytics workspace for errors in the last hour”
  • “Show me all my Cosmos DB databases”

When, in 2024, Anthropic.com released MCP (Model Context ProtocoL) standard, it was called the “hottest thing ever in tech” because it enables LLMs (Large Language Models) to be easily connected with to the universe of AI tools and services. A standardized way to communicate means that when a MCP Client is created, it can quickly be connected with other clients who can use them in prompts.

In October, 2025, OpenAI announced a storefront of AI Agents like mobile app Marketplaces put up by Apple and Google. Another tech Gold Rush.

References:

  • https://modelcontextprotocol.io/docs/learn/architecture = official Model Context Protocol documentation.
  • https://www.anthropic.com/news/model-context-protocol
  • 6-hr video course: Learn about MCP by Elie Schoppik of Anthropic.

Glossary: Components of MCP

  • MCP Server = AI Shell coordinates and manages one or multiple MCP clients. This is a back-end API which provides functionality like database access, file operations, API integrations such as a database server that exposes query tools, a file system server that provides file access, a web scraping server.

    https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/tools/#available-tools

  • MCP Client = a front-end (GUI or CLI) app that consumes functionality by making MCP-compliant requests that execute tools, fetch resources, or use prompts. Examples are Warp, Claude Desktop, VS Code extensions, custom AI applications. For example, on Claude client Desktop, click on the slider icon to see what MCP Servers were installed:

    mcp-claude-client-432x419.png

  • MCP Host = A web server/runtime hosts (houses) MCP Clients and manages the connection and orchestration among MCP Clients and Servers. It makes use of LLM apps with server lifecycles, transport protocol handling. and message routing (based on MCP, the Model Context Protocol). A Host may expose “Resources” of read-only data or “Template” of prompts.

    For example, GitHub Copilot in Visual Studio Code can act as an MCP host and use MCP clients and servers to expand its capabilities.

    Orchestration capabilities is what sparked the “Agentic AI” vision toward a future where multiple AI Agents can be coordianted to autonomously take action – not just moving a cursor, filling forms, and coding, but also reason about research, perform entire workflows as physical and virtual robots.

    Tools can be defined and exposed dynamically for LLMs to consume, optionally supporting authentication, prompts, and tool-specific parameters.​

  • A2A (Agent-to-Agent) enables teamwork among agents. The protocol was announced by Google to enable different AI agents to communicate and collaborate with each other for achieving common goals.

    • https://medium.com/@neo-cruz/mcp-vs-a2a-comprehensive-comparison-of-ai-agent-protocols-862a969bac47.
    • https://github.com/santosomar/AI-agents-for-cybersecurity

MCP Catalogs

Standardization of how MCP communicates with AI Agents has made it easier for thousands of MCP servers and AI Agents to be created each day and appear in MCP Catalogs:

JSON for Configuration

Details about each MCP Server would include a sample JSON-format configuration file sent to execute it. For example, the “time” MCP Server also has tools such as “get_current_time” and “convert_time” not shown above but described by documentation.

   {
    "mcpServers": {
       "time": {
         "command": "uvx",
         "args": ["mcp-server-time", "--local-timezone=America/Denver"],
           "env": { "-y", { "ACCESS_TOKEN": "SECRET_API_KEY" }  },
           "working_directory": null
         }
      }
   }

PROTIP: The JSON configuration enables you to define multiple servers in one go.

Such configurations contain a command spec of “uvx”, “npx” or “pip” utilities used to install the MCP Server named. So the uv, Node.js, and pip packages should be installed.

Alternately, a URL may be provided for an HTTP endpoint that supports Server-Sent Events (SSE).

“args” (arguments) specify parameters that specify program behavior options. Other MCP Servers might require “SECRET_API_KEY” in the JSON configuration. [VIDEO]

Optionally, the “env” (environment) variable is used to hold positional specifications such as “-y” to automatically confirm acceptance of default values.

Aditionally, working_directory argument specified if a server needs them.

Dozens of YouTube videos offer conceptual tutorials with flowcharts:

  • https://www.youtube.com/watch?v=7j1t3UZA1TY
  • https://www.youtube.com/watch?v=23PzNxw11jc&pp=0gcJCfwJAYcqIYzv gRPC
  • https://www.youtube.com/watch?v=E2DEHOEbzks “How MCP Works” by the author of KodeKloud.com

In this article, let’s get you hands-on using the “Official Microsoft Learn MCP Server” loaded with what Microsoft previously displayed on their marketing, documentation, and tutorial websites, so that users can hold natural language conversations like with OpenAI’s ChatGPT.

    https://learn.microsoft.com/api/mcp

Sample prompts are presented after we cover installation of MCP Clients on your laptop.

  1. Highlight and copy the above URL to your machine’s Clipboard so you can paste it into an internet browser Address field.
    • If you use the Safari browser, it would try to download a file “mcp”. So…
    • If you use the Chrome, Firefox, or Brave browser, you would see a message returned as a convenience to humans:

    “This is an MCP server endpoint and cannot be accessed directly via a browser or unsupported transports like SSE. Please use a streamable HTTP transport. For more details, visit: https://github.com/microsoftdocs/mcp.

    DEFINITION: “streamable HTTP transport” refers to the MCP standard specifying that, unlike websites which return HTML, MCP Servers use gRPC (Remote Procedure calls) and SSE (Server Sent Events) for remote and “stdio” for local communication.

    An MCP client usually needs to be installed to handle those technologies:

    MCP Clients

    At https://github.com/MicrosoftDocs/mcp/blob/main/README.md#-installation–getting-started the page provides step-by-step instructions to install several clients to use Microsoft’s server.

    REMEMBER: Even though the underlying communication protocol is standardized by MCP, each of these categories of MCP Client tech have a different way to install:

    • Stand-alone apps such as Warp CLI, Claude Desktop, Cline, Copilot Studio, Microsoft Semantic Kernel, etc.
    • Stand-alone IDE such as Winsurf, PyCharm, continue.dev
    • Extensions added to IDE VSCode, such as Cursor, GitHub Copilot.
    • Stand-alone utilities such as MCP Inspector for a deep-dive into the “JSON-RPC over HTTP or stdio” protocol used by MCP.
    • Web servers such as NodeJs

    Click on a link in the list above for install and run instructions on MCP Hosts.

    PROTIP: Most MCP Hosts ask for monthly subscription.

    This article is an exception, however, is focused on FREE ways to access MCP Servers: a sample Python program and curl command within the Terminal that comes with macOS.

Python program

https://github.com/wilsonmar/azure-quickly/blob/main/mcp-ms-learn.py
outputs file mcp-ms-learn.json and mcp-ms-learn.md containing Markdown format in order to display images.

git clone https://github.com/wilsonmar/azure-quickly/
cd azure-quickly
uv run mcp-ms-learn.py -v -q "What are the geo coordinates of azure regions"

-v requests information about the MCP Server.

Other questions:

  • What are the geo coordinates of azure regions
  • Why do I need MCP?
  • How do I create my own MCP server
  • How to generate translations of README in different languages

curl

Copy all lines of this command for pasting on the Warp CLI or other Terminal to execute:

   curl -X POST https://learn.microsoft.com/api/mcp \
    -H "Content-Type: application/json" \
    -H "Accept: text/event-stream, application/json" \
    -d '{
        "jsonrpc": "2.0",
        "id": "test-1234",
        "method": "tools/call",
        "params": {
           "name": "microsoft_docs_search",
           "arguments": {
              "query": "Who uses MCP"
        }
        }
     }' | grep '^data:' | sed 's/^data: //' \
     | jq -r '.result.content[].text' | jq -r '.[] | .content' \
     > mcp-ms-learn.md
     brew install glow
     glow mcp-ms-learn.md

More about the coding parameters above:

-X POST defines the MCP Server endpoint.

-H “Content-Type: application/json is required for JSON-RPC compliance.

-H “Accept: text/event-stream, application/json defined in
-d ‘{ … }’ defines a JSON body defining the RPC method and parameters.

“jsonrpc”: “2.0” uses the “JSON-RPC version 2” protocol (which operates over HTTP POST).

“method”: “tools/call” — Invokes a tool defined by the MCP server.

“params.name” — The name of the tool Microsoft defined, and
“params.arguments” — Key–value pairs of arguments specific to the selected tool.

Tool NameDescriptionInput Parameters
"microsoft_docs_search"Performs semantic search against Microsoft official technical documentation query (string): The search query for retrieva
"microsoft_docs_fetch" Fetch and convert a Microsoft documentation page into markdown format url (string): URL of the documentation page to read
"microsoft_code_sample_search"Search for official Microsoft/Azure code snippets and examples query (string): Search query for Microsoft/Azure code snippets
language (string, optional): Programming language filter.

| grep ‘^data:’ | sed ‘s/^data: //’ adjusts JSON response parsing for SSE response format, which begins with “Data:” before regular JSON response:

   {
    "result": {
        "content": [
        {
            "type": "text",
            "text": "[{"title":"

| jq -r ‘.result.content[].text’ | jq -r ‘.[] | .content’ </tt> removes the excess “\\n” in JSON response.

> mcp-ms-learn.md; brew install glow; glow mcp-ms-learn.md outputs to a markdown file which the glow utility reformats (in-place) for display on the CLI Console.

Warp CLI

Warp.dev is my favorite AI assistant.

  1. Open Warp.app
  2. At the same time, press command + comma for the Settings GUI.

    Go to Warp’s MCP Server settings via: Warp Drive > Personal > MCP Servers. Command Palette: search “Open MCP Servers”

  3. Click “AI” menu.
  4. Scroll down to click “Manage MCP Servers”.
  5. Click “+ Add” to add a new MCP server.

https://github.com/MicrosoftDocs/mcp/blob/main/README.md

https://github.com/MicrosoftDocs/mcp/blob/main/.openpublishing.publish.config.json contains:

{
    "docsets_to_publish": [],
    "notification_subscribers": [],
    "sync_notification_subscribers": [],
    "branches_to_filter": [],
    "need_preview_pull_request": true,
    "dependent_repositories": [
        {
            "path_to_root": "_themes",
            "url": "https://github.com/Microsoft/templates.docs.msft",
            "branch": "main",
            "branch_mapping": {}
        }
    ]
}

Install and use MCP within VS Code

Since most developers already have Visual Studio Code, let’s add an MCP server to it:

  1. In VSCode, open the Command Palette
    • Press at the same time: Shift + Command + P
    • Click the settings icon at the lower-left to select “Command Pallete”.
  2. Ignore the “>” and type enough of MCP: Add Server to select it.
  3. Choose the server type (HTTP/SSE (Server Sent Events) for remote, stdio for local).
  4. Enter the server URL

    https://learn.microsoft.com/api/mcp

  5. ??? Provide a Server ID, and select whether to save in workspace or user settings.
  6. ??? Configure authentication (e.g., add your API key to headers in .vscode/mcp.json or settings.json).

Claude Desktop

https://claude.ai/download

https://github.com/neomatrix369/awesome-ai-ml-dl/blob/master/blogs/ai-coding-tools/claude-command-reference-card/post.md

MCP OpenAI Claude

References:

  • https://www.youtube.com/watch?v=Y0tZ35dFFx4

MCP servers in the cloud

https://.azure-api.net/-mcp/mcp) ???

Ensure you send the required authentication headers (often an API key or OAuth token).​

Build Custom MCP Servers

Build your own MCP server using any supported language — MCP just requires

For .NET or Node.js, sample server-side packages are available.

Install and use MCP Inspector utility

  • https://www.youtube.com/watch?v=tnk80CnhQB4&t=43s by Euron, using Powrshell VSCode uv add “mcp[cli]” to define a program usinf fastmcp library

Documentation about the tool is at:

https://modelcontextprotocol.io/docs/develop/connect-remote-servers

“The Inspector runs directly through npx without requiring installation”

npx @modelcontextprotocol/inspector python main.py

Local DB

Local databases include SQLite that comes with Python, or PostgreSQL.

DuckDB was designed as the “No DevOps” database.

MCP

https://www.youtube.com/watch?v=Ek8JHgZtmcI Learn MCP Servers with Python (EASY)” by Alejandro AO - Software & Ai

https://www.youtube.com/watch?v=E2DEHOEbzks&t=61s Model Context Protocol (MCP) Explained for Beginners: AI Flight Booking Demo! by Mumshad Mannambeth at KodeKloud

https://learn.kodekloud.com/courses/crash-course-mcp-for-beginners 1hr Crash Course: MCP For Beginners by Mumshad Mannambeth

https://learn.kodekloud.com/courses/mcp-for-beginners MCP For Beginners by Jeremy Morgan

https://learn.kodekloud.com/courses/ai-agents AI Agents by Gav Ridgeway

https://learn.kodekloud.com/user/courses/cline Cline by Jeremy Morgan free open-source MCP plan and act workflows agent context windows https://learn.kodekloud.com/user/courses/cline/module/07505364-dfb1-4691-8f55-ce69bc5e81ec/lesson/e9b7e535-1529-44be-8dd1-702c06a7b7dc

https://www.youtube.com/watch?v=yY6uo6mL-Ic&t=1019s Impact of AI on the future of our industry & software development by 4.0 Solutions

https://www.projectpro.io/article/mcp-projects/1142

Local notes Obsedian MCP server

https://www.youtube.com/watch?v=5xqFjh56AwM 1hr MCP Crash Course for Python Developers by Dave Ebbelaar

https://www.youtube.com/watch?v=VfZlglOWWZw&t=3s 1hr MCP Crash Course for Python Developers https://github.com/microsoft/mcp-for-beginners This high-level generalizations with buzzwords open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.

RAG

https://www.youtube.com/watch?v=X0PwwfcGSHU We Found the BEST Vector Database! (Testing Head-to-Head Benchmarks) by Better Stack