AI-Chatbot-MCP

rushiwatpalwad23/AI-Chatbot-MCP

3.2

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.

Tools
  1. Calculator

    Performs basic arithmetic operations.

  2. 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

  1. User Query → Main app (app.py)
  2. Tool Decision → Ollama + Qwen3 decides if tool needed
  3. Tool Execution → MCP Client → MCP Server → Tool
  4. 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