How to Build an MCP Client GUI with Streamlit and FastAPI
About
No channel description available.
Latest Posts
Video Description
In this video, you'll learn how to build a graphical user interface (GUI) for an MCP client using Streamlit in Python, and connect it to a FastAPI backend. The tutorial covers the full process—from setting up the front-end project structure and session state management in Streamlit, to making asynchronous API calls, handling chat input, logging, and rendering complex message types (user, assistant, tool call, and tool result). This video is perfect for developers looking to build interactive AI-driven chat interfaces that connect to tool-enabled backends like MCP servers, using modern Python frameworks. ## Topics - How to create an MCP client GUI with Streamlit - Connecting a Streamlit front-end to a FastAPI backend - Project structure for Streamlit + FastAPI applications - Installing and using Streamlit and httpx - Managing session state and chat message history in Streamlit - Asynchronous API calls with httpx in Python - Creating and rendering custom chatbot classes - Handling different message types: user, assistant, tool call, and tool result - Displaying JSON data and chat messages in Streamlit - Using Streamlit's input and sidebar components - Setting up and running the Streamlit application - Error handling and logging in Streamlit apps - Troubleshooting API timeouts and frontend/backend connectivity - Tips for modularizing Streamlit code and separating logic - Recommendations for further learning (Streamlit crash course, AI Engineering Bootcamp) - Best practices for building AI chat interfaces in Python ## Links - 🔗 Code from the video: https://github.com/alejandro-ao/mcp-client-python-example - 🔗 Create a FastAPI MCP Client: https://youtu.be/mhdGVbJBswA - 🚀 Complete AI Engineer Bootcamp: https://aibootcamp.dev/ - ❤️ Buy me a coffee... or a beer (thanks): https://link.alejandro-ao.com/l83gNq - 💬 Join the Discord Help Server: https://link.alejandro-ao.com/HrFKZn - ✉️ Get the news from the channel and AI Engineering: https://link.alejandro-ao.com/AIIguB ## Timestamps 0:00:00 - 01 Intro 0:02:25 - Setup 0:06:31 - Chatbot GUI 0:13:10 - Handle Query 0:20:52 - Message Types
Ultimate GUI Builder Kit
AI-recommended products based on this video

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

KOORUI 27 Inch 4K Monitor, UHD(3840 x 2160) IPS Computer Monitors, HDR10, 90% DCI-P3, Frameless, 2X HDMI 2.0 & DisplayPort 1.4, VESA Mountable, Eye Care, N07

KOORUI Monitor 27 Inch, FHD/1080p Computer Monitor for Office and Home, 100Hz, HDMI, VGA, 99% SRGB, Frameless, Eye Care, Tilt Adjustment, Black, E2711F

Asus ROG Azoth Wireless Mechanical Gaming Keyboard – 75% TKL, Tri-Mode Connectivity, Hot Swappable Pre-lubed ROG NX Snow Linear Switches, PBT Keycaps, RGB, OLED Display, PC/Mac Support - Black

TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

MSI Gaming Backlit RGB, Dedicated Hotkeys, Anti-Ghosting, Water Resistant Mechanical Feel Gaming Keyboard, Crisp Typing +12 Million Click Life Span, Steady Gaming Base Support (Vigor GK30 US)

Cmokifuly GMK67 65% Mechanical Keyboard Kit Tri-Mode South-Facing RGB LED for 3/5pin Switches,66 Keys+1 Knob Hotswap Socket PCB Gasket Mounted Plate Gaming DIY Keyboard Kit (White)

LODVIE Wireless Mouse for Laptop,2400 DPI Wireless Computer Mouse with 6 Buttons,2.4G Ergonomic USB Cordless Mouse,15 Months Battery Life Mouse for Laptop PC Mac Computer Chromebook MacBook-Black

TRAUSI 1080P HD Webcam with Microphone, Noise Cancellation, Privacy Cover, Wide-Angle Lens, Auto Light Correction, Plug & Play USB Webcam for Laptop, Desktop, PC, Mac, Zoom, Skype, Streaming Black

Shcngqio 1080P Full HD Webcam with Privacy Cover, Wide Angle Lens, Active Light Correction, Plug and Play USB Webcam for PC, Desktop,Laptop (Black)















![Advanced RAG with LlamaIndex - Metadata Extraction [2025]](https://imgz.pc97.com/?width=500&fit=cover&image=https://i.ytimg.com/vi/yzPQaNhuVGU/hqdefault.jpg)



