This guide explains how to set up a local AI Assistant using:
- Ollama
- Visual Studio Code
- Postman
- Python backend (MCP Server)
Everything runs on a local machine.
Download and install: https://ollama.com
ollama --version # Verify installationExample model: https://ollama.com/library/qwen2.5:7b-instruct
ollama pull qwen2.5:7b-instruct # Pull the modelollama run qwen2.5:7b-instruct # Run the modelIf it responds in terminal, setup is correct.
/Users/shreyash/.ollama/models # Default model path on my mac | check model location in Ollama settings.
Test using Postman: Ollama DOC
POST
http://localhost:11434/api/chat
Body → JSON:
{
"model": "qwen2.5:7b-instruct",
"messages": [
{"role": "system","content": "You are helpfull AI assistant"},
{"role": "user","content": "Explain the reflection"}
],
"stream": false
}Create two empty projects:
- mcp-server
- Ai-Assistant
Open both in separate Visual Studio Code windows.
Inside each project:
python3.13 -m venv .venvActivate virtual environment (Mac/Linux):
source .venv/bin/activateAdd the following section after the virtual environment step in your README.md.
Create a requirements.txt file inside both projects
Add the required dependencies in requirements.txt
pip install -r requirements.txt # Install dependencies:Verify installation:
pip list #Now your environment is ready to build the MCP server and backend API.Create a main.py file inside your project.
Run the server:
UVICORN_HOST=127.0.0.1 UVICORN_PORT=9001 uvicorn main:app --reloadCreate a new empty project for the MCP server and open it in Visual Studio Code.
Create a virtual environment (if not already created):
python3.13 -m venv .venv
source .venv/bin/activateCreate a requirements.txt file and add the dependencies mentioned in Step 7.
Install dependencies:
pip install -r requirements.txtCopy the main.py file into this MCP project.
(Implementation details will be added in the repository.)
Install uv using terminal:
pip install uvVerify installation:
uv --versionuv run main.pyAdd the following correction under your AI Assistant server section.
http://127.0.0.1:9001/chat
Body → JSON:
{
"query": "What is the current bitcoin price"
}This repository is for learning and personal experimentation with local AI systems and MCP architecture.