MCP.so
Sign In
Servers

MCP-ChatBot

@muralianand12345

Simple MCP Client-Server example

Overview

What is MCP-ChatBot?

MCP-ChatBot is a containerized chatbot application that uses the Modular Capability Protocol (MCP) to enable LLM interactions with external services. It integrates a weather service backend and a Streamlit frontend, allowing users to query weather information through natural language.

How to use MCP-ChatBot?

Clone the repository, copy .env.example to .env, add your WeatherAPI and OpenAI API keys, then run docker-compose up --build to launch. Access the Streamlit UI at http://localhost:8501 and type natural language queries about weather (e.g., "What's the weather in New York?").

Key features of MCP-ChatBot

  • Containerized architecture with separate server and client containers
  • Real-time weather data via WeatherAPI integration
  • Clean Streamlit user interface for chatbot interaction
  • Extensible design ready for additional MCP servers
  • Powered by OpenAI’s GPT-4o for natural language understanding

Use cases of MCP-ChatBot

  • Ask about current weather in any city using natural language
  • Check temperature or conditions for travel planning
  • Demonstrate MCP protocol with a working example

FAQ from MCP-ChatBot

What are the runtime requirements?

Docker and Docker Compose are required. You need API keys from WeatherAPI and OpenAI.

How do I add a new MCP server?

Create a new server file in the servers directory, add the service to docker-compose.yml, and update client.py to include the new server in the agent configuration.

What should I do if the connection fails?

Ensure all services are up and running. The client has a retry mechanism; if it still fails, restart the application.

Where does the weather data come from?

The weather data is retrieved from the WeatherAPI service using your own API key.

Does the chatbot support any transport besides HTTP/SSE?

The README only shows HTTP/SSE transport via MCPServerHTTP(url=...). No other transports are mentioned.

Tags

More from AI & Agents