In this example repo you will learn how to use any MCP together with Chainlit. It is highly recommend to first watch the accompanying tutorial video
-
Ensure Python 3.x is installed
-
It's recommended to create a virtual environment:
# Create virtual environment python -m venv venv # Activate virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run Chainlit:
chainlit run app.py -w
-
Start LM Studio's dev server with a model of your choice that supports tool calls (https://lmstudio.ai/docs/app/api/tools)
-
Connect an MCP server and try it out in the Chainlit UI
-
Extend the chat app whichever way you like with the Chainlit SDK (https://docs.chainlit.io/get-started/overview)