rushiwatpalwad23/AI-Chatbot-MCP
If you are the rightful owner of AI-Chatbot-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server is a component of an AI application architecture that facilitates tool calling and execution using a local AI model.
Calculator
Performs basic arithmetic operations.
Weather
Provides current weather information for a specified location.
AI Tool Calling Application
Ollama + Qwen3 + MCP Architecture
A pure Python AI application that uses Ollama with Qwen3 model and Model Context Protocol (MCP) for tool calling.
Features
- š¤ Ollama + Qwen3: Local AI model (no OpenAI needed)
- š§ MCP Tools: Calculator and Weather tools
- š 100% Local: No external API dependencies
- š Fast Setup: Automated installation script
Quick Start
1. Setup (Run Once)
```bash python setup.py ```
2. Run Application (3 Terminals)
Terminal 1 - Ollama: ```bash ollama serve ```
Terminal 2 - MCP Server: ```bash python mcp_server/server.py ```
Terminal 3 - Main App: ```bash python app.py ```
Test Queries
What is 25 + 17?
(Calculator tool)Tell me the temperature in Pune
(Weather tool)Hello!
(Direct response, no tool)
Project Structure
``` āāā app.py # Main application āāā mcp_client/ # MCP client package ā āāā init.py ā āāā client.py āāā mcp_server/ # MCP server package ā āāā init.py ā āāā server.py # FastAPI server ā āāā tools.py # Tool implementations āāā config/ ā āāā config.json # Configuration ā āāā modelfile # Ollama model config āāā setup.py # Setup script āāā requirements.txt # Dependencies āāā README.md ```
How It Works
- User Query ā Main app (
app.py
) - Tool Decision ā Ollama + Qwen3 decides if tool needed
- Tool Execution ā MCP Client ā MCP Server ā Tool
- Final Answer ā Qwen3 generates response using tool result
Requirements
- Python 3.8+
- Ollama installed and running
- Internet connection (for initial model download)
Troubleshooting
- Ollama not found: Install from https://ollama.ai
- Model not found: Run
python setup.py
again - Connection refused: Make sure all 3 terminals are running