Gen-AI Developer Classroom notes 03/Dec/2025

What does MCP Server Expose

  • MCP Servers expose
    • tools: actions
    • resources: read-only data
    • prompts: reusable prompts

MCP Flow Diagrams

Preview

  • Transport
  • Messages schema: Try following prompts
I want you to show the communication between mcp client and mcp server with messages exchanged . Can you show initialization

Can you show tool calling.

Let build our First MCP Server

  • Refer Here for mcp server
  • Create a new folder hello_mcp
mkdir hello_mcp
cd hello_mcp
  • Lets initialize the project
uv init .
uv sync
  • Activate the virtual environment
    • windows .venv\Scripts\activate
    • other source .venv/bin/activate
  • Launch vscode
code .
  • Add dependencies
uv add "mcp[cli]" httpx
  • Now lets create a file called hello.py

  • reference example windows

{
  "mcpServers": {
    "my-uv-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "D:\\mcp\\servers\\myserver\\server.py"
      ],
      "cwd": "D:\\mcp\\servers\\myserver",
      "env": {
        "ENV": "prod",
        "LOG_LEVEL": "debug"
      }
    }
  }
}
  • reference example linux or mac
{
  "mcpServers": {
    "my-linux-uv-server": {
      "command": "uv",
      "args": [
        "run",
        "/home/khaja/mcp/myserver/server.py"
      ],
      "cwd": "/home/khaja/mcp/myserver",
      "env": {
        "ENV": "prod",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

By continuous learner

enthusiastic technology learner

Leave a comment