MCP Fundamentals

Apr 10 2026 · Python 3, JavaScript, macOS , Windows, VS Code

Lesson 03: Building MCP Clients & LLM Integration

Running the MCP Client

Episode complete

Play next episode

Next
Transcript

In this video, you will bring your custom MCP architecture to life. You will verify that your client script can successfully “drive” the MCP Server without any human intervention.

First, you need to start the server process. This will act as the backend, waiting for instructions.

In your first terminal window, run the complete server script.

uv run --with mcp complete_mcp_server.py

Wait for the confirmation message. When you see Uvicorn running on http://127.0.0.1:8000, your server is active and listening for connections.

Now, leave that terminal running and switch to your second terminal window. This is where you will run the client.

Execute the client script.

uv run --with mcp mcp_client.py

Watch the output closely as the script executes.

First, you see the connection handshake. The client successfully connected to the server and initialized the session.

Next, look at the Resource section.

The client discovered the available resources and requested travel://alerts/london. The server responded immediately with the text: “Tube strike scheduled for Friday.” This confirms that your client can successfully read passive data from the server.

Moving down to the Tool section.

The client sent a request to calculate_trip_budget with specific arguments: 5 days and 2 travelers. The server performed the calculation and returned the formatted string showing a total of 1275.00. This proves your client can trigger executable logic.

Finally, look at the Prompt section.

This is the most interesting part. The client requested the draft_travel_plan prompt.

Notice the MESSAGE CONTENT. The server didn’t just return a blank template. It dynamically fetched the “Tube strike” alert and injected it directly into the context section of the message.

You have now successfully verified a full programmatic loop. Your client used the MCP protocol to fetch data, perform calculations, and generate context-aware prompts, all via code.

See forum comments
Cinema mode Download course materials from Github
Previous: Building an MCP Client Next: Programmatic MCP with LLMs